Support Thread Local Storage (TLS)
hmmdyl opened this issue · comments
Dylan Graham commented
Thread Local Storage (TLS) is not supported. TLS is reliant on RTOS support - TLS variables are allocated in a heap and the pointer is stored in the RTOS' Thread Control Block (TCB). __aeabi_read_tp
must then read this pointer.
Dylan Graham commented
TLS support is complete (but not committed).
I needed to add support to my linker script with the following:
.tdata :
{
. = ALIGN(4);
_tdata = .;
*(.tdata)
*(.tdata*)
. = ALIGN(4);
} >FLASH
_tdata_size = SIZEOF(.tdata);
.tbss :
{
. = ALIGN(4);
_tbss = .;
*(.tbss)
*(.tbss.*)
*(.tcommon)
_etbss = .;
. = ALIGN(4);
} >FLASH
_tbss_size = SIZEOF(.tbss);
This is based on the work from denizzzka.
Dylan Graham commented
Fixed in commit #8067eb7