File tree Expand file tree Collapse file tree
bsp/stm32/stm32f103-blue-pill Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ STM32F103C8T6最小系统,采用SWD调试接口,可以用3个接口就能完
6161
6262 本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
6363
64+ - 关于flash
65+ 本章节是对Flash设置的一些简单介绍
6466
6567### 快速上手
6668
@@ -111,6 +113,10 @@ msh >
111113
112114本章节更多详细的介绍请参考 [ STM32 系列 BSP 外设驱动使用教程] ( ../docs/STM32系列BSP外设驱动使用教程.md ) 。
113115
116+ ### 关于Flash
117+ STM32F103C8T6的Flash容量在官方文档中标注为64KB,但实际上,该芯片的Flash容量为128KB。这是因为STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。
118+
119+ 所以,超出64KB范围的程序可能会出问题,不建议使用。
114120
115121
116122## 注意事项
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ extern "C" {
1818#endif
1919
2020#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
21- #define STM32_FLASH_SIZE (128 * 1024)
21+ #define STM32_FLASH_SIZE (64 * 1024)
2222#define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
2323
2424/* Internal SRAM memory size[Kbytes] <8-64>, Default: 64*/
Original file line number Diff line number Diff line change 55define symbol __ICFEDIT_intvec_start__ = 0x08000000;
66/*-Memory Regions-*/
77define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8- define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF ;
8+ define symbol __ICFEDIT_region_ROM_end__ = 0x08010000 ;
99define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10- define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF ;
10+ define symbol __ICFEDIT_region_RAM_end__ = 0x20005000 ;
1111/*-Sizes-*/
1212define symbol __ICFEDIT_size_cstack__ = 0x0400;
1313define symbol __ICFEDIT_size_heap__ = 0x000;
Original file line number Diff line number Diff line change 55/* Program Entry, set to mark it as "used" and avoid gc */
66MEMORY
77{
8- ROM (rx) : ORIGIN = 0x08000000 , LENGTH = 128k /* 128KB flash */
8+ ROM (rx) : ORIGIN = 0x08000000 , LENGTH = 64k /* 64K flash */
99 RAM (rw) : ORIGIN = 0x20000000 , LENGTH = 20k /* 20K sram */
1010}
1111ENTRY (Reset_Handler)
Original file line number Diff line number Diff line change 22; *** Scatter-Loading Description File generated by uVision ***
33; *************************************************************
44
5- LR_IROM1 0x08000000 0x00020000 { ; load region size_region
6- ER_IROM1 0x08000000 0x00020000 { ; load address = execution address
5+ LR_IROM1 0x08000000 0x00010000 { ; load region size_region
6+ ER_IROM1 0x08000000 0x00010000 { ; load address = execution address
77 *.o (RESET, +First)
88 *(InRoot$$Sections)
99 .ANY (+RO)
Original file line number Diff line number Diff line change 1010 <aExt >*.s*; *.src; *.a*</aExt >
1111 <oExt >*.obj; *.o</oExt >
1212 <lExt >*.lib</lExt >
13- <tExt >*.txt; *.h; *.inc</tExt >
13+ <tExt >*.txt; *.h; *.inc; *.md </tExt >
1414 <pExt >*.plm</pExt >
1515 <CppX >*.cpp</CppX >
1616 <nMigrate >0</nMigrate >
2626 <ToolsetNumber >0x4</ToolsetNumber >
2727 <ToolsetName >ARM-ADS</ToolsetName >
2828 <TargetOption >
29- <CLKADS >8000000 </CLKADS >
29+ <CLKADS >12000000 </CLKADS >
3030 <OPTTT >
3131 <gFlags >1</gFlags >
3232 <BeepAtEnd >1</BeepAtEnd >
103103 <bEvRecOn >1</bEvRecOn >
104104 <bSchkAxf >0</bSchkAxf >
105105 <bTchkAxf >0</bTchkAxf >
106- <nTsel >6 </nTsel >
106+ <nTsel >0 </nTsel >
107107 <sDll ></sDll >
108108 <sDllPa ></sDllPa >
109109 <sDlgDll ></sDlgDll >
114114 <tDlgDll ></tDlgDll >
115115 <tDlgPa ></tDlgPa >
116116 <tIfile ></tIfile >
117- <pMon >STLink\ST-LINKIII-KEIL_SWO.dll </pMon >
117+ <pMon >BIN\UL2CM3.DLL </pMon >
118118 </DebugOpt >
119119 <TargetDriverDllRegistry >
120120 <SetRegEntry >
121121 <Number >0</Number >
122122 <Key >UL2CM3</Key >
123- <Name >UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32F10x_128 -FL020000 -FS08000000 -FP0($$Device:STM32F103CB$Flash\STM32F10x_128.FLM)</Name >
124- </SetRegEntry >
125- <SetRegEntry >
126- <Number >0</Number >
127- <Key >ST-LINKIII-KEIL_SWO</Key >
128- <Name >-U -O206 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103CB$Flash\STM32F10x_128.FLM)</Name >
123+ <Name >UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32F10x_128 -FL020000 -FS08000000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM)</Name >
129124 </SetRegEntry >
130125 </TargetDriverDllRegistry >
131126 <Breakpoint />
173168 <pMultCmdsp ></pMultCmdsp >
174169 <DebugDescription >
175170 <Enable >1</Enable >
171+ <EnableFlashSeq >0</EnableFlashSeq >
176172 <EnableLog >0</EnableLog >
177173 <Protocol >2</Protocol >
178174 <DbgClock >10000000</DbgClock >
You can’t perform that action at this time.
0 commit comments