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


Code size

Where can I see the size of the code after compilation?
I do not see that in the consoli.frown

Hi, to have code size, just add the following:

& arm-none-eabi-size - -format=berkeley ${BuildArtifactFileName}

in: Project Properties -> C/C++ Build -> Settings -> Buld Steps -> Post build steps Command

(see attached figure)
CodeSize
Filippo


I tried your solution, but when I rebuilt my project, I received a result in the console:
“19:03:28 **** Incremental Build of configuration Debug for project Centrala_ppoz_EP ****
make all
‘Building target: Centrala_ppoz_EP.elf’
‘Invoking: MCU GCC Linker’
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -T”C:\ST_IDE\Centrala_ppoz_EP\LinkerScript.ld” -Wl,-Map=output.map -Wl,--gc-sections -o “Centrala_ppoz_EP.elf” ./startup/startup_stm32.o ./src/main.o ./src/syscalls.o ./src/system_stm32f0xx.o ./StdPeriph_Driver/src/stm32f0xx_adc.o ./StdPeriph_Driver/src/stm32f0xx_can.o ./StdPeriph_Driver/src/stm32f0xx_cec.o ./StdPeriph_Driver/src/stm32f0xx_comp.o ./StdPeriph_Driver/src/stm32f0xx_crc.o ./StdPeriph_Driver/src/stm32f0xx_crs.o ./StdPeriph_Driver/src/stm32f0xx_dac.o ./StdPeriph_Driver/src/stm32f0xx_dbgmcu.o ./StdPeriph_Driver/src/stm32f0xx_dma.o ./StdPeriph_Driver/src/stm32f0xx_exti.o ./StdPeriph_Driver/src/stm32f0xx_flash.o ./StdPeriph_Driver/src/stm32f0xx_gpio.o ./StdPeriph_Driver/src/stm32f0xx_i2c.o ./StdPeriph_Driver/src/stm32f0xx_iwdg.o ./StdPeriph_Driver/src/stm32f0xx_misc.o ./StdPeriph_Driver/src/stm32f0xx_pwr.o ./StdPeriph_Driver/src/stm32f0xx_rcc.o ./StdPeriph_Driver/src/stm32f0xx_rtc.o ./StdPeriph_Driver/src/stm32f0xx_spi.o ./StdPeriph_Driver/src/stm32f0xx_syscfg.o ./StdPeriph_Driver/src/stm32f0xx_tim.o ./StdPeriph_Driver/src/stm32f0xx_usart.o ./StdPeriph_Driver/src/stm32f0xx_wwdg.o
‘Finished building target: Centrala_ppoz_EP.elf’
’ ’
make --no-print-directory post-build
‘Generating binary:’
arm-none-eabi-objcopy -O binary “Centrala_ppoz_EP.elf” “Centrala_ppoz_EP.bin” & arm-none-eabi-size - -format=berkeley Centrala_ppoz_EP.elf
arm-none-eabi-size: invalid option — r
Usage: arm-none-eabi-size option(s) file(s)
Displays the sizes of sections inside binary files
If no input file(s) are specified, a.out is assumed
The options are:
-A|-B --format={sysv|berkeley} Select output style (default is berkeley)
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex
-t --totals Display the total sizes (Berkeley only)
--common Display total size for *COM* syms
--target= Set the binary file format
@ Read options from
-h --help Display this information
-v --version Display the program’s version

arm-none-eabi-size: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
make1: post-build Error 1 (ignored)
’ ’

19:03:30 Build Finished (took 1s.744ms)”


Hi,

It seems that you put an extra space between the two dashes in the “format” option.

By the way, this post command will be automatically added in the next version of the tool.

Kevin.


Ok. It’s works. It should look like this:
& arm-none-eabi-size --format=berkeley ${BuildArtifactFileName}

That’s great if it will be included in future versions.

Hellow, this command works great,

We prefer a more detailed info
& arm-none-eabi-size --format=sysv “${BuildArtifactFileName}”

Generating binary:
arm-none-eabi-objcopy -O binary “stargate v3 z domu.elf” “stargate v3 z domu.bin” & arm-none-eabi-size --format=sysv “xxx.elf”
xxx.elf  :

section size addr
.isr_vector 392 134217728
.text 18640 134348800
.data 28 536870912
.bkp_sram 2 536870940
.bss 93644 536870944
.ccm 20032 268435456
.rwdata 84 134234112
._user_heap_stack 256  536964588

.ARM.attributes 53 0
.debug_line 49117 0
.debug_info 79861 0
.debug_abbrev 14984 0
.debug_aranges 4464 0
.debug_ranges 7016 0
.debug_loc 41514 0
.debug_macro 71768 0
.debug_str 362290 0
.comment 112 0
.debug_frame 9804 0
Total 774061


France

Note that the --format=berkeley option, which could be abbreviated as -B, is in fact the default for arm-none-eabi-size, so it could be omitted...
The -A (--format=sysv) gives more detailed information, but it will use about ten lines...
Bernard


Hi,

I’ve tried this command & arm-none-eabi-size --format=sysv “${BuildArtifactFileName}” and it works well.
But I do not know how to use all informations in order to determine the percentage of memory usage of the ROM and the RAM of the microcontroller (64 KB Flash memory with ECC, 8KB RAM, 2 KB of data EEPROM with ECC).
Can you please help me ?

section size addr
.isr_vector 392 134217728
.text 7268 134218120
.rodata 372 134225388
.ARM.extab 0 134225760
.ARM 8 134225760
.preinit_array 0 134225768
.init_array 8 134225768
.fini_array 4 134225776
.data 1088 536870912
.bss 272 536872000
._user_heap_stack 1024 536872272
.ARM.attributes 40 0
.debug_info 22755 0
.debug_abbrev 4560 0
.debug_loc 11480 0
.debug_aranges 1512 0
.debug_ranges 1376 0
.debug_macro 97312 0
.debug_line 34004 0
.debug_str 616363 0
.comment 110 0
.debug_frame 3804 0
Total 803752