From ec1498b61cdbf2a7b0f7ab279ba361934f98fa7f Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sat, 21 May 2022 17:35:10 +0200 Subject: [PATCH 1/2] tests: only pass -mmcu once Change the order of flags for the firmware target so CFLAGS with -mmcu comes early and is only passed once to the compiler. --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 4f626ee..0435dfa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -23,7 +23,7 @@ all: cputest.firmware timertest.firmware %.firmware: %.o $(OBJECTS) - $(CC) -mmcu=$(MCU) -Wl,-Map=$(@:.firmware=.map) $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -Wl,-Map=$(@:.firmware=.map) -o $@ $^ %.ihex: %.firmware $(OBJCOPY) $^ -O ihex $@ From 918226064efdb090c4fad7ab0de1fb70f7c78320 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sun, 22 May 2022 14:35:28 +0200 Subject: [PATCH 2/2] tests: add -gstabs+ to CFLAGSNO MSPSim repeatedly asks for the compilation directory when single stepping if the tests are compiled without this flag. Fix the symptom instead of trying to make MSPSim remember that I cancelled the box. --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 0435dfa..dabee06 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -11,7 +11,7 @@ AR = msp430-ar OBJCOPY = msp430-objcopy STRIP = msp430-strip BSL = msp430-bsl -CFLAGSNO = -I. -Wall -mmcu=$(MCU) -g +CFLAGSNO = -I. -Wall -mmcu=$(MCU) -g -gstabs+ CFLAGS += $(CFLAGSNO) -Os SOURCES := msp430setup.c