diff options
Diffstat (limited to 'platforms')
14 files changed, 16 insertions, 11 deletions
diff --git a/platforms/arm_atsam/platform.mk b/platforms/arm_atsam/platform.mk index b49bf764d7..9618838dc3 100644 --- a/platforms/arm_atsam/platform.mk +++ b/platforms/arm_atsam/platform.mk @@ -30,7 +30,7 @@ COMPILEFLAGS += -mthumb  CFLAGS += $(COMPILEFLAGS)  CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-exceptions -std=c++11 +CXXFLAGS += -fno-exceptions $(CXXSTANDARD)  LDFLAGS +=-Wl,--gc-sections  LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map" diff --git a/platforms/avr/drivers/ps2/ps2_usart.c b/platforms/avr/drivers/ps2/ps2_usart.c index 39ec930d4a..581badac64 100644 --- a/platforms/avr/drivers/ps2/ps2_usart.c +++ b/platforms/avr/drivers/ps2/ps2_usart.c @@ -72,8 +72,8 @@ uint8_t ps2_error = PS2_ERR_NONE;  static inline uint8_t pbuf_dequeue(void);  static inline void    pbuf_enqueue(uint8_t data); -static inline bool    pbuf_has_data(void);  static inline void    pbuf_clear(void); +bool                  pbuf_has_data(void);  void ps2_host_init(void) {      idle(); // without this many USART errors occur when cable is disconnected @@ -212,7 +212,7 @@ static inline uint8_t pbuf_dequeue(void) {      return val;  } -static inline bool pbuf_has_data(void) { +bool pbuf_has_data(void) {      uint8_t sreg = SREG;      cli();      bool has_data = (pbuf_head != pbuf_tail); diff --git a/platforms/avr/platform.mk b/platforms/avr/platform.mk index 978199b385..b51a94c93a 100644 --- a/platforms/avr/platform.mk +++ b/platforms/avr/platform.mk @@ -38,7 +38,7 @@ CFLAGS += -fno-inline-small-functions  CFLAGS += -fno-strict-aliasing  CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-exceptions -std=c++11 +CXXFLAGS += -fno-exceptions $(CXXSTANDARD)  LDFLAGS += -Wl,--gc-sections diff --git a/platforms/chibios/bootloaders/stm32_dfu.c b/platforms/chibios/bootloaders/stm32_dfu.c index ff866bd2bc..7b4ab86033 100644 --- a/platforms/chibios/bootloaders/stm32_dfu.c +++ b/platforms/chibios/bootloaders/stm32_dfu.c @@ -38,7 +38,7 @@ extern uint32_t __ram0_end__;  #    endif  #    ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY -#        define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 +#        define STM32_BOOTLOADER_DUAL_BANK_DELAY 100  #    endif  __attribute__((weak)) void bootloader_jump(void) { @@ -55,7 +55,7 @@ __attribute__((weak)) void bootloader_jump(void) {  #    endif      // Wait for a while for the capacitor to charge -    wait_ms(100); +    wait_ms(STM32_BOOTLOADER_DUAL_BANK_DELAY);      // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high      NVIC_SystemReset(); diff --git a/platforms/chibios/eeprom_stm32.c b/platforms/chibios/drivers/eeprom/eeprom_stm32.c index a15bfe09ed..a15bfe09ed 100644 --- a/platforms/chibios/eeprom_stm32.c +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32.c diff --git a/platforms/chibios/eeprom_stm32.h b/platforms/chibios/drivers/eeprom/eeprom_stm32.h index 8fcfb556b8..8fcfb556b8 100644 --- a/platforms/chibios/eeprom_stm32.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32.h diff --git a/platforms/chibios/eeprom_stm32_defs.h b/platforms/chibios/drivers/eeprom/eeprom_stm32_defs.h index 57d0440330..57d0440330 100644 --- a/platforms/chibios/eeprom_stm32_defs.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_defs.h diff --git a/platforms/chibios/eeprom_teensy.c b/platforms/chibios/drivers/eeprom/eeprom_teensy.c index c8777febde..c8777febde 100644 --- a/platforms/chibios/eeprom_teensy.c +++ b/platforms/chibios/drivers/eeprom/eeprom_teensy.c diff --git a/platforms/chibios/eeprom_teensy.h b/platforms/chibios/drivers/eeprom/eeprom_teensy.h index 9a14a1fa79..9a14a1fa79 100755 --- a/platforms/chibios/eeprom_teensy.h +++ b/platforms/chibios/drivers/eeprom/eeprom_teensy.h diff --git a/platforms/chibios/flash_stm32.c b/platforms/chibios/drivers/flash/flash_stm32.c index 72c41b8b78..72c41b8b78 100644 --- a/platforms/chibios/flash_stm32.c +++ b/platforms/chibios/drivers/flash/flash_stm32.c diff --git a/platforms/chibios/flash_stm32.h b/platforms/chibios/drivers/flash/flash_stm32.h index 6c66642ec5..6c66642ec5 100644 --- a/platforms/chibios/flash_stm32.h +++ b/platforms/chibios/drivers/flash/flash_stm32.h diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk index a91ef2cf35..86bbc22943 100644 --- a/platforms/chibios/flash.mk +++ b/platforms/chibios/flash.mk @@ -54,11 +54,11 @@ endef  # TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS  #       within the emulated eeprom via dfu-util or another tool -ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-left)) +ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-left uf2-split-left))      OPT_DEFS += -DINIT_EE_HANDS_LEFT  endif -ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right)) +ifneq (,$(filter $(MAKECMDGOALS), dfu-util-split-right uf2-split-right))      OPT_DEFS += -DINIT_EE_HANDS_RIGHT  endif @@ -66,6 +66,10 @@ dfu-util-split-left: dfu-util  dfu-util-split-right: dfu-util +uf2-split-left: flash + +uf2-split-right: flash +  ST_LINK_CLI ?= st-link_cli  ST_LINK_ARGS ?= diff --git a/platforms/test/platform.mk b/platforms/test/platform.mk index eb2424ec5c..f07c863e69 100644 --- a/platforms/test/platform.mk +++ b/platforms/test/platform.mk @@ -31,4 +31,4 @@ CFLAGS += -fno-strict-aliasing  CXXFLAGS += $(COMPILEFLAGS)  CXXFLAGS += -fno-exceptions -CXXFLAGS += -std=gnu++11 +CXXFLAGS += $(CXXSTANDARD) diff --git a/platforms/test/rules.mk b/platforms/test/rules.mk index 55512c7392..a2baa283d0 100644 --- a/platforms/test/rules.mk +++ b/platforms/test/rules.mk @@ -11,7 +11,8 @@ eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \  	-DFEE_PAGE_COUNT=16  eeprom_stm32_INC := \ -	$(PLATFORM_PATH)/chibios/ +	$(PLATFORM_PATH)/chibios/drivers/eeprom/ \ +	$(PLATFORM_PATH)/chibios/drivers/flash/  eeprom_stm32_tiny_INC := $(eeprom_stm32_INC)  eeprom_stm32_large_INC := $(eeprom_stm32_INC) @@ -19,6 +20,6 @@ eeprom_stm32_SRC := \  	$(TOP_DIR)/drivers/eeprom/eeprom_driver.c \  	$(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \  	$(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ -	$(PLATFORM_PATH)/chibios/eeprom_stm32.c +	$(PLATFORM_PATH)/chibios/drivers/eeprom/eeprom_stm32.c  eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC)  eeprom_stm32_large_SRC := $(eeprom_stm32_SRC)  | 
