Fixed: errno update failure with IAR8.2

errno (part of thread local storage) setting caused hardfault with IAR8.x
versions. TLS is not supported, hence using main thread TLS area for
all threads.
pull/5525/head
Deepika 2017-11-17 13:08:14 -06:00
parent 1566395323
commit 83409c5af3
1 changed files with 5 additions and 1 deletions

View File

@ -936,7 +936,11 @@ extern "C" WEAK void __iar_file_Mtxdst(__iar_Rmtx *mutex) {}
extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {} extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {}
extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {} extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {}
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000) #if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
extern "C" WEAK void *__aeabi_read_tp (void) { return NULL ;} #pragma section="__iar_tls$$DATA"
extern "C" WEAK void *__aeabi_read_tp (void) {
// Thread Local storage is not supported, using main thread memory for errno
return __section_begin("__iar_tls$$DATA");
}
#endif #endif
#elif defined(__CC_ARM) #elif defined(__CC_ARM)
// Do nothing // Do nothing