<?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: Loading Extended Hex File Causes HardFault, and unable to debug immediately after loading. in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1546409#M9338</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I suspect the problem in the debug session is caused by the fact the debugger set the PC to address 0x0 (see below). Typically this address is used for interrupt vector table and not for the application entry point. After reset PC is set to the reset vector and it works fine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_0-1667234218214.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/198652i81CF18FF7E1397C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_0-1667234218214.png" alt="stanish_0-1667234218214.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'd suggest to untick "set PC..." option and re-try again.&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 16:45:45 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2022-10-31T16:45:45Z</dc:date>
    <item>
      <title>Loading Extended Hex File Causes HardFault, and unable to debug immediately after loading.</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1315059#M9325</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61445"&gt;@nxp&lt;/a&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/57959"&gt;@Robin_Shen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Device : S32K148 EVB,&lt;/P&gt;&lt;P&gt;Environment S32KDS 2.2&lt;/P&gt;&lt;P&gt;Issue : Post build, generated Hex is extended to fill the required size of the allocated flash for the code section and updated with CRC code at last. But when this generated hex is used to flash, flashing seems to be successful, but immediately debugging is not possible. Can you let me know the issue here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is the log from console during flashing/debugging:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Connection from "127.0.0.1" via 127.0.0.1. Connection from port "50876" to 6224&lt;BR /&gt;Connection from "127.0.0.1" via 127.0.0.1. Connection from port "50878" to 7224&lt;BR /&gt;Telnet server running on 127.0.0.1:51794&lt;BR /&gt;Searching for FreeRTOS Kernel Symbols...&lt;BR /&gt;rsp_qC - qSymbol: 707843757272656E74544342&lt;BR /&gt;Symbol pxCurrentTCB found. (0x20002204)&lt;BR /&gt;rsp_qC - qSymbol: 707852656164795461736B734C69737473&lt;BR /&gt;Symbol pxReadyTasksLists found. (0x20002208)&lt;BR /&gt;rsp_qC - qSymbol: 7844656C617965645461736B4C69737431&lt;BR /&gt;Symbol xDelayedTaskList1 found. (0x2000226C)&lt;BR /&gt;rsp_qC - qSymbol: 7844656C617965645461736B4C69737432&lt;BR /&gt;Symbol xDelayedTaskList2 found. (0x20002280)&lt;BR /&gt;rsp_qC - qSymbol: 7850656E64696E6752656164794C697374&lt;BR /&gt;Symbol xPendingReadyList found. (0x2000229C)&lt;BR /&gt;rsp_qC - qSymbol: 757843757272656E744E756D6265724F665461736B73&lt;BR /&gt;Symbol uxCurrentNumberOfTasks found. (0x200022DC)&lt;BR /&gt;rsp_qC - qSymbol: 757844656C657465645461736B7357616974696E67436C65616E5570&lt;BR /&gt;Symbol uxDeletedTasksWaitingCleanUp found. (0x200022C4)&lt;BR /&gt;rsp_qC - qSymbol: 7853757370656E6465645461736B4C697374&lt;BR /&gt;Symbol xSuspendedTaskList found. (0x200022C8)&lt;BR /&gt;rsp_qC - qSymbol: 785363686564756C657252756E6E696E67&lt;BR /&gt;Symbol xSchedulerRunning found. (0x200022E8)&lt;BR /&gt;Successfully initialized kernel symbols. FreeRTOS analysis enabled.&lt;BR /&gt;Copyright 2018 P&amp;amp;E Microcomputer Systems,Inc.&lt;BR /&gt;Command Line :C:\NXP\S32DS_ARM_v2.2\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_4.8.6.202102101934\win32\pegdbserver_console -device=NXP_S32K1xx_S32K148F2M0M11 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=OPENSDA -speed=5000 &amp;lt;&lt;BR /&gt;OpenSDA detected - Flash Version 1.22&lt;BR /&gt;&lt;BR /&gt;CMD&amp;gt;RE&lt;BR /&gt;&lt;BR /&gt;Initializing.&lt;BR /&gt;Target has been RESET and is active.&lt;BR /&gt;CMD&amp;gt;CM C:\NXP\S32DS_ARM_v2.2\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_4.8.6.202102101934\win32\gdi\P&amp;amp;E\supportFiles_ARM\NXP\S32K1xx\freescale_s32k148f2m0m11_pflash_dflash_eeprom.arp&lt;BR /&gt;&lt;BR /&gt;Initializing.&lt;BR /&gt;Initialized.&lt;BR /&gt;&lt;BR /&gt;;version 1.06, 04/06/2020, Copyright 2020 P&amp;amp;E Microcomputer Systems, Inc. All rights reserved. &lt;A href="http://www.pemicro.com" target="_blank" rel="noopener"&gt;www.pemicro.com&lt;/A&gt; [s32k148f2m0m11_x_pflash_dflash_eeprom]&lt;BR /&gt;&lt;BR /&gt;;device freescale, s32k148f2m0m11, pflash_dflash_eeprom&lt;BR /&gt;&lt;BR /&gt;;begin_cs device=$00000000, length=$14001000, ram=$20000000&lt;BR /&gt;&lt;BR /&gt;Loading programming algorithm ...&lt;BR /&gt;Done.&lt;BR /&gt;Programming sequency is : erase, blank check, program, and verify {default}&lt;BR /&gt;CMD&amp;gt;VC&lt;BR /&gt;Verifying object file CRC-16 to device ranges ...&lt;BR /&gt;block 00000000-0017FFFF ...&lt;BR /&gt;Calculated CRC-16 does not match block. (File = $F382, Device = $9676)&lt;BR /&gt;Current content of flash does not match application to be programmed&lt;BR /&gt;&lt;BR /&gt;CMD&amp;gt;EM&lt;BR /&gt;&lt;BR /&gt;Erasing.&lt;BR /&gt;Module has been erased.&lt;BR /&gt;Reloading programming algorithm ...&lt;BR /&gt;done.&lt;BR /&gt;CMD&amp;gt;PM&lt;BR /&gt;&lt;BR /&gt;Programming.&lt;BR /&gt;Processing Object File Data ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.&lt;BR /&gt;Programmed.&lt;BR /&gt;CMD&amp;gt;VC&lt;BR /&gt;Verifying object file CRC-16 to device ranges ...&lt;BR /&gt;block 00000000-0017FFFF ...&lt;BR /&gt;Ok.&lt;BR /&gt;Checksum Verification Successful. (Cumulative CRC-16=$F382)&lt;BR /&gt;&lt;BR /&gt;CMD&amp;gt;RE&lt;BR /&gt;&lt;BR /&gt;Initializing.&lt;BR /&gt;Target has been RESET and is active.&lt;BR /&gt;Number of threads 1 (Scheduler not yet running)&lt;BR /&gt;Number of threads 1 (Scheduler not yet running)&lt;BR /&gt;Number of threads 1 (Scheduler not yet running)&lt;BR /&gt;Number of threads 1 (Scheduler not yet running)&lt;BR /&gt;UsageFault: The processor has attempted to execute an undefined instruction.&lt;BR /&gt;HardFault: A fault has been escalated to a hard fault.&lt;BR /&gt;Kernel thread information now available.&lt;BR /&gt;DelayedTaskList1&lt;BR /&gt;uxNumberOfItems - 14549214&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is B&amp;#20;¿ïó ?ïó&amp;#8;?&amp;#6;H&amp;#1;`&amp;#3;&lt;BR /&gt;Task name is&lt;BR /&gt;Task name is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task name prints(junk) are continuous on the console output. Once the target is power reset, I am able to debug without loading flash, and device seems to executing the right code. Why doesn't the debugging work right away after flashing as in the generated hex/elf flashing case?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Debug/Flash Configuration settings:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijay_Arwapally_0-1627540968354.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151174i22E17B52DE62C313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vijay_Arwapally_0-1627540968354.png" alt="Vijay_Arwapally_0-1627540968354.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijay_Arwapally_1-1627540993100.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151175i6D00FB8CF6DCF3A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vijay_Arwapally_1-1627540993100.png" alt="Vijay_Arwapally_1-1627540993100.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijay_Arwapally_2-1627541021208.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151176iA16214BC39ABA547/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vijay_Arwapally_2-1627541021208.png" alt="Vijay_Arwapally_2-1627541021208.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached are the build generated hex and extended hex files.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 07:15:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1315059#M9325</guid>
      <dc:creator>Vijay_Arwapally</dc:creator>
      <dc:date>2021-07-29T07:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Extended Hex File Causes HardFault, and unable to debug immediately after loading.</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1319944#M9326</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61445"&gt;@nxp&lt;/a&gt;&amp;nbsp; any hints?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 15:26:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1319944#M9326</guid>
      <dc:creator>Vijay_Arwapally</dc:creator>
      <dc:date>2021-08-07T15:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Extended Hex File Causes HardFault, and unable to debug immediately after loading.</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1546409#M9338</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I suspect the problem in the debug session is caused by the fact the debugger set the PC to address 0x0 (see below). Typically this address is used for interrupt vector table and not for the application entry point. After reset PC is set to the reset vector and it works fine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_0-1667234218214.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/198652i81CF18FF7E1397C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_0-1667234218214.png" alt="stanish_0-1667234218214.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'd suggest to untick "set PC..." option and re-try again.&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 16:45:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1546409#M9338</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2022-10-31T16:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Extended Hex File Causes HardFault, and unable to debug immediately after loading.</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1789578#M11713</link>
      <description>&lt;P&gt;Did you ever get to fixing this? I'm facing the exact same problem but the suggested fix didn't help, sadly&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:01:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Loading-Extended-Hex-File-Causes-HardFault-and-unable-to-debug/m-p/1789578#M11713</guid>
      <dc:creator>egn_lehmann</dc:creator>
      <dc:date>2024-01-16T15:01:20Z</dc:date>
    </item>
  </channel>
</rss>

