diff options
| author | William D. Jones <[email protected]> | 2019-09-14 18:01:52 -0400 |
|---|---|---|
| committer | William D. Jones <[email protected]> | 2019-09-14 18:02:17 -0400 |
| commit | 6280e4e7cbad956aab1a2a519d93620c3990eedc (patch) | |
| tree | 011d99e7b56f9a5c4935747429fcfb74e8bd7606 /examples | |
| parent | d7137e36ca3681958603f610a16b68434baad474 (diff) | |
msp430f5529: Add empty msp_exp430f5529lp BSP and DCD.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/make.mk | 13 | ||||
| -rw-r--r-- | examples/rules.mk | 16 |
2 files changed, 20 insertions, 9 deletions
diff --git a/examples/make.mk b/examples/make.mk index b0aa5659e..f2428f5e3 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -2,8 +2,12 @@ # Common make definition for all examples # -# Compiler -CROSS_COMPILE = arm-none-eabi- +# Compiler +ifeq ($(BOARD), msp_exp430f5529lp) + CROSS_COMPILE = msp430-elf- +else + CROSS_COMPILE = arm-none-eabi- +endif CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ OBJCOPY = $(CROSS_COMPILE)objcopy @@ -67,10 +71,13 @@ CFLAGS += \ -Wno-deprecated-declarations \ -Wnested-externs \ -Wunreachable-code \ - -Wno-error=lto-type-mismatch \ -ffunction-sections \ -fdata-sections +ifneq ($(BOARD), msp_exp430f5529lp) + CFLAGS += -Wno-error=lto-type-mismatch +endif + # This causes lots of warning with nrf5x build due to nrfx code # CFLAGS += -Wcast-align diff --git a/examples/rules.mk b/examples/rules.mk index 478a5907a..f57b506ca 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -23,10 +23,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 @@ -59,8 +63,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 $^ $@ @@ -103,11 +107,11 @@ size: $(BUILD)/$(BOARD)-firmware.elf clean: rm -rf $(BUILD) - + # Flash binary using Jlink ifeq ($(OS),Windows_NT) JLINKEXE = JLink.exe -else +else JLINKEXE = JLinkExe endif |
