<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot debug in a static library in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1584628#M8680</link>
    <description>&lt;P&gt;0x1FFF_0042 is somewhere in the memory area reserved for boot ROM. If you're trying to Step Over (F6) when core is stopped there, failure of "&lt;SPAN&gt;-exec-next 1" is somehow expected... GDB does not have the appropriate debug information to cover the boot ROM code area, so it cannot step over anything.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Without having any kind of knowledge about your app, I cannot say what could be wrong... I recommend inspecting the Disassembly view to understand what makes the debugger end-up in the boot ROM area. Also, you could activate Instruction Stepping in Debug view and single step (F5) instructions. Is the expected function/point reached eventually?&lt;/P&gt;
&lt;P&gt;Also, is there any chance there's some kind of watchdog resetting the MCU when stepping? Or maybe there's something else causing a reset.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;MCUXpresso IDE Support&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 13:06:25 GMT</pubDate>
    <dc:creator>lpcxpresso_supp</dc:creator>
    <dc:date>2023-01-20T13:06:25Z</dc:date>
    <item>
      <title>Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1577046#M8639</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;The very simplified code looks like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int main(void) {
    while(1) {
        lib_func();
    }
}

// my_lib.a

int lib_func(void) {
    some_func(); // here the debug fails
}

int some_func(void) {
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Failed to execute MI command:&amp;nbsp;&lt;BR /&gt;-exec-next 1&lt;BR /&gt;Error message from debugger back end:&lt;BR /&gt;Cannot find bounds of current function&lt;/P&gt;&lt;P&gt;That what I see in the debug tab:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 530px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206053i105AD5279F3D7393/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As for me it looks that the library has no debug symbols.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application MCU compiler options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;-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="$(&amp;lt;D)/"= -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application MCU Linker options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;-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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The library MCU compiler options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-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="$(&amp;lt;D)/"= -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 10:26:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1577046#M8639</guid>
      <dc:creator>ruslan1</dc:creator>
      <dc:date>2023-01-04T10:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1577120#M8640</link>
      <description>&lt;P&gt;I don't see anything wrong, but maybe you could share your .a file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The debugger message looks like a problem in gdb with that 'empty' library function. Have you maybe tried the same with IDE 11.6.1 as it comes with a newer GNU toolchain and debugger?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 12:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1577120#M8640</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-01-04T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1583919#M8670</link>
      <description>&lt;P&gt;Ok, it looks that debugger just steps to some space out of the application. I don't understand why. It stops on any breakpoint (in the application or in the library) but when I press F6 it just jumps out (see the red arrow on the screenshot).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 10:37:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1583919#M8670</guid>
      <dc:creator>ruslan1</dc:creator>
      <dc:date>2023-01-17T10:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1583920#M8671</link>
      <description>&lt;P&gt;I've upgraded the IDE to the last version but that didn't help.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 10:41:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1583920#M8671</guid>
      <dc:creator>ruslan1</dc:creator>
      <dc:date>2023-01-17T10:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1584390#M8675</link>
      <description>&lt;P&gt;it would be certainly helpful if you could provide a minimal reproducible example.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 06:41:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1584390#M8675</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-01-18T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot debug in a static library</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1584628#M8680</link>
      <description>&lt;P&gt;0x1FFF_0042 is somewhere in the memory area reserved for boot ROM. If you're trying to Step Over (F6) when core is stopped there, failure of "&lt;SPAN&gt;-exec-next 1" is somehow expected... GDB does not have the appropriate debug information to cover the boot ROM code area, so it cannot step over anything.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Without having any kind of knowledge about your app, I cannot say what could be wrong... I recommend inspecting the Disassembly view to understand what makes the debugger end-up in the boot ROM area. Also, you could activate Instruction Stepping in Debug view and single step (F5) instructions. Is the expected function/point reached eventually?&lt;/P&gt;
&lt;P&gt;Also, is there any chance there's some kind of watchdog resetting the MCU when stepping? Or maybe there's something else causing a reset.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;MCUXpresso IDE Support&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 13:06:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-debug-in-a-static-library/m-p/1584628#M8680</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2023-01-20T13:06:25Z</dc:date>
    </item>
  </channel>
</rss>

