-
Notifications
You must be signed in to change notification settings - Fork 5.2k
stm32h7r7-atk bsp #10363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stm32h7r7-atk bsp #10363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new BSP for the STM32H7r7-atk development board by adapting peripheral drivers from the artpi2 BSP and modifying key drivers such as drv-eth and drv-fdcan. Key changes include the addition of board support files (e.g. drv_mpu.c, board.h, board.c), RT-Thread build scripts (SConstruct, SConscript), and comprehensive configuration and documentation files (CubeMX_Config, README.md, Kconfig) to support both MDK/IAR/GCC environments.
Reviewed Changes
Copilot reviewed 110 out of 110 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
bsp/stm32/stm32h7r7-atk/board/drv_mpu.c | Adds initialization for the MPU and configures memory regions. |
bsp/stm32/stm32h7r7-atk/board/board.h | Defines chip configurations, clock, and memory layout; documentation comments present. |
bsp/stm32/stm32h7r7-atk/applications/main.c | Implements a simple LED blink application and a VTOR relocation. |
All build script and project configuration files | Adds necessary scripts and configuration to support RT-Thread build. |
Comments suppressed due to low confidence (1)
bsp/stm32/stm32h7r7-atk/board/board.h:1
- The memory layout comment in board.h shows address ranges where the high address of the first two regions appears lower than their corresponding base addresses. Please verify and update the memory ranges (for example, changing '0x23071FFF' to '0x24071FFF' if appropriate) to correctly reflect the physical memory layout.
/*
* @brief H7RS7 SRAM MEMORY Layout
* 0x24060000 - 0x23071FFF AXI SRAM shared with ECC
* 0x24040000 - 0x2305FFFF AXI SRAM shared with DTCM
* 0x24020000 - 0x2403FFFF AXI SRAM
* 0x24000000 - 0x2401FFFF AXI SRAM shared with ITCM
*/
{ | ||
rt_uint32_t count = 1; | ||
|
||
while(count++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using an infinite loop like 'while(1)' instead of 'while(count++)' for clarity since the purpose is to blink the LED continuously without relying on the incremented counter.
while(count++) | |
while(1) |
Copilot uses AI. Check for mistakes.
请参考其他bsp,清理多余的中间文件 |
如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查 |
📌 Code Review Assignment🏷️ Tag: workflowPath: Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-06-05 06:58 UTC)
📝 Review Instructions
|
bsp/stm32/stm32h7r7-atk/.config.old
Outdated
CONFIG_RT_NAME_MAX=8 | ||
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set | ||
# CONFIG_RT_USING_SMART is not set | ||
# CONFIG_RT_USING_NANO is not set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余文件
@@ -0,0 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
|
|||
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef __STM32H7RSxx_IT_H | ||
#define __STM32H7RSxx_IT_H | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余
/* Includes ------------------------------------------------------------------*/ | ||
#include "main.h" | ||
#include "stm32h7rsxx_it.h" | ||
/* Private includes ----------------------------------------------------------*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余
* | ||
* - SystemCoreClock variable: Contains the core clock (sys_cpu_ck), it can | ||
* be used by the user application to setup the | ||
* SysTick timer or configure other parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余
"aa2g=1" "\x00" | ||
"ccode=ALL" | ||
"\x00" | ||
//#Antenna diversity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些有测过吗?没有测过的,暂时都删掉
@@ -0,0 +1 @@ | |||
[{"config_name":"Debug","exclude_files":[]}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除
CI问题处理一下 |
#endif | ||
|
||
#ifdef BSP_USING_FDCAN2 | ||
static _stm32_fdcan_t st_DrvCan2 = {0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些文件有测过吗?请添加对应的yml配置,ci进行编译,参考rt-spark bsp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件功能测试过https://club.rt-thread.org/ask/article/dd2287595c084d23.html
,
https://club.rt-thread.org/ask/article/01790de1d3e7af50.html
。
但是fdcan2现在的板子上没有,本来是打算之后画扩展板用,现在是要先把这部分删了吗?
这个yml文件有没有介绍,下面画框的地方不知道格式该怎么写,这个名字要和配置项对应吗。这个文件是要是把.config里面的配置项放进来吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先把CI问题解决了吧。再加yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你可以一点点的来,先根据其他bsp先亮个小灯,提个pr。其他的先不提交。先试试比如stm32f103 blue pill怎么使用的。这个可以直接keil模拟器运行。然后提交个最小工程。其他文件后面慢慢提交。一下子步子太大,也容易出错
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好,这两天真麻烦你了。我找时间去仔细学一下这些东西。那我这个pr是先在这里挂着,我后面改完了继续提交到这里面,还是先删掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再建个分支提交PR就可以了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我帮你这个改成草稿,后面你学会了,再来修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哦哦好的,麻烦你了
可以参考一下这个pr |
先close了,后续修改之后再提交。 |
嗯,最近期末周了没时间弄这些了,我过些天再弄 |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
在学习rtthread,想要尝试做一个开发板的bsp检验自己的学习成果,bsp制作参考了artpi2
你的解决方案是什么 (what is your solution)
使用正点原子的stm32h7r7的开发板,在把artpi2的部分外设适配到这块开发板的基础上,修改了drv-eth和drv-fdcan相关的文件,使其可以在stm32h7r7上使用,如果不出意外,如果有artpi2的扩展板应该也可以使用。
我仿照其他bsp的格式修改了工程目录,经过测试rtthread studio和mkd5可以编译成功。第一次学习制作bsp和使用git,如果有什么做的不完善的地方,希望能谅解
请提供验证的bsp和config (provide the config and bsp)
https://club.rt-thread.org/ask/article/dd2287595c084d23.html
https://club.rt-thread.org/ask/article/01790de1d3e7af50.html
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up