SIMINFO: fetch device name from Makefile / compile parameters.
It's also possible to do this by stringifying MCU, but this requires double redirection, which isn't easily readable in a .c file. For stringification, see the bottom example at https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
This commit is contained in:
parent
1cc1cc5c14
commit
a217465e65
|
|
@ -114,6 +114,7 @@ TARGET = $(PROGRAM).hex
|
|||
SOURCES = $(wildcard *.c)
|
||||
|
||||
CFLAGS += -DF_CPU=$(F_CPU)
|
||||
CFLAGS += -DMCU_STR=\"$(MCU)\"
|
||||
CFLAGS += -mmcu=$(MCU)
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wall
|
||||
|
|
|
|||
Loading…
Reference in New Issue