[Feature] Support STM32F103C6 (32KB Flash, 10KB RAM) on stm32f103-blue-pill
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- c
- 領域
- embedded-iot
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 12.3k
- フォーク
- 5.5k
- 平均マージ
- 3日 8時間
- マージ済み PR(30日)
- 27
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RT-Thread/rt-thread のほかの issue
-
[Bug] [netdev] ping crashes the shell with a division by zero when the target is unreachable (received == 0)対応中かも @r3wretrhy が 3 日前に担当しました。 オープンbug Component component: net
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
RT-Thread/rt-thread#11852 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过対応中かも @moment-NEW が 6 日前に担当しました。 オープンin progress
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
RT-Thread/rt-thread#11818 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
BSP BSP: Loongson bug RT-Smart
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RT-Thread/rt-thread#11717 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Arch: RISC-V BSP BSP: HPMicro bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RT-Thread/rt-thread#11687 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
RT-Thread/rt-thread#11472 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
RT-Thread/rt-thread の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OpenPrinting/cups#1751 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Policy query leaks host primary block (BSL_PrimaryBlock_deinit skipped) on two early-exit pathsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NASA-AMMOS/BSL#355 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
arancormonk/dsd-neo#660 ·
メンテナーはふだん 1 日以内に返信