From 12845efe524e2262e19fcb1e85697c4664e22b2f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 8 Dec 2022 14:01:09 -0700 Subject: Add broken linker stuff to test on desktop. --- linker/linker_script.ld | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'linker') diff --git a/linker/linker_script.ld b/linker/linker_script.ld index d6ce40b..bec8fb7 100644 --- a/linker/linker_script.ld +++ b/linker/linker_script.ld @@ -8,11 +8,15 @@ MEMORY SECTIONS { /* This is where the code goes. */ + WAT = ORIGIN(flash); . = ORIGIN(flash); - .text ALIGN(0x100) : { + TEXT_START = .; + .text ALIGN(0x04) : { *(.vectors); /* All .vector sections go here. */ *(.text); /* All .text sections go here. */ } >flash + TEXT_STOP = .; + . = ALIGN(0x04); .data : ALIGN(0x04) { /* Data segment as defined in the flash. */ @@ -24,9 +28,11 @@ SECTIONS *(.data); DATA_SEGMENT_STOP = .; - INIT_ROUTINES_FLASH_START = - LOADADDR(.data) + (DATA_SEGMENT_STOP - DATA_SEGMENT_START); - + /* INIT_ROUTINES_FLASH_START = + LOADADDR(.data) + (DATA_SEGMENT_STOP - DATA_SEGMENT_START); + */ + . = ALIGN(0x1c); + INIT_ROUTINES_FLASH_START = .; INITS_START = .; *(.init0); INIT_0_END = ABSOLUTE(INIT_ROUTINES_FLASH_START) + (. - INITS_START); -- cgit