<?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: LPC54016 setuping FreeRTOS, Stuck at SVC 0 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2345517#M59500</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've resolved the stuck SVC 0 error and hard faults. I also found out why local debugging via USB in MCUXpresso works, while the same setup through LinkServer does not.&lt;/P&gt;&lt;P&gt;The local configuration performs a hard reset every time the firmware is uploaded. I couldn’t find a way to do the same with LinkServer, so before each flash, I power-cycle the PSU via LXI.&lt;/P&gt;&lt;P&gt;I also found and fixed another strange issue. This project is also ported to CLion, where I use a .gdbinit file for flashing the firmware. Initially, I used the load command, but it didn’t work as expected — the firmware was flashed, but execution would get stuck in unusual places.&lt;/P&gt;&lt;P&gt;When using LinkServer, I had to manually stop execution, run load, and then continue from the GDB console for it to work properly. So I tried OpenOCD instead, and it worked as expected — the load command in .gdbinit worked correctly without any extra steps.&lt;/P&gt;</description>
    <pubDate>Sun, 05 Apr 2026 22:01:36 GMT</pubDate>
    <dc:creator>TomaszTheSnail</dc:creator>
    <dc:date>2026-04-05T22:01:36Z</dc:date>
    <item>
      <title>LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2323920#M59419</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I’m having trouble setting up FreeRTOS on the LPC54016. I copied the LPC540S18 SDK example freertos_hello, then changed the MCU and memory layout to match the LPC54016. The project works without FreeRTOS.&amp;nbsp;After enabling FreeRTOS, it gets stuck in xPortStartScheduler() at SVC 0 and never reaches SVC_Handler. Sometimes it ends up in HardFault_Handler.&lt;/P&gt;&lt;P&gt;Here’s what I’ve checked and tried so far:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Disassembled SVC_Handler — it resolves to vPortSVCHandler.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The address in the interrupt vector table matches the address of SVC_Handler.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;I can’t access VTOR from GDB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;MCUXpresso IDE project:&lt;BR /&gt;&lt;A href="https://github.com/kacpereqo/LPC54016-RTOS" target="_blank" rel="noopener"&gt;https://github.com/kacpereqo/LPC54016-RTOS&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2026 17:28:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2323920#M59419</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-02-26T17:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324148#M59420</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260255"&gt;@TomaszTheSnail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the&amp;nbsp;LPC54016, you can download the LPC54016 SDK directly.&lt;/P&gt;
