Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


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

It seemed that GCC 4.9.3 caused the problem. I have an ATMEL ARM project, which is compiled using GCC 4.8.4, but `FLASH’ overflowed by xxxx bytes using GCC 4.9.3.

GCC ARM Embedded 4.9 update 2 was released on 23 June 2015. The testing ARM project code size generated by different gcc version with Os option are as follows:

gcc 4.7.2: 216524 bytes
gcc 4.8.4: 218408 bytes
gcc 4.9.3 (update 1): 223188 bytes
gcc 4.9.3 (update 2): 223188 bytes



-mno-lra option could not fix the code increase problem under -Os, see below:

gcc 4.7.2: 216524 bytes
gcc 4.8.4: 218408 bytes
gcc 4.9.3 (update 1): 223188 bytes
gcc 4.9.3 (update 2): 223188 bytes
gcc 4.9.3 (update 2): 222540 bytes (with -mno-lra option)


So no real solution?

I am using STM32F746G Discovery board . I am facing an issue with image size.
My binary size is more than 1MB and gets an error
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: STM32F746emWin.elf section `.rodata’ will not fit in region `FLASH’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH’ overflowed by 106964 bytes
collect2.exe: error: ld returned 1 exit status
makefile:43: recipe for target ‘STM32F746emWin_ATMEGD10.elf’ failed
make: *** STM32F746emWin.elf Error 1

How can I keep my image in external flash and execute from there
Can I use internal and external flash together continuesly .
What is the procedure for this

Any body can help me
Thanks
RR Nair

I am also facing the same issue! Does anybody know how to solve this?

Tunisia

In addition to setting optimisation to -Os, I suggest to add (-specs=nano.specs) in linker miscellaneous options.
This will forces the linker to use the nanolib (optimised for size) instead of the standard newlib