From dbbe83bd8882fe18e26f6305a1f425145bfea8db Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 26 Oct 2021 00:04:44 -0600 Subject: Fixed annoying bug with bootup when compiling with new GCC. The problem was the BSS segment was not aligned with size 4, thus the routine to clear the BSS segment was infinite looping, clobbering everything in it's wake until it ran off the memory edge and caused a hard fault. This commit does a couple of things. 1. Fixes the alignment issue in the linker script 2. Panics if the bss/data segments are not aligned properly 3. Makes the logging the _first_ thing to initialize. Much easier to debug that way! --- linker/linker_script.ld | 1 + 1 file changed, 1 insertion(+) (limited to 'linker') diff --git a/linker/linker_script.ld b/linker/linker_script.ld index f2a99ae..1817fbd 100644 --- a/linker/linker_script.ld +++ b/linker/linker_script.ld @@ -55,6 +55,7 @@ SECTIONS } >sram1 AT>flash + . = ALIGN(0x04); BSS_START = .; .bss : { *(.bss); -- cgit