summaryrefslogtreecommitdiff
path: root/examples/rules.mk
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-03-24 11:57:20 +0700
committerGitHub <[email protected]>2020-03-24 11:57:20 +0700
commit95009a9e790c4194d7349300fed2f07f032546ea (patch)
treedfe77688c6c06ee1a3d0df416507be24cf524e3e /examples/rules.mk
parentb4a9a6e99a264cdcb886a1cc04818c086fbd7496 (diff)
parent7e78e47444c29b4d0c804877b28aa778fa0576c3 (diff)
Merge pull request #194 from cr1901/msp430f5529
[WIP] MSP430 Support
Diffstat (limited to 'examples/rules.mk')
-rw-r--r--examples/rules.mk14
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/rules.mk b/examples/rules.mk
index e51703aa7..0343391cb 100644
--- a/examples/rules.mk
+++ b/examples/rules.mk
@@ -30,10 +30,14 @@ INC += $(TOP)/src
#
CFLAGS += $(addprefix -I,$(INC))
-LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
+ifeq ($(BOARD), msp_exp430f5529lp)
+ LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections
+else
+ LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
+endif
ASFLAGS += $(CFLAGS)
-# Assembly files can be name with upper case .S, convert it to .s
+# Assembly files can be name with upper case .S, convert it to .s
SRC_S := $(SRC_S:.S=.s)
# Due to GCC LTO bug https://bugs.launchpad.net/gcc-arm-embedded/+bug/1747966
@@ -66,8 +70,8 @@ $(BUILD)/$(BOARD)-firmware.elf: $(OBJ)
$(BUILD)/$(BOARD)-firmware.bin: $(BUILD)/$(BOARD)-firmware.elf
@echo CREATE $@
@$(OBJCOPY) -O binary $^ $@
-
-$(BUILD)/$(BOARD)-firmware.hex: $(BUILD)/$(BOARD)-firmware.elf
+
+$(BUILD)/$(BOARD)-firmware.hex: $(BUILD)/$(BOARD)-firmware.elf
@echo CREATE $@
@$(OBJCOPY) -O ihex $^ $@
@@ -114,7 +118,7 @@ clean:
# Flash binary using Jlink
ifeq ($(OS),Windows_NT)
JLINKEXE = JLink.exe
-else
+else
JLINKEXE = JLinkExe
endif