Keil to OpenSTM32 - Code Size
I’ve been using keil to do a project that runs on the stm32l152 (32kb flash version). I decided as a test to move over to openstm32. Got the code over easy enough, but it seems that the code size is too big for the flash now. I’m assuming that it is because it uses either a wrong standard library or optimization options that are wrong.
Any ideas on how to get code size back down again?
‘Building target: st_main Configuration.elf’
‘Invoking: MCU GCC Linker’
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -T”..\STM32L151R6Hx_FLASH.ld” -Wl,-Map=output.map -Wl,--gc-sections -lm -o “st_main Configuration.elf” @”objects.list”
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: st_main Configuration.elf section `.text’ will not fit in region `FLASH’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH’ overflowed by 20004 bytes
collect2.exe: error: ld returned 1 exit status
make: *** st_main Configuration.elf Error 1