-
Couldn't load subscription status.
- Fork 2.1k
cpu, boards: add stm32c0 #20939
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
cpu, boards: add stm32c0 #20939
Conversation
b030b16 to
9fbb04a
Compare
b58124d to
e340c07
Compare
|
Very nice! Thank you! |
e340c07 to
5deb18e
Compare
@benpicco updated commits 👍 |
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.
sorry to nitpick, but please further split up the commits, one per board. And then one for the CPU, so you have
cpu/stm32: add new STM32C0 linesboards/nucleo-c071rb: add supportboards/stm32c0116-dk: initial supportboards/stm32c0116-disco: initial supporttreewide: add new stm32c0 boards to Makefile.ci
Do you have some test output?
The periph tests would be most interesting (tests/periph/spi, tests/periph/i2c, tests/periph/uart), and since this line had some issues there in the past, I'd check especially tests/periph/rtc and tests/periph/rtt
| source [find interface/stlink-v2.cfg] | ||
| source [find target/stm32c0x.cfg] | ||
|
|
||
| #reset_config srst_only |
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.
Can be dropped?
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.
Looking into this, the lines-
source [find target/stm32c0x.cfg]
reset_config srst_only
$_TARGETNAME configure -rtos auto
are included in https://github.com/RIOT-OS/RIOT/blob/master/boards/common/stm32/dist/stm32c0.cfg so I'm betting they can be removed from the various C0 board openocd.cfg files?
| #reset_config srst_only | ||
|
|
||
| #$_TARGETNAME configure -rtos auto |
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.
Why commented out?
| * Table 11, page 20. | ||
| * | ||
| * STM32C031C6 do not have internal channel for VBAT, more details provided | ||
| * in the MCU datasheet - section 3.14, page 20. |
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.
Is this no longer true?
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.
It is true that C0 does not have an internal channel for VBAT. It is not true that more details are provided in the datasheet.
At the time of the initial C011 and C031 support, this was a relevant difference from other ST parts (like the G0 family), but now it seems that it's common to all the C0 family parts. I figured it wasn't good practice to list all the things the micro doesn't have as that list would forever be incomplete. :)
|
formal: https://github.com/RIOT-OS/RIOT/blob/master/CONTRIBUTING.md#commit-conventions |
5deb18e to
bf16845
Compare
|
I Unfortunately it does not compile for me: The cause of this is that an old CMSIS version is loaded. Fron the The support for the C071 was only added in Version 1.2.0: https://github.com/STMicroelectronics/cmsis-device-c0/commits/main/Include/stm32c071xx.h These lines have to be updated: Lines 6 to 7 in 26e46ae
# v1.3.0
PKG_VERSION_c0=517611273f835ffe95318947647bc1408f69120dWith that change, the |
|
@jparker324 are you still interested in getting this merged? I think it only requires small changes (like a rebase after #21135 to reflect the new examples folder structure). |

Adding updated
STM32C0targets per https://www.st.com/en/microcontrollers-microprocessors/stm32c0x1.htmlSupported
cputargets now includeSTM32C011,STM32C031,STM32C051,STM32C071,STM32C091, andSTM32C092.Added
boardtargetsstm32c0116-dkandstm32c0316-dk, further resolving issue #19210, andnucleo-c071rb(https://www.st.com/en/evaluation-tools/nucleo-c071rb.html).General reference issue #19264