From dbbd4e8f8d6bf04af4b778d2c8fd14d5417780c6 Mon Sep 17 00:00:00 2001 From: flabbergast Date: Mon, 21 Dec 2015 08:45:26 +0000 Subject: [PATCH] Chibios: updates for 3.0.4 git. --- keyboard/infinity_chibios/halconf.h | 7 ++ keyboard/stm32_f103_onekey/halconf.h | 7 ++ keyboard/stm32_onekey/halconf.h | 7 ++ keyboard/teensy_lc_onekey/halconf.h | 7 ++ keyboard/teensy_lc_onekey/ld/MKL26Z64.ld | 145 ++++------------------- 5 files changed, 50 insertions(+), 123 deletions(-) diff --git a/keyboard/infinity_chibios/halconf.h b/keyboard/infinity_chibios/halconf.h index 2472ba7e..61a9ac0a 100644 --- a/keyboard/infinity_chibios/halconf.h +++ b/keyboard/infinity_chibios/halconf.h @@ -163,6 +163,13 @@ #define HAL_USE_USB TRUE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ diff --git a/keyboard/stm32_f103_onekey/halconf.h b/keyboard/stm32_f103_onekey/halconf.h index d3415c55..e75c1c36 100644 --- a/keyboard/stm32_f103_onekey/halconf.h +++ b/keyboard/stm32_f103_onekey/halconf.h @@ -163,6 +163,13 @@ #define HAL_USE_USB TRUE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ diff --git a/keyboard/stm32_onekey/halconf.h b/keyboard/stm32_onekey/halconf.h index d3415c55..e75c1c36 100644 --- a/keyboard/stm32_onekey/halconf.h +++ b/keyboard/stm32_onekey/halconf.h @@ -163,6 +163,13 @@ #define HAL_USE_USB TRUE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ diff --git a/keyboard/teensy_lc_onekey/halconf.h b/keyboard/teensy_lc_onekey/halconf.h index 0d4bc4d0..86839166 100644 --- a/keyboard/teensy_lc_onekey/halconf.h +++ b/keyboard/teensy_lc_onekey/halconf.h @@ -163,6 +163,13 @@ #define HAL_USE_USB TRUE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + #endif /* _HALCONF_H_ */ /** @} */ diff --git a/keyboard/teensy_lc_onekey/ld/MKL26Z64.ld b/keyboard/teensy_lc_onekey/ld/MKL26Z64.ld index fd9102de..9e9e9250 100644 --- a/keyboard/teensy_lc_onekey/ld/MKL26Z64.ld +++ b/keyboard/teensy_lc_onekey/ld/MKL26Z64.ld @@ -18,144 +18,43 @@ */ /* - * KL25Z64 memory setup. + * KL26Z64 memory setup. */ - -ENTRY(Reset_Handler) - MEMORY { flash0 : org = 0x00000000, len = 0xc0 flashcfg : org = 0x00000400, len = 0x10 flash : org = 0x00000410, len = 62k - 0x410 eeprom_emu : org = 0x0000F800, len = 2k - ram : org = 0x1FFFF800, len = 8k + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 } -__ram_start__ = ORIGIN(ram); -__ram_size__ = LENGTH(ram); -__ram_end__ = __ram_start__ + __ram_size__; - __eeprom_workarea_start__ = ORIGIN(eeprom_emu); __eeprom_workarea_size__ = LENGTH(eeprom_emu); __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; -SECTIONS -{ - . = 0; - - .isr : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.vectors)) - } > flash0 - - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flashcfg - - _text = .; - - constructors : ALIGN(4) SUBALIGN(4) - { - PROVIDE(__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE(__init_array_end = .); - } > flash - - destructors : ALIGN(4) SUBALIGN(4) - { - PROVIDE(__fini_array_start = .); - KEEP(*(.fini_array)) - KEEP(*(SORT(.fini_array.*))) - PROVIDE(__fini_array_end = .); - } > flash +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); - .text : ALIGN(4) SUBALIGN(4) - { - *(.text) - *(.text.*) - *(.rodata) - *(.rodata.*) - *(.glue_7t) - *(.glue_7) - *(.gcc*) - } > flash +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > flash +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); - .ARM.exidx : { - PROVIDE(__exidx_start = .); - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - PROVIDE(__exidx_end = .); - } > flash - - .eh_frame_hdr : - { - *(.eh_frame_hdr) - } > flash - - .eh_frame : ONLY_IF_RO - { - *(.eh_frame) - } > flash - - .textalign : ONLY_IF_RO - { - . = ALIGN(8); - } > flash - - _etext = .; - _textdata = _etext; - - .stacks : - { - . = ALIGN(8); - __main_stack_base__ = .; - . += __main_stack_size__; - . = ALIGN(8); - __main_stack_end__ = .; - __process_stack_base__ = .; - __main_thread_stack_base__ = .; - . += __process_stack_size__; - . = ALIGN(8); - __process_stack_end__ = .; - __main_thread_stack_end__ = .; - } > ram - - .data : - { - . = ALIGN(4); - PROVIDE(_data = .); - *(.data) - . = ALIGN(4); - *(.data.*) - . = ALIGN(4); - *(.ramtext) - . = ALIGN(4); - PROVIDE(_edata = .); - } > ram AT > flash - - .bss : - { - . = ALIGN(4); - PROVIDE(_bss_start = .); - *(.bss) - . = ALIGN(4); - *(.bss.*) - . = ALIGN(4); - *(COMMON) - . = ALIGN(4); - PROVIDE(_bss_end = .); - } > ram -} +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); -PROVIDE(end = .); -_end = .; +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); -__heap_base__ = _end; -__heap_end__ = __ram_end__; +INCLUDE ld/rules_kinetis.ld -- 2.39.3