I try to debug my application that runs on LPC11C24 chip using MCUxpresso 11.5. The application uses a static library that encapsulates some functions. Both application and the library are in Debug mode The debug level is Maximum (-g3) for both of them.
The very simplified code looks like the following:
int main(void) {
while(1) {
lib_func();
}
}
// my_lib.a
int lib_func(void) {
some_func(); // here the debug fails
}
int some_func(void) {
}
I can debug the application but for some reason what I enter the function and try to step it with F6 the debugging failed with error:
Failed to execute MI command:
-exec-next 1
Error message from debugger back end:
Cannot find bounds of current function
That what I see in the debug tab:

As for me it looks that the library has no debug symbols.
The application MCU compiler options:
-DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11xx -D__REDLIB__ -I"F:\source\my_lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fmerge-constants -fmacro-prefix-map="$(<D)/"= -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs
The application MCU Linker options:
-nostdlib -L"F:\source\my_lib\Debug" -Xlinker -Map="my_app.map" -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "my_app.ld" -L ../linker
The library MCU compiler options:
-DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11xx -D__REDLIB__ -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fmerge-constants -fmacro-prefix-map="$(<D)/"= -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs