Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix build for STM32C051xx boards#2791

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
nessotrin wants to merge2 commits intostm32duino:main
base:main
Choose a base branch
Loading
fromnessotrin:main

Conversation

nessotrin
Copy link

Summary

This PR adds the ability to compile for STM32C051xx based boards. Most of the infrastructure was already there.
The STM32C051xx is a recently upgraded version of the STM32C031xx with 2x more flash.

  • Add ldscript (direct copy from STM32C031xx)
  • Fix #ifdef missing the STM32C051xx

The link script still mentions the STM32C031CxTx. Since it is auto-generated I chose to leave it as is. Someone with STM32CubeIDE could generate a new one, but I suspect there would be no difference whatsoever.

Pin GPIO_AF0_USART2 is used by PeripheralPins.cSigned-off-by: Nessotrin <nessotrin@hotmail.fr>
Direct copy from STM32C031xx. It looks compatible.Signed-off-by: Nessotrin <nessotrin@hotmail.fr>
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

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

First thanks for your contribution,
It misses several update to be properly added:

  • Reference all the entries in the boards.txt
  • Reference in the README.md
  • Add a default clock config

#defineGPIO_AF0_TIM14 ((uint8_t)0x00)/*!< TIM14 Alternate Function mapping */
#endif/* !STM32C011xx */
#if defined(STM32C031xx)|| defined(STM32C071xx)|| defined(STM32C091xx)|| defined(STM32C092xx)
#if defined(STM32C031xx)|| defined(STM32C051xx)|| defined(STM32C071xx)|| defined(STM32C091xx)|| defined(STM32C092xx)
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, HAL could not be modified.
It is used as is and if an issue is identified then it have to be corrected first in the HAL driver; feel free to raised an issue on the related GitHub:
https://github.com/STMicroelectronics/stm32c0xx-hal-driver/blob/c283b143bef6bdaacf64240ee6f15eb61dad6125/Inc/stm32c0xx_hal_gpio_ex.h#L64
If it is a blocking issue then a workaround can be added in the stm32_def.h as it is already done for an other missing AF:

#if defined(STM32C0xx)&& defined(USART3)&& !defined(GPIO_AF7_USART3)
#defineGPIO_AF7_USART3 ((uint8_t)0x07)
#endif// STM32C0xx && !defined(USART3)

MEMORY
{
RAM (xrw) :ORIGIN =0x20000000,LENGTH = LD_MAX_DATA_SIZE
FLASH (rx) :ORIGIN =0x8000000+ LD_FLASH_OFFSET,LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
FLASH (rx) :ORIGIN =0x8000000+ LD_FLASH_OFFSET,LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
FLASH (rx) :ORIGIN =0x8000000+ LD_FLASH_OFFSET,LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET

@fpistmfpistm added the new variantAdd support of new bard labelAug 18, 2025
@fpistmfpistm added this to the2.11.1/2.12.0 milestoneAug 18, 2025
@fpistmfpistm marked this pull request as draftAugust 20, 2025 14:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmfpistm requested changes

Assignees
No one assigned
Labels
new variantAdd support of new bard
Projects
Status: In progress
Milestone
2.11.1/2.12.0
Development

Successfully merging this pull request may close these issues.

2 participants
@nessotrin@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp