mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
toolchain: C++ exception workaround
* disable C++ exception FDE sorting (saves RAM) Closes IDF-1128
This commit is contained in:

committed by
Anton Maklakov

parent
1797fa7716
commit
8329d51fd0
@@ -108,6 +108,11 @@ struct object { long placeholder[ 10 ]; };
|
||||
void __register_frame_info (const void *begin, struct object *ob);
|
||||
extern char __eh_frame[];
|
||||
|
||||
#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
// workaround for C++ exception large memory allocation
|
||||
void _Unwind_SetEnableExceptionFdeSorting(unsigned char enable);
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
|
||||
//If CONFIG_SPIRAM_IGNORE_NOTFOUND is set and external RAM is not found or errors out on testing, this is set to false.
|
||||
static bool s_spiram_okay=true;
|
||||
|
||||
@@ -382,6 +387,12 @@ void start_cpu0_default(void)
|
||||
assert(err == ESP_OK && "Failed to init pthread module!");
|
||||
|
||||
do_global_ctors();
|
||||
|
||||
#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
ESP_EARLY_LOGD(TAG, "Setting C++ exception workarounds.");
|
||||
_Unwind_SetEnableExceptionFdeSorting(0);
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
|
||||
#if CONFIG_ESP_INT_WDT
|
||||
esp_int_wdt_init();
|
||||
//Initialize the interrupt watch dog for CPU0.
|
||||
|
Reference in New Issue
Block a user