Clion编译STM32解决FLASH溢出问题
错误
ld.exe: MPU6050.elf section `.data' will not fit in region `FLASH'
ld.exe: region `FLASH‘ overflowed by xxx bytes
解决方法
改变STM32F103C8Tx_FLASH.ld
中FLASH大小
改为256K
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
}
错误
arm-none-eabi-gcc: error: Core/Inc/test.h: No such file or directory
arm-none-eabi-gcc: error: Core/Src/test.c: No such file or directory
解决方法
修改CMakeList.txt
去掉后面的test.h和test.c文件及路径