diff --git a/envs/common/mps2.mk b/envs/common/mps2.mk index 8fb83fa..d96ea48 100644 --- a/envs/common/mps2.mk +++ b/envs/common/mps2.mk @@ -64,7 +64,7 @@ OBJECTS = $(OBJECTS_C) $(OBJECTS_ASM) $(OBJECTS_C): $(BUILD_DIR)/%.o: % mkdir -p $(@D) - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -DDEVICE=\"$(QEMU_PLATFORM)\" -c -o $@ $< $(OBJECTS_ASM): $(BUILD_DIR)/%.o: % mkdir -p $(@D) diff --git a/envs/common/opencm3.mk b/envs/common/opencm3.mk index 7c4faf7..a585cad 100644 --- a/envs/common/opencm3.mk +++ b/envs/common/opencm3.mk @@ -76,7 +76,7 @@ OBJECTS = $(OBJECTS_C) $(OBJECTS_ASM) $(OBJECTS_C): $(BUILD_DIR)/%.o: % mkdir -p $(@D) - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -DDEVICE=\"$(DEVICE)\" -c -o $@ $< $(OBJECTS_ASM): $(BUILD_DIR)/%.o: % mkdir -p $(@D) diff --git a/envs/m55-an547/Makefile b/envs/m55-an547/Makefile index b9eb17a..be18466 100644 --- a/envs/m55-an547/Makefile +++ b/envs/m55-an547/Makefile @@ -18,6 +18,7 @@ CFLAGS += \ -ffunction-sections \ -fdata-sections \ --sysroot=$(SYSROOT) \ + -DDEVICE=\"an547\" \ -DARMCM55 \ -I$(COMMON_INC) \ -I$(ENV_INC) \ diff --git a/envs/m85-an555/Makefile b/envs/m85-an555/Makefile index a5e9f4d..9a86a40 100644 --- a/envs/m85-an555/Makefile +++ b/envs/m85-an555/Makefile @@ -19,6 +19,7 @@ CFLAGS += \ -ffunction-sections \ -fdata-sections \ --sysroot=$(SYSROOT) \ + -DDEVICE=\"an547\" \ -DARMCM85 \ -I$(COMMON_INC) \ -I$(ENV_INC) \