Skip to main content
added 46 characters in body
Source Link

Example usage using STM32's arm-none-eabi-size executable:

# specify the `size` executable, .elf file, and 128 KiB max flash and # 20 KiB max RAM # The `--flash` and `--ram` arguments are optional. If not specified, # percent remaining and bytes remaining values will not be calculated. size_mcu arm-none-eabi-size my_program"STM32F103RB_Nucleo.elfelf" --flash 131072 --ram 20480 
size_info = 'arm-none-eabi-size my_program.elf "STM32F103RB_Nucleo.elf"' = text data bss dec hex filename 2896 12 1588 4496 1190 STM32F103RB_Nucleo.elf FLASH used = 2908 bytes ( 2.219%). Remaining is 128164 bytes ( 97.781%). Max is 131072 bytes. SRAM used by global variables = 1600 bytes ( 7.813%). Remaining is 18880 bytes ( 92.187%) for local (stack) variables or RTOS stack & heap. Max is 20480 bytes. 

Example usage:

# specify the `size` executable, .elf file, and 128 KiB max flash and # 20 KiB max RAM # The `--flash` and `--ram` arguments are optional. If not specified, # percent remaining and bytes remaining values will not be calculated. size_mcu arm-none-eabi-size my_program.elf --flash 131072 --ram 20480 
size_info = 'arm-none-eabi-size my_program.elf "STM32F103RB_Nucleo.elf"' = text data bss dec hex filename 2896 12 1588 4496 1190 STM32F103RB_Nucleo.elf FLASH used = 2908 bytes ( 2.219%). Remaining is 128164 bytes ( 97.781%). Max is 131072 bytes. SRAM used by global variables = 1600 bytes ( 7.813%). Remaining is 18880 bytes ( 92.187%) for local (stack) variables or RTOS stack & heap. Max is 20480 bytes. 

Example usage using STM32's arm-none-eabi-size executable:

# specify the `size` executable, .elf file, and 128 KiB max flash and # 20 KiB max RAM # The `--flash` and `--ram` arguments are optional. If not specified, # percent remaining and bytes remaining values will not be calculated. size_mcu arm-none-eabi-size "STM32F103RB_Nucleo.elf" --flash 131072 --ram 20480 
size_info = 'arm-none-eabi-size "STM32F103RB_Nucleo.elf"' = text data bss dec hex filename 2896 12 1588 4496 1190 STM32F103RB_Nucleo.elf FLASH used = 2908 bytes ( 2.219%). Remaining is 128164 bytes ( 97.781%). Max is 131072 bytes. SRAM used by global variables = 1600 bytes ( 7.813%). Remaining is 18880 bytes ( 92.187%) for local (stack) variables or RTOS stack & heap. Max is 20480 bytes. 
added 14 characters in body
Source Link

Happy New YearsYear 2024! YouHere's a gift: you can use this brand new script now: size_mcu from my eRCaGuy_dotfiles repo.

Happy New Years 2024! You can use this brand new script now: size_mcu from my eRCaGuy_dotfiles repo.

Happy New Year 2024! Here's a gift: you can use this brand new script now: size_mcu from my eRCaGuy_dotfiles repo.

added 1400 characters in body
Source Link

Option 1 (preferred) size_mcu script I wrote

Happy New Years 2024! You can use this brand new script now: size_mcu from my eRCaGuy_dotfiles repo.

This should work for any .elf file, not just STM32 .elf files, including PIC32, AVR, STM32, other ARM-core, etc.

Installation instructions are in the top of the file.

Example usage:

# specify the `size` executable, .elf file, and 128 KiB max flash and # 20 KiB max RAM # The `--flash` and `--ram` arguments are optional. If not specified, # percent remaining and bytes remaining values will not be calculated. size_mcu arm-none-eabi-size my_program.elf --flash 131072 --ram 20480 

Example output (with added line breaks for readability):

size_info = 'arm-none-eabi-size my_program.elf "STM32F103RB_Nucleo.elf"' = text data bss dec hex filename 2896 12 1588 4496 1190 STM32F103RB_Nucleo.elf FLASH used = 2908 bytes ( 2.219%). Remaining is 128164 bytes ( 97.781%). Max is 131072 bytes. SRAM used by global variables = 1600 bytes ( 7.813%). Remaining is 18880 bytes ( 92.187%) for local (stack) variables or RTOS stack & heap. Max is 20480 bytes. 

Option 2: 1-line bash script

Option 1 (preferred) size_mcu script I wrote

Happy New Years 2024! You can use this brand new script now: size_mcu from my eRCaGuy_dotfiles repo.

This should work for any .elf file, not just STM32 .elf files, including PIC32, AVR, STM32, other ARM-core, etc.

Installation instructions are in the top of the file.

Example usage:

# specify the `size` executable, .elf file, and 128 KiB max flash and # 20 KiB max RAM # The `--flash` and `--ram` arguments are optional. If not specified, # percent remaining and bytes remaining values will not be calculated. size_mcu arm-none-eabi-size my_program.elf --flash 131072 --ram 20480 

Example output (with added line breaks for readability):

size_info = 'arm-none-eabi-size my_program.elf "STM32F103RB_Nucleo.elf"' = text data bss dec hex filename 2896 12 1588 4496 1190 STM32F103RB_Nucleo.elf FLASH used = 2908 bytes ( 2.219%). Remaining is 128164 bytes ( 97.781%). Max is 131072 bytes. SRAM used by global variables = 1600 bytes ( 7.813%). Remaining is 18880 bytes ( 92.187%) for local (stack) variables or RTOS stack & heap. Max is 20480 bytes. 

Option 2: 1-line bash script

added 28 characters in body
Source Link
Loading
added 535 characters in body
Source Link
Loading
Source Link
Loading