From 47e026006e6b45fd425c973280f6cfbabaa64180 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Wed, 2 May 2018 01:05:40 +0200 Subject: [PATCH] Forgot to fix linker errors for both linker scripts in: https://github.com/UltimateHackingKeyboard/firmware/pull/104/commits/e0528e1714fc3796763b14c73e8b3fb43dbffeef --- right/build/MK22FN512xxx12_flash.original.ld | 29 ++++++++------------ 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/right/build/MK22FN512xxx12_flash.original.ld b/right/build/MK22FN512xxx12_flash.original.ld index 0dbdcee..bf498dd 100644 --- a/right/build/MK22FN512xxx12_flash.original.ld +++ b/right/build/MK22FN512xxx12_flash.original.ld @@ -204,21 +204,27 @@ SECTIONS text_end = ORIGIN(m_text) + LENGTH(m_text); ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") - USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800; /* Uninitialized data section */ - .bss : + .bss : ALIGN(4) { /* This is used by the startup in order to initialize the .bss section */ - . = ALIGN(4); __START_BSS = .; __bss_start__ = .; *(.bss) *(.bss*) - . = ALIGN(512); - USB_RAM_START = .; - . += USB_RAM_GAP; *(COMMON) . = ALIGN(4); + } > m_data + + .m_usb_bdt (NOLOAD) : + { + . = ALIGN(512); + *(m_usb_bdt) + } > m_data + + .m_usb_global (NOLOAD) : + { + *(m_usb_global) __bss_end__ = .; __END_BSS = .; } > m_data @@ -247,17 +253,6 @@ SECTIONS . += STACK_SIZE; } > m_data_2 - m_usb_bdt USB_RAM_START (NOLOAD) : - { - *(m_usb_bdt) - USB_RAM_BDT_END = .; - } - - m_usb_global USB_RAM_BDT_END (NOLOAD) : - { - *(m_usb_global) - } - /* Initializes stack on the end of block */ __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2); __StackLimit = __StackTop - STACK_SIZE;