JTAG Optimized to unusable
Posted: Wed Oct 28, 2020 7:50 pm
How do I limit/Prohibit the optimization in the IDF successfully . According to the GCC on line manual, __attribute__((optimize("O0"))) should stop all optimization in that module, When I get there with GDB and JTAG, The names are gone.
I do not see a strip statement in the build. It would be nice to be able to know what the code is doing.
Thread 2 hit Breakpoint 3, sendData (logName=<optimized out>, L_Data=<optimized out>) at ../main/SerialTasks.c:73
73 Osize = strlen(OutBuffer);
(gdb) list
68 void __attribute__((optimize("O0"))) sendData(const char* logName, const char* L_Data)
69 {
70 const int len = strlen(L_Data);
71 int Osize = 0;
72 ESP_LOGW("SD","Called with 0x%08x, for %d \n", (uint32_t)L_Data, len );
73 Osize = strlen(OutBuffer);
74 ESP_LOGW("SD","Buffer has %d \n", Osize );
75 // See if we can obtain the semaphore. If the semaphore is not available
76 // wait 10 ticks to see if it becomes free.
77 ESP_LOGW("SD","Called with ::%s:: tag ::%s:: \n", L_Data, logName );
78 if( xSemaphoreTake( xSemaphore, ( TickType_t ) 10 ) == pdTRUE )
(gdb) print len
$1 = <optimized out>
I do not see a strip statement in the build. It would be nice to be able to know what the code is doing.
Thread 2 hit Breakpoint 3, sendData (logName=<optimized out>, L_Data=<optimized out>) at ../main/SerialTasks.c:73
73 Osize = strlen(OutBuffer);
(gdb) list
68 void __attribute__((optimize("O0"))) sendData(const char* logName, const char* L_Data)
69 {
70 const int len = strlen(L_Data);
71 int Osize = 0;
72 ESP_LOGW("SD","Called with 0x%08x, for %d \n", (uint32_t)L_Data, len );
73 Osize = strlen(OutBuffer);
74 ESP_LOGW("SD","Buffer has %d \n", Osize );
75 // See if we can obtain the semaphore. If the semaphore is not available
76 // wait 10 ticks to see if it becomes free.
77 ESP_LOGW("SD","Called with ::%s:: tag ::%s:: \n", L_Data, logName );
78 if( xSemaphoreTake( xSemaphore, ( TickType_t ) 10 ) == pdTRUE )
(gdb) print len
$1 = <optimized out>