Skip to content

Commit

Permalink
Espressif _thread_local_start and _thread_local_end fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed Oct 1, 2024
1 parent 984dd91 commit 75a676b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ extern wc_ptr_t _heap_start[];
extern wc_ptr_t _heap_end[];
extern wc_ptr_t _rtc_data_start[];
extern wc_ptr_t _rtc_data_end[];
extern void* _thread_local_start;
extern void* _thread_local_end;

#if defined(CONFIG_IDF_TARGET_ARCH_XTENSA) && CONFIG_IDF_TARGET_ARCH_XTENSA == 1
extern void* _thread_local_start;
extern void* _thread_local_end;
#endif

/* See https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map */
#define MEM_MAP_IO_START ((void*)(0x3FF00000))
Expand Down Expand Up @@ -186,7 +189,9 @@ int sdk_init_meminfo(void) {

sdk_log_meminfo(SDK_MEMORY_SEGMENT_COUNT, NULL, NULL); /* print header */
sdk_log_meminfo(mem_map_io, MEM_MAP_IO_START, MEM_MAP_IO_END);
#if defined(CONFIG_IDF_TARGET_ARCH_XTENSA) && CONFIG_IDF_TARGET_ARCH_XTENSA == 1
sdk_log_meminfo(thread_local, _thread_local_start, _thread_local_end);
#endif
sdk_log_meminfo(data, _data_start, _data_end);
sdk_log_meminfo(user_data_ram, USER_DATA_START, USER_DATA_END);
sdk_log_meminfo(bss, _bss_start, _bss_end);
Expand Down

0 comments on commit 75a676b

Please sign in to comment.