Skip to content

Conversation

@StrandingNeko
Copy link
Contributor

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

你的解决方案是什么 (what is your solution)

请提供验证的bsp和config (provide the config and bsp)

  • BSP:
  • .config:
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
@github-actions github-actions bot added BSP: STM32 BSP related with ST/STM32 BSP labels Jun 4, 2025
@StrandingNeko
Copy link
Contributor Author

emm, I don't know whether rtthread official had plans to release the artpi2 bsp. Just push it here.

Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
@supperthomas
Copy link
Member

📄 bsp/stm32/stm32h7r7-artpi2/figures/board_large.png — [A]
📦 Size: 20.4 MB

📄 bsp/stm32/stm32h7r7-artpi2/figures/create_proj.png — [A]
📦 Size: 388.2 KB

📄 bsp/stm32/stm32h7r7-artpi2/figures/qq_group.png — [A]
📦 Size: 163.6 KB

📄 bsp/stm32/stm32h7r7-artpi2/figures/sdk_manager.png — [A]
📦 Size: 207.7 KB

图片压缩一下。清理一下project下面的多余的文件


config SOC_SERIES_STM32H7RS
bool
default y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥要加y?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂当时调的时候加的,忘记删了

@supperthomas supperthomas requested a review from Copilot June 5, 2025 08:46
@supperthomas supperthomas added the BSP: new bsp board New added bsp, need sync action label Jun 5, 2025

This comment was marked as outdated.

Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a 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 initializes the ART-Pi2 BSP project for the STM32H7R7 microcontroller, integrating CubeMX-generated configuration, linker setup, core system code, and RT-Thread application scaffolding.

  • Added CubeMX CMake configuration and static library targets for HAL drivers
  • Introduced linker script and system startup files (system init, sysmem, syscalls, interrupts)
  • Created RT-Thread application example with SCons build scripts and updated documentation

Reviewed Changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/mx-generated.cmake CubeMX-generated CMake build configuration
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/STM32H7R7XX.ld Linker script for FLASH and RAM layout
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Src/system_stm32h7rsxx.c CMSIS system init and clock configuration
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Src/sysmem.c _sbrk heap allocation implementation
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Src/syscalls.c Minimal newlib system call stubs
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Src/stm32h7rsxx_it.c Interrupt service routines
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Inc/stm32h7rsxx_it.h Interrupt handler prototypes
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/Core/Inc/main.h Application-wide defines (LED pin) and prototypes
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/CMakePresets.json CMake presets for build configurations
bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/.mxproject STM32CubeMX project metadata
bsp/stm32/stm32h7r7-artpi2/board/.ignore_format.yml Paths excluded from code-format checks
bsp/stm32/stm32h7r7-artpi2/applications/main.c RT-Thread LED blink example and vector relocation
bsp/stm32/stm32h7r7-artpi2/applications/SConscript SCons script for application build grouping
bsp/stm32/stm32h7r7-artpi2/SConstruct Top-level SCons build script for BSP
bsp/stm32/stm32h7r7-artpi2/SConscript Module SCons script for driver compilation
bsp/stm32/stm32h7r7-artpi2/README_en.md English documentation and usage instructions
bsp/stm32/stm32h7r7-artpi2/README.md Chinese documentation
bsp/stm32/stm32h7r7-artpi2/Kconfig RT-Thread Kconfig integration
bsp/stm32/stm32h7r7-artpi2/EventRecorderStub.scvd Event recorder stub component metadata
bsp/stm32/stm32h7r7-artpi2/.gitignore File patterns to ignore in VCS
Comments suppressed due to low confidence (3)

bsp/stm32/stm32h7r7-artpi2/board/CubeMX_Config/Appli/STM32H7R7XX.ld:10

  • Header comment reports incorrect memory sizes; update to reflect actual FLASH (65536K) and RAM (455K + 64K DTCM).
**                67108864Kbytes FLASH and 0Kbytes RAM

bsp/stm32/stm32h7r7-artpi2/SConscript:11

  • The define 'STM32H7S7xx' appears to be a typo; it should likely be 'STM32H7R7xx' to match the MCU series.
env.Append(CPPDEFINES = ['STM32H7S7xx'])

bsp/stm32/stm32h7r7-artpi2/README_en.md:38

  • Document references 'RealThread_STMH7R-ART-Pi.yaml', but the repository file is named 'RealThread_STM32H7R-ART-Pi2.yaml'; update for consistency.
- **RealThread_STMH7R-ART-Pi.yaml**: Describes the hardware information of ART-Pi.

${CMAKE_SOURCE_DIR}/../Drivers/STM32H7RSxx_HAL_Driver/Src/stm32h7rsxx_ll_usb.c
)

# Drivers Midllewares
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: replace "Midllewares" with "Middlewares".

Suggested change
# Drivers Midllewares
# Drivers Middlewares

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
list = os.listdir(cwd)

env.Append(CPPDEFINES = ['STM32H7S7xx'])

for d in list:
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Variable 'list' shadows the built-in Python type; consider renaming to avoid confusion (e.g., 'entries').

Suggested change
list = os.listdir(cwd)
env.Append(CPPDEFINES = ['STM32H7S7xx'])
for d in list:
entries = os.listdir(cwd)
env.Append(CPPDEFINES = ['STM32H7S7xx'])
for d in entries:

Copilot uses AI. Check for mistakes.
@supperthomas
Copy link
Member

image
BPS加一下

Copy link
Member

@supperthomas supperthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请添加自己需要的文件,编译不到的多余文件,自动生成的文件,都删除

@@ -0,0 +1,60 @@
{
"version": 3,
"configurePresets": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余


<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">

<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余


/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余

*/

/* Includes */
#include <errno.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余

* constant and the selected clock source:
*
* - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余

** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余


. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余


set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf")
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf")
set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余

message(" Build context: " Appli)
ExternalProject_Add(CubeMX_Config_Appli
BINARY_DIR ${CMAKE_SOURCE_DIR}/Appli/build
SOURCE_DIR ${PROJECT_SOURCE_DIR}/Appli
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余

Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

📌 Code Review Assignment

🏷️ Tag: workflow

Path: .github
Reviewers: supperthomas Rbb666 kurisaW

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json

📊 Current Review Status (Last Updated: 2025-06-08 01:11 UTC)

  • Rbb666 Pending Review
  • kurisaW Pending Review
  • supperthomas Pending Review

📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@github-actions github-actions bot added the action github action yml imporve label Jun 6, 2025
Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
/**
******************************************************************************
* @file stm32h7rsxx_it.h
* @brief This file contains the headers of the interrupt handlers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请删除

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除

@@ -0,0 +1,1097 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除

* @brief STM32H7R7xx Devices vector table for GCC toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除

@supperthomas supperthomas mentioned this pull request Jun 7, 2025
10 tasks
Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
"stm32/stm32h750-weact-ministm32h7xx",
"stm32/stm32h750-fk750m1-vbt6",
"stm32/stm32h7s7-st-disco",
"stm32/stm32h7r7-artpi2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请检查下这块的缩进


POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'

elif PLATFORM == 'iccarm':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此工程如果没有验证的工具链比如(IAR)的,可以删除,只保留验证过的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
Signed-off-by: stranding <45762837+StrandingNeko@users.noreply.github.com>
@Rbb666 Rbb666 merged commit 12ac742 into RT-Thread:master Jun 8, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action github action yml imporve BSP: new bsp board New added bsp, need sync action BSP: STM32 BSP related with ST/STM32 BSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants