[build] Add comprehensive firmware size reporting scripts for ARM MCUs. (#4218)
* [build] Add comprehensive firmware size reporting scripts for ARM MCUs. * [build] Add firmware size reports to commit-tests.sh. * [build] Set permissions on new scripts. * [build] Add -Wno-error option to commit-tests.sh. * [build] Revert firmware size report to using `arm-none-eabi-size` if bash not found (eg. on Windows). * [git] Add .gitattributes to force line endings on UNIX shell scripts.
This commit is contained in:
committed by
Bertrand Songis
parent
3944f30d06
commit
f4f07d3c0c
@@ -451,11 +451,20 @@ if(NOT MSVC)
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(firmware-size
|
||||
COMMAND arm-none-eabi-size firmware.elf
|
||||
DEPENDS firmware
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
find_program(BASH bash HINTS "c:/cygwin/bin/" DOC "bash shell for firmware size report (eg. c:/cygwin/bin/bash.exe on Windows).")
|
||||
if (BASH)
|
||||
add_custom_target(firmware-size
|
||||
COMMAND ${BASH} -kc '${RADIO_DIRECTORY}/util/elf-size-report.sh --mcu=${CPU_TYPE_FULL} ${SIZE_TARGET_MEM_DEFINE} firmware.elf'
|
||||
DEPENDS firmware
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
else()
|
||||
add_custom_target(firmware-size
|
||||
COMMAND arm-none-eabi-size -A firmware.elf
|
||||
DEPENDS firmware
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
else() # AVR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user