mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[bootloader] Added dual boot
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
/* Same as flash.ld but everything is linked in internal flash */
|
||||
|
||||
MEMORY {
|
||||
INTERNAL_FLASH (rx) : ORIGIN = 0x00200000, LENGTH = 64K
|
||||
INTERNAL_FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
|
||||
SRAM (rw) : ORIGIN = 0x20000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
STACK_SIZE = 32K;
|
||||
TRAMPOLINES_OFFSET = 0xE000;
|
||||
FLASH_SECOND_SECTOR_OFFSET = 16K;
|
||||
FLASH_SECOND_SECTOR_SIZE = 16K;
|
||||
|
||||
SECTIONS {
|
||||
.isr_vector_table ORIGIN(INTERNAL_FLASH) : {
|
||||
@@ -30,6 +32,20 @@ SECTIONS {
|
||||
KEEP(*(.header))
|
||||
} >INTERNAL_FLASH
|
||||
|
||||
.rodata : {
|
||||
. = ALIGN(4);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
} >INTERNAL_FLASH
|
||||
|
||||
.exam_mode_buffer ORIGIN(INTERNAL_FLASH) + FLASH_SECOND_SECTOR_OFFSET : {
|
||||
_exam_mode_buffer_start = .;
|
||||
KEEP(*(.exam_mode_buffer))
|
||||
/* Note: We don't increment "." here, we set it. */
|
||||
. = ORIGIN(INTERNAL_FLASH) + FLASH_SECOND_SECTOR_OFFSET + FLASH_SECOND_SECTOR_SIZE;
|
||||
_exam_mode_buffer_end = .;
|
||||
} >INTERNAL_FLASH
|
||||
|
||||
.text : {
|
||||
. = ALIGN(4);
|
||||
*(.text)
|
||||
@@ -43,12 +59,6 @@ SECTIONS {
|
||||
_init_array_end = .;
|
||||
} >INTERNAL_FLASH
|
||||
|
||||
.rodata : {
|
||||
. = ALIGN(4);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
} >INTERNAL_FLASH
|
||||
|
||||
.data : {
|
||||
/* The data section is written to Flash but linked as if it were in RAM.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user