diff options
| author | Ha Thach <[email protected]> | 2020-03-24 11:57:20 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-24 11:57:20 +0700 |
| commit | 95009a9e790c4194d7349300fed2f07f032546ea (patch) | |
| tree | dfe77688c6c06ee1a3d0df416507be24cf524e3e /examples | |
| parent | b4a9a6e99a264cdcb886a1cc04818c086fbd7496 (diff) | |
| parent | 7e78e47444c29b4d0c804877b28aa778fa0576c3 (diff) | |
Merge pull request #194 from cr1901/msp430f5529
[WIP] MSP430 Support
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/board_test/src/tusb_config.h | 2 | ||||
| -rw-r--r-- | examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx | 0 | ||||
| -rw-r--r-- | examples/device/dfu_rt/src/tusb_config.h | 2 | ||||
| -rw-r--r-- | examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx | 1 | ||||
| -rw-r--r-- | examples/device/net_lwip_webserver/Makefile | 2 | ||||
| -rw-r--r-- | examples/device/usbtmc/src/tusb_config.h | 2 | ||||
| -rw-r--r-- | examples/make.mk | 8 | ||||
| -rw-r--r-- | examples/rules.mk | 14 |
8 files changed, 23 insertions, 8 deletions
diff --git a/examples/device/board_test/src/tusb_config.h b/examples/device/board_test/src/tusb_config.h index 2f2a4deeb..1a52cc348 100644 --- a/examples/device/board_test/src/tusb_config.h +++ b/examples/device/board_test/src/tusb_config.h @@ -64,7 +64,9 @@ // DEVICE CONFIGURATION //-------------------------------------------------------------------- +#ifndef CFG_TUD_ENDPOINT0_SIZE #define CFG_TUD_ENDPOINT0_SIZE 64 +#endif //------------- CLASS -------------// #define CFG_TUD_CDC 0 diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx b/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx diff --git a/examples/device/dfu_rt/src/tusb_config.h b/examples/device/dfu_rt/src/tusb_config.h index 96c3a2468..d1efcdab5 100644 --- a/examples/device/dfu_rt/src/tusb_config.h +++ b/examples/device/dfu_rt/src/tusb_config.h @@ -51,7 +51,9 @@ // DEVICE CONFIGURATION //-------------------------------------------------------------------- +#ifndef CFG_TUD_ENDPOINT0_SIZE #define CFG_TUD_ENDPOINT0_SIZE 64 +#endif //------------- CLASS -------------// diff --git a/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx b/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx new file mode 100644 index 000000000..17600f062 --- /dev/null +++ b/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx @@ -0,0 +1 @@ +too many warnings for 16-bit integer overflow diff --git a/examples/device/net_lwip_webserver/Makefile b/examples/device/net_lwip_webserver/Makefile index a153c30be..fa93cf87f 100644 --- a/examples/device/net_lwip_webserver/Makefile +++ b/examples/device/net_lwip_webserver/Makefile @@ -17,6 +17,8 @@ INC += \ # Example source EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) + +# lwip sources SRC_C += \ lib/lwip/src/core/altcp.c \ lib/lwip/src/core/altcp_alloc.c \ diff --git a/examples/device/usbtmc/src/tusb_config.h b/examples/device/usbtmc/src/tusb_config.h index 5dddc2c46..b6a40355e 100644 --- a/examples/device/usbtmc/src/tusb_config.h +++ b/examples/device/usbtmc/src/tusb_config.h @@ -51,7 +51,9 @@ // DEVICE CONFIGURATION //-------------------------------------------------------------------- +#ifndef CFG_TUD_ENDPOINT0_SIZE #define CFG_TUD_ENDPOINT0_SIZE 64 +#endif //------------- CLASS -------------// diff --git a/examples/make.mk b/examples/make.mk index 3c2db88c4..d22c72e18 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -3,10 +3,12 @@ # # Compiler -ifeq ($(BOARD), fomu) -CROSS_COMPILE = riscv-none-embed- +ifeq ($(BOARD), msp_exp430f5529lp) + CROSS_COMPILE = msp430-elf- +else ifeq ($(BOARD), fomu) + CROSS_COMPILE = riscv-none-embed- else -CROSS_COMPILE = arm-none-eabi- + CROSS_COMPILE = arm-none-eabi- endif CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ 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 |
