diff options
| author | John Whittington <git@jbrengineering.co.uk> | 2019-03-25 13:36:03 +0000 |
|---|---|---|
| committer | John Whittington <git@jbrengineering.co.uk> | 2019-03-25 13:36:03 +0000 |
| commit | 9783e68bc874329d33122b0fbdf5f3ffe79383f6 (patch) | |
| tree | d1fa0244494ddaee8d4a70788a2dcfa65553e671 /Arduino.mk | |
| parent | 591855b8904bcff14c7c7f127653186a0b482360 (diff) | |
add swtich for ARM 'avr-size' so that .elf is passed as arg
`avr-size` was defaulting to AVR non-aware when using ARM builds, which
meant passing .hex rather than .elf to size and limiting size readout.
Adding a switch for defining `avr-size` and SIZEFLAGS to Sam.mk seems
like the best way to include proper ARM support (despite conflicting
naming).
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1286,9 +1286,14 @@ ifneq (,$(findstring AVR,$(shell $(SIZE) --help))) avr_size = $(SIZE) $(SIZEFLAGS) --format=avr $(1) $(call show_config_info,Size utility: AVR-aware for enhanced output,[AUTODETECTED]) else - # We have a plain-old binutils version - just give it the hex. - avr_size = $(SIZE) $(2) - $(call show_config_info,Size utility: Basic (not AVR-aware),[AUTODETECTED]) + ifeq ($(findstring sam, $(strip $(ARCHITECTURE))), sam) + avr_size = $(SIZE) $(SIZEFLAGS) $(1) + $(call show_config_info,Size utility: ARM,[AUTODETECTED]) + else + # We have a plain-old binutils version - just give it the hex. + avr_size = $(SIZE) $(2) + $(call show_config_info,Size utility: Basic (not AVR-aware),[AUTODETECTED]) + endif endif ifneq (,$(strip $(ARDUINO_LIBS))) |
