stm32f103c8t6 region `FLASH' overflowed by 1188 bytes
由于stm32f103c8t6 blue pill有两种,64k和128k,刚开始的时候没注意到这个问题, 写着写着就不能再装了才意识这个问题的重要性.
/arm-none-eabi/bin/ld: region `FLASH' overflowed by 1188 bytes
- Memory region Used Size Region Size %age Used
- RAM: 5568 B 20 KB 27.19%
- FLASH: 66724 B 64 KB 101.81%
- /usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: 1.elf section `.data' will not fit in region `FLASH'
- /usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 1188 bytes
- collect2: error: ld returned 1 exit status
复制代码 这个问题好像修改cfg文件解决不了.
在STM32F103C8TX_FLASH.ld文件里面修改flash大小设置:
- /* Memories definition */
- MEMORY
- {
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
- FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
- }
复制代码
|