[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
@@ -15,6 +15,7 @@ if(PCB STREQUAL 9XRPRO)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s8c_flash.ld)
|
||||
set(TARGET_SRC ${TARGET_SRC} rtc_driver.cpp)
|
||||
set(OPENRC_BOOTLOADER bootflash8.lbm)
|
||||
set(CPU_TYPE_FULL ATSAM3S8C) # for size report
|
||||
elseif(PCB STREQUAL AR9X)
|
||||
add_definitions(-Dat91sam3s8 -DAR9X -DSOFTWARE_VOLUME)
|
||||
set(FLAVOUR ar9x)
|
||||
@@ -23,20 +24,28 @@ elseif(PCB STREQUAL AR9X)
|
||||
set(TARGET_SRC ${TARGET_SRC} i2c_driver.cpp rtc_ds3231_driver.cpp)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s8c_flash.ld)
|
||||
set(OPENRC_BOOTLOADER bootflash8.lbm)
|
||||
set(CPU_TYPE_FULL ATSAM3S8C) # for size report
|
||||
else()
|
||||
set(FLAVOUR sky9x)
|
||||
option(PCBREV "PCB Revision" REVC)
|
||||
set(PCBREV "REVC" CACHE STRING "PCB Revision (REVA/REVB/REVC)")
|
||||
set_property(CACHE PCBREV PROPERTY STRINGS "REVA" "REVB" "REVC")
|
||||
set(TARGET_SRC ${TARGET_SRC} coproc_driver.cpp rotenc_driver.cpp rtc_driver.cpp)
|
||||
set(OPENRC_BOOTLOADER bootflash4.lbm)
|
||||
if(PCBREV STREQUAL REVA)
|
||||
add_definitions(-DDREVA)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s2c_flash.ld)
|
||||
elseif(PCBREV STREQUAL REVB)
|
||||
add_definitions(-DDREVB -DCOPROCESSOR)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s4c_flash.ld)
|
||||
set(CPU_TYPE_FULL ATSAM3S2C) # for size report
|
||||
else()
|
||||
add_definitions(-DDREVC -DCOPROCESSOR)
|
||||
if(PCBREV STREQUAL REVB)
|
||||
add_definitions(-DDREVB)
|
||||
elseif(PCBREV STREQUAL REVC)
|
||||
add_definitions(-DDREVC)
|
||||
else()
|
||||
message(SEND_ERROR "Unknown PCB Revision '${PCBREV}'")
|
||||
endif()
|
||||
add_definitions(-DCOPROCESSOR)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s4c_flash.ld)
|
||||
set(CPU_TYPE_FULL ATSAM3S4C) # for size report
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user