&lt;DIV id="tinyMceEditorHarry_Zhang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2026-02-27_14-45-09.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/377967i445AE5E92BA2BAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snipaste_2026-02-27_14-45-09.png" alt="Snipaste_2026-02-27_14-45-09.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And then create a lpc54016 freertos demo.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2026-02-27_14-46-30.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/377969i240C544950EF0AAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snipaste_2026-02-27_14-46-30.png" alt="Snipaste_2026-02-27_14-46-30.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 06:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324148#M59420</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-02-27T06:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324741#M59422</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hi &amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks for the response. I have the SDK downloaded manually, every setting is default and I am using the FreeRTOS kernel files from it, but I am running into a specific runtime issue during the scheduler startup.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;(gdb) x/i $pc&lt;BR /&gt;=&amp;gt; 0xa3a &amp;lt;prvPortStartFirstTask+30&amp;gt;: svc 0&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0 0x00000a3a in prvPortStartFirstTask ()&lt;BR /&gt;at ../freertos/freertos-kernel/portable/GCC/ARM_CM4F/port.c:285&lt;BR /&gt;#1 0x00000be0 in xPortStartScheduler ()&lt;BR /&gt;at ../freertos/freertos-kernel/portable/GCC/ARM_CM4F/port.c:452&lt;BR /&gt;Backtrace stopped: previous frame inner to this frame (corrupt stack?)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;As shown in the GDB trace above, the application halts at &lt;/SPAN&gt;&lt;SPAN class=""&gt;prvPortStartFirstTask&lt;/SPAN&gt;&lt;SPAN class=""&gt; on the &lt;/SPAN&gt;&lt;SPAN class=""&gt;svc 0&lt;/SPAN&gt;&lt;SPAN class=""&gt; instruction&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Mar 2026 19:41:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324741#M59422</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-03-01T19:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324776#M59423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260255"&gt;@TomaszTheSnail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share your project so that i can try it?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2026 03:09:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2324776#M59423</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-03-02T03:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2325179#M59424</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is compressed MCUXEspresso project&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2026 20:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2325179#M59424</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-03-02T20:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326064#M59430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260255"&gt;@TomaszTheSnail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested it on my end.&lt;/P&gt;
&lt;P&gt;It can work.&lt;/P&gt;
&lt;P&gt;I added some code to output content in my serial port.&lt;/P&gt;
&lt;DIV id="tinyMceEditorHarry_Zhang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2026-03-04_16-28-26.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/378310i1BD747B56E6BC58A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snipaste_2026-03-04_16-28-26.png" alt="Snipaste_2026-03-04_16-28-26.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2026-03-04_16-28-41.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/378311iA844F0976447C20C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snipaste_2026-03-04_16-28-41.png" alt="Snipaste_2026-03-04_16-28-41.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 08:30:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326064#M59430</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-03-04T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326134#M59432</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you said that the same configuration works for you but not for me, the only thing we might be doing differently is the debugging interface. I’m debugging via LinkServer and GDB hardware debugging—could the issue be there?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 09:29:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326134#M59432</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-03-04T09:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326236#M59433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260255"&gt;@TomaszTheSnail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I think there may be an issue with your debugger.&lt;/P&gt;
&lt;P&gt;You can create a bare metal project and see if it can be debugged properly.&lt;/P&gt;
&lt;P&gt;If debugging is also not possible, it proves that there is a problem with the debugger.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 09:43:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326236#M59433</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-03-04T09:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326606#M59435</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I tried it locally, and it resulted in a successful run of FreeRTOS. However, another weird issue occurred — the handler below crashed and went to HardFault_Handler. I resolved it by commenting out CTIMER0_DriverIRQHandler():&lt;/P&gt;&lt;LI-CODE lang="c"&gt;WEAK void CTIMER0_IRQHandler(void) { 
CTIMER0_DriverIRQHandler();
}&lt;/LI-CODE&gt;&lt;P&gt;But I have one question: why does debugging locally with the same setup not work the same way as LinkServer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My setup:&lt;/P&gt;&lt;P&gt;Probe:&amp;nbsp;MCU-LINK (r0FB) CMSIS-DAP V3.165&lt;/P&gt;&lt;P&gt;Linkserver Launch commands :&amp;nbsp;LinkServer gdbserver LPC54016 --allow-remote --keep-alive&lt;/P&gt;&lt;P&gt;MCU: LPC54016JBD100&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 22:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2326606#M59435</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-03-04T22:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2327571#M59438</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260255"&gt;@TomaszTheSnail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think although you are using the same probe (MCU-LINK CMSIS-DAP), the initialization script for the GDB server is different. The CPU startup status may be completely different.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 06:48:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2327571#M59438</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2026-03-06T06:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2337033#M59474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I couldn’t find any differences in the configuration between &lt;STRONG&gt;C/C++ (NXP Semiconductors) MCU Application &amp;gt; LinkServer Debug&lt;/STRONG&gt; and &lt;STRONG&gt;LinkServer + GDB&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I would appreciate it if you could try this setup on your side to help determine whether the issue is specific to my environment.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Mar 2026 13:44:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2337033#M59474</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-03-21T13:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54016 setuping FreeRTOS, Stuck at SVC 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2345517#M59500</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've resolved the stuck SVC 0 error and hard faults. I also found out why local debugging via USB in MCUXpresso works, while the same setup through LinkServer does not.&lt;/P&gt;&lt;P&gt;The local configuration performs a hard reset every time the firmware is uploaded. I couldn’t find a way to do the same with LinkServer, so before each flash, I power-cycle the PSU via LXI.&lt;/P&gt;&lt;P&gt;I also found and fixed another strange issue. This project is also ported to CLion, where I use a .gdbinit file for flashing the firmware. Initially, I used the load command, but it didn’t work as expected — the firmware was flashed, but execution would get stuck in unusual places.&lt;/P&gt;&lt;P&gt;When using LinkServer, I had to manually stop execution, run load, and then continue from the GDB console for it to work properly. So I tried OpenOCD instead, and it worked as expected — the load command in .gdbinit worked correctly without any extra steps.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2026 22:01:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54016-setuping-FreeRTOS-Stuck-at-SVC-0/m-p/2345517#M59500</guid>
      <dc:creator>TomaszTheSnail</dc:creator>
      <dc:date>2026-04-05T22:01:36Z</dc:date>
    </item>
  </channel>
</rss>

