diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-04 23:53:44 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-04 23:53:44 +0100 |
commit | ec96951943921b57ef9c1e9dacb63e34716fe5b7 (patch) | |
tree | c85d1c0a063712459ad12144900eb522b39ef7a0 /cmake/stm32.ld | |
parent | baedda497d16c5096971eee83a0c467fe663fe6d (diff) | |
download | stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.gz stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.bz2 stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.xz stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.zip |
o Actually working implementation of context switching.
It is important to remember to update the stack to the task descriptor on every switch!
Diffstat (limited to 'cmake/stm32.ld')
-rw-r--r-- | cmake/stm32.ld | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cmake/stm32.ld b/cmake/stm32.ld index fc69574..bafd520 100644 --- a/cmake/stm32.ld +++ b/cmake/stm32.ld @@ -16,7 +16,7 @@ SECTIONS { /* The first word has to be the initial stack pointer */ LONG(__initial_stack_pointer); - */init_high.cpp.obj(.isr_vectors) + KEEP(*/init_high.cpp.obj(.isr_vectors)) } >FLASH ASSERT(SIZEOF(.isr) > 100, "The isr_vectors section is too small") ASSERT(SIZEOF(.isr) < 1000, "The isr_vectors section is too big") @@ -29,11 +29,20 @@ SECTIONS *(.rodata*) } >FLASH + .init_arrays : + { + _init_array_start = .; + KEEP(*(.init_array)) + KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*))) + _init_array_end = .; + } >FLASH + . = ORIGIN(RAM); .data ALIGN(4) : { - *(.data*) + *(.data) + *(.data.*) } >RAM AT >FLASH .bss ALIGN(4) (NOLOAD) : |