Skip to content

Conversation

@bricle
Copy link
Contributor

@bricle bricle commented Apr 5, 2025

Changes proposed:

  • Add support for new vendor Shanghai Ruiside Electronic Technology Co., Ltd.
    • Update dts/bindings/vendor-prefixes.txt with rt-threat prefix
  • Add ART-PI2 board basic support
    • Board features STM32H7R7L8HxH microcontroller
    • Configure for POWER_SUPPLY_DIRECT_SMPS operation mode

Testing:

Hello World Sample Output

*** Booting Zephyr OS build v4.1.0-1907-g415ab379a8af ***
Hello World! art_pi2/stm32h7r7xx

# Required HAL Changes:
- Need to add SMPS define in hal_stm32 to enable POWER_SUPPLY_DIRECT_SMPS, otherwise this won't build
with flollowing error

/home/user/zephyrproject/zephyr/soc/st/stm32/stm32h7rsx/soc.c: In function 'soc_early_init_hook':
/home/user/zephyrproject/zephyr/soc/st/stm32/stm32h7rsx/soc.c:47:2: error: #error Unsupported configuration: Selected SoC do not support SMPS
   47 | #error Unsupported configuration: Selected SoC do not support SMPS
      |  ^~~~~

Questions for Maintainers:

  • Seeking guidance on the HAL changes implementation path:
    1. Should these HAL changes be implemented by ST staff directly?
    2. Or can I submit a separate PR to hal_stm32 repository and update the HAL revision?

@bricle
Copy link
Contributor Author

bricle commented Apr 5, 2025

@kartben @FRASTM could you take a look please? it seems like the bot missed the platform: STM32 label, thank you!

ronoth Ronoth
roofull Shenzhen Roofull Technology Co, Ltd
roseapplepi RoseapplePi.org
rt-thread RT-Thread
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend using the foundation's name, if available.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a company, Shanghai Ruiside Electronic Technology Co., Ltd. https://www.rt-thread.org/about.html

Copy link
Contributor

Choose a reason for hiding this comment

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

Weirdly, there is another entity Real-Thread Information Technology Limited mentioned here https://www.rt-thread.org/account/user/terms.html
and here https://www.rt-thread.io/account/user/policy.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think Shanghai Ruiside Electronic Technology Co., Ltd. is the correct company name. RT-Thread is a trademark owned by this company, as states in this official article (in Chinese). Also in China, this company is the official distributor and manufacturer of RT-Thread boards, including the ART-Pi2.

@@ -0,0 +1,6 @@
board:
name: art_pi2
full_name: RT-Thread ART-Pi2
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
full_name: RT-Thread ART-Pi2
full_name: ART-Pi2

What's more, I cannot find any reference to this board online -- is this really how the board is named or is this a "rev. 2" of the ART-Pi?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer taking this as separate board named "ART-Pi2", distinct from ART-Pi with different mcu and other features.

Documentation can be found here: sdk-bsp-stm32h7r-realthread-artpi2
Schematics are available here: schematics

For clarity:

  • ART-Pi2:
    • New board featuring STM32H7R7 (this PR)
    • Just released in February, 2025, so there is not much reference online
    • Will be available on AliExpress and Mouser soon
  • ART-Pi:
    • Different board featuring STM32H750, released in 2020
    • Available on AliExpress and Mouser

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, thanks for clarifying!

Copy link
Contributor

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

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

Why is this vendor using the name RT-Thread, which is a well-known open-source RTOS? https://en.m.wikipedia.org/wiki/RT-Thread
Is this coming from the same company?

@bricle
Copy link
Contributor Author

bricle commented Apr 5, 2025

Yes, this board comes from the same company that created RT-Thread RTOS. These development boards (ART-Pi and ART-Pi2) are officially designed and produced by the RT-Thread team to showcase their RTOS capabilities and provide reference hardware for developers.

While the board's original SDK is based on RT-Thread RTOS, I'm working on porting it to Zephyr to provide users with an alternative RTOS option.

:goals: debug

.. _ART-Pi2 website:
https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be referencing repos dedicated to other RTOSs in Zephyr?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not?

Copy link
Contributor

@JarmouniA JarmouniA Apr 5, 2025

Choose a reason for hiding this comment

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

Why not?

@kartben just wondering if it's really necessary, that's all.

https://www.st.com/resource/en/reference_manual/rm0477-stm32h7rx7sx-armbased-32bit-mcus-stmicroelectronics.pdf

.. _ART-Pi2 board documents:
https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2/tree/master/documents
Copy link
Contributor

Choose a reason for hiding this comment

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

Most of the info found here is specific to RT-Thread RTOS (plus not in English). Info that is relevant to Zephyr should be added in the board's doc directly & this reference should be removed.

https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2/tree/master/documents

.. _OpenOCD installing Debug Version:
https://github.com/zephyrproject-rtos/openocd
Copy link
Contributor

Choose a reason for hiding this comment

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

not used, to be removed.

https://github.com/zephyrproject-rtos/openocd

.. _OpenOCD installing with ST-LINK V3 support:
https://mbd.kleier.net/integrating-st-link-v3.html
Copy link
Contributor

Choose a reason for hiding this comment

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

not used.

https://mbd.kleier.net/integrating-st-link-v3.html

.. _STM32CubeIDE:
https://www.st.com/en/development-tools/stm32cubeide.html
Copy link
Contributor

Choose a reason for hiding this comment

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

not used

Debugging
=========

You can debug an application in the usual way. Here is an example for the
Copy link
Contributor

Choose a reason for hiding this comment

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

with OpenOCD? if yes, is it the one included with Zephyr SDK on Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually debuging and flashing don't work with the OpenOCD included with Zephyr SDK on Linux, removed it, thank you

The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.

Alternatively, pyocd or openocd can also be used to flash the board using
Copy link
Contributor

Choose a reason for hiding this comment

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

pyOCD, OpenOCD

@bricle bricle force-pushed the art-pi2 branch 2 times, most recently from 83df3b9 to b6bee33 Compare April 5, 2025 12:54
ronoth Ronoth
roofull Shenzhen Roofull Technology Co, Ltd
roseapplepi RoseapplePi.org
rt-thread Shanghai Ruiside Electronic Technology Co., Ltd.
Copy link
Contributor

Choose a reason for hiding this comment

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

rt-thread -> ruiside, the same for board folder name.

#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "RT-Thread ART-Pi2 board";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
model = "RT-Thread ART-Pi2 board";
model = "Ruiside Electronic ART-Pi2 board";

@bricle bricle changed the title boards: rt-thread: art-pi2: add minimum support boards: ruiside: art-pi2: add minimum support Apr 5, 2025

/ {
model = "Ruiside Electronic ART-Pi2 board";
compatible = "Ruiside,art-pi2";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
compatible = "Ruiside,art-pi2";
compatible = "ruiside,art-pi2";

- watchdog
- adc
- entropy
vendor: Ruiside
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
vendor: Ruiside
vendor: ruiside

# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

# enable uart driver
Copy link
Contributor

Choose a reason for hiding this comment

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

Use proper capitalization of nouns in code comments (e.g. UART and not uart, CMake and not cmake).
And use capitals for first letter of comments

@erwango
Copy link
Member

erwango commented Apr 9, 2025

About:

Need to add SMPS define in hal_stm32 to enable POWER_SUPPLY_DIRECT_SMPS, otherwise this won't build
with flollowing error

The commit you're pointing at is merged in hal_stm32 already. Can you clarify the expectation here ?

@bricle
Copy link
Contributor Author

bricle commented Apr 9, 2025

About:

Need to add SMPS define in hal_stm32 to enable POWER_SUPPLY_DIRECT_SMPS, otherwise this won't build
with flollowing error

The commit you're pointing at is merged in hal_stm32 already. Can you clarify the expectation here ?

It seems like this commit anly add SMPS define in stm32cube/stm32h7rsxx/soc/stm32h7s7xx.h, while this boards is based on STM32H7R7L8HxH mcu, which don't have this define in corresponding stm32h7r7xx.h, thank you for your reply!

@decsny decsny removed their request for review April 14, 2025 17:17
@bricle bricle force-pushed the art-pi2 branch 3 times, most recently from a85e82f to cc45cc9 Compare April 24, 2025 12:21
@bricle
Copy link
Contributor Author

bricle commented Apr 24, 2025

rebased to main to address dependency issue, dear reviewers please revisits.

nordicjm
nordicjm previously approved these changes Apr 24, 2025
@nordicjm
Copy link
Contributor

For future note: to get reviewers to know they need to check things, in the top right under reviewers, click the refresh button next to the names, have done it for you

rruuaanng
rruuaanng previously approved these changes Apr 24, 2025
- introduced a new vendor ruiside, updated
`dts/bindings/vendor-prefixes.txt`
- add art-pi2 board basic support

Signed-off-by: Shan Pen <[email protected]>
@kartben kartben merged commit 46f5e7b into zephyrproject-rtos:main Apr 24, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants