summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-02-10 22:18:41 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-02-10 22:18:52 +0100
commitc683d7905cc5d1f25f4e8ca045c338e7509fda22 (patch)
tree0744a5d83e9204fcff51b16a434dba7245e8cd11
parent89e204937cab2457805fa5d1025ffe0a705b0bf2 (diff)
msp430fr5994: correctly specify FRAM usage when flashing in 20bit mode
-rw-r--r--src/arch/msp430fr5994lp/Makefile.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arch/msp430fr5994lp/Makefile.inc b/src/arch/msp430fr5994lp/Makefile.inc
index 10bafa6..ee3faf6 100644
--- a/src/arch/msp430fr5994lp/Makefile.inc
+++ b/src/arch/msp430fr5994lp/Makefile.inc
@@ -13,6 +13,9 @@ SERIAL_PORT ?= ttyACM1
cpu_freq ?= 16000000
uart_freq ?= 115200
+fram_size = 49152
+sram_size = 4096
+
MSP430_FLASHER_DIR ?= /opt/msp430/MSP430Flasher_1.3.20
INCLUDES += -I/opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/include
@@ -23,6 +26,7 @@ ifdef CONFIG_arch_msp430fr5994lp_large_mode
endif
ifneq (${msp430_large}, )
COMMON_FLAGS += -mcode-region=either -mlarge -DADDR_20BIT -include int20.h
+ fram_size = 262144
endif
# LTO seems to be broken.
@@ -180,7 +184,7 @@ build/system.elf: ${OBJECTS}
-Wl,--library-path=/opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/include/ \
-Wl,--gc-sections \
-o $@ ${OBJECTS}
- ${QUIET}${SIZE} build/system.elf | tail -n1 | awk '{ print " ROM: " ($$1+$$2) " (" int(($$1+$$2)*100/49152) "%) RAM: " ($$2 + $$3) " (" int(($$2+$$3)*100/4096) "%)" }'
+ ${QUIET}${SIZE} build/system.elf | tail -n1 | awk '{ print " ROM: " ($$1+$$2) " (" int(($$1+$$2)*100/${fram_size}) "%) RAM: " ($$2 + $$3) " (" int(($$2+$$3)*100/${sram_size}) "%)" }'
build/system.hex: build/system.elf
${QUIET}${OBJCOPY} -O ihex ${@:.hex=.elf} $@