implements proper linker script to support TLS
This change updates the linker script and dependend wile so that thread local storage sections are properly supported and initailaized
This commit is contained in:
1 parent
6d5871687c
commit
1c9c00235d
7 files changed
+121
-175
No files matched your search
@@ -135,12 +135,12 @@ trap_handler:
|
||||
*/
|
||||
.global _tx_initialize_low_level
|
||||
.weak _tx_initialize_low_level
|
||||
.extern _end
|
||||
.extern __heap_start
|
||||
.extern board_init
|
||||
_tx_initialize_low_level:
|
||||
STORE sp, _tx_thread_system_stack_ptr, t0 // Save system stack pointer
|
||||
|
||||
la t0, _end // Pickup first free address
|
||||
la t0, __heap_start // Pickup first free address
|
||||
STORE t0, _tx_initialize_unused_memory, t1 // Save unused memory address
|
||||
li t0, MSTATUS_MIE
|
||||
csrrc zero, mstatus, t0 // clear MSTATUS_MIE bit
|
||||
|
||||
Reference in new issue
Block a user