Skip to content

Commit

Permalink
Pass device name to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
dop-amin committed Jan 7, 2025
1 parent cbe94ad commit 22d37ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion envs/common/mps2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion envs/common/opencm3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions envs/m55-an547/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CFLAGS += \
-ffunction-sections \
-fdata-sections \
--sysroot=$(SYSROOT) \
-DDEVICE=\"an547\" \
-DARMCM55 \
-I$(COMMON_INC) \
-I$(ENV_INC) \
Expand Down
1 change: 1 addition & 0 deletions envs/m85-an555/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CFLAGS += \
-ffunction-sections \
-fdata-sections \
--sysroot=$(SYSROOT) \
-DDEVICE=\"an547\" \
-DARMCM85 \
-I$(COMMON_INC) \
-I$(ENV_INC) \
Expand Down

0 comments on commit 22d37ca

Please sign in to comment.