[Feature] Support STM32F103C6 (32KB Flash, 10KB RAM) on stm32f103-blue-pill
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- c
- Bereich
- embedded-iot
Rechercherichtung
The issue names bsp/stm32/stm32f103-blue-pill, including board.h, link.lds, rtconfig.py, board/Kconfig, README.md, and README_zh.md. Start by reviewing PR #11850, which the issue says already implements and verifies the proposed solution. Check its changes and validation against the C6 memory and peripheral constraints; the work is done when C6 builds fit its memory limits while the default C8 remains compatible.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Affected area
Board Support Package (BSP)
Hardware/BSP vendor
STM32
Architecture
ARM / AArch64
Describe problem solved by the proposed feature
Currently, bsp/stm32/stm32f103-blue-pill only supports the STM32F103C8 chip (64KB/128KB Flash, 20KB RAM).
However, many widely available Blue Pill development boards on the market come populated with the lower-cost, pin-compatible STM32F103C6T6 (32KB Flash, 10KB RAM).
Attempting to run the existing BSP on an STM32F103C6 board causes several issues:
- Flash Overflow: The default firmware image exceeds 32KB, failing to fit or link for the C6 flash boundary.
- RAM Corruption:
board.hand the linker script assume 20KB SRAM (HEAP_ENDat0x20005000), whereas C6 has only 10KB SRAM (HEAP_ENDat0x20002800). Any heap allocation past 10KB causes silent memory corruption or HardFault. - Peripheral Differences: STM32F103C6 silicon physically lacks USART3 and SPI2.
Describe your preferred solution
Add support for the STM32F103C6 variant to bsp/stm32/stm32f103-blue-pill while keeping 100% backward compatibility for the default STM32F103C8:
-
Kconfig Chip Choice:
- Add a
choicebetweenSOC_STM32F103C8(default) andSOC_STM32F103C6. - When C6 is selected, automatically select
RT_USING_SMALL_MEM,RT_USING_SMALL_MEM_AS_HEAP, andRT_KLIBC_USING_LIBC_VSSCANF.
- Add a
-
Accurate Memory Boundaries (
board.h&link.lds):- Dynamically define
STM32_FLASH_SIZE(32KB) andSTM32_SRAM_SIZE(10KB) underSOC_STM32F103C6soHEAP_ENDis strictly bounded at0x20002800. - Update
link.ldswith dynamic_ROM_SIZEand_RAM_SIZEsymbols. - Pass
-Osand--defsym=_ROM_SIZE=32k,--defsym=_RAM_SIZE=10kinrtconfig.pyfor C6 builds.
- Dynamically define
-
Peripheral Constraints (
board/Kconfig):- Guard USART3, SPI2, and RTduino with
depends on !SOC_STM32F103C6. - Add
BSP_USING_SPI1option (supported on C6).
- Guard USART3, SPI2, and RTduino with
-
Flash Optimization Guide:
- Document optimization steps in
README.mdandREADME_zh.md(disabling serial DMA, FinSH symbol descriptions, and reducing shell stack to 2048) to fit standard RT-Thread with interactive FinSH (msh >) within 32KB.
- Document optimization steps in
Describe possible alternatives
I have already implemented and verified this solution in the PR #11850
- Vorherrschende Sprache
- C
- Sterne
- 12.3k
- Forks
- 5.5k
- Ø Merge
- 5 T. 16 Std.
- Gemergte PRs (30 T.)
- 27
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus RT-Thread/rt-thread
-
bug Component component: net
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
RT-Thread/rt-thread#11913 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] dfs_v2 tmpfs: ftruncate(fd, 0) frees the file buffer but reports success — use-after-free read/write and double free from a legal POSIX callEvtl. vergeben @remukisama hat das vor 2 Tagen übernommen. Offenin progress
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
RT-Thread/rt-thread#11902 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过Evtl. vergeben @moment-NEW hat das vor 19 Tagen übernommen. Offenin progress
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
RT-Thread/rt-thread#11818 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
BSP BSP: Loongson bug RT-Smart
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
RT-Thread/rt-thread#11717 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Arch: RISC-V BSP BSP: HPMicro bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
RT-Thread/rt-thread#11687 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in RT-Thread/rt-thread
Ähnliche Issues
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
linux-test-project/ltp#1343 · 1 Kommentar ·
-
test_audio_host: out-of-bounds read in test_audio_host_uses_exponential_full_speed_iso_intervalOffenfollowup Prio 📌
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
docs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
micropython/micropython#19798 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
valkey-io/valkey#4979 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 2 Tagen