<?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>MQX Software SolutionsのトピックHard Fault When Jumping to MQXv5 Application From Bootloader</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hard-Fault-When-Jumping-to-MQXv5-Application-From-Bootloader/m-p/1340709#M18675</link>
    <description>&lt;P&gt;I currently have an application using MQXv5 on a custom K66-based board that executes just fine unless I relocate the code from a base of 0x0000 to a base of 0xF000 (to accommodate a bootloader) and then jump to the application entry point (__boot) from the bootloader.&lt;/P&gt;&lt;P&gt;I am using IAR EWARM 9.10 as my IDE.&lt;/P&gt;&lt;P&gt;When jumping to the code from the bootloader, the application raises a hard fault early in the initialization process.&lt;/P&gt;&lt;P&gt;More specifically, a hard fault is raised in __iar_data_init3 due to a data access error.&lt;/P&gt;&lt;P&gt;The Bus Fault Address Register - BFAR - indicates an address of 0x3b10e&lt;BR /&gt;The Vector Table Offset Register - VTOR - indicates an address of 0x1fff0000&lt;/P&gt;&lt;P&gt;From the linker map file for my application:&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="2"&gt;"P1", part 2 of 2:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x136&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b001 0x10d &amp;lt;for P3 mid-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b10e 0x26&amp;nbsp; &amp;lt;for rw section .vectors_ram-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b134 0x3&amp;nbsp; &amp;nbsp;&amp;lt;for KERNEL_DATA-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 0x3'b137 0x136&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="2"&gt;"A1":&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x400&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;rw section .vectors_ram-1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x1fff'0000 0x400 &amp;lt;Init block&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .vectors_ram inited 0x1fff'0000 0x400 vectors.o [4]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 0x1fff'0400 0x400&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;My linker file is attached.&lt;/P&gt;&lt;P&gt;Any idea what might be causing the data access error when running the app from the bootloader or what I might do next to further debug the issue?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 15:08:29 GMT</pubDate>
    <dc:creator>BTaylor</dc:creator>
    <dc:date>2021-09-15T15:08:29Z</dc:date>
    <item>
      <title>Hard Fault When Jumping to MQXv5 Application From Bootloader</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hard-Fault-When-Jumping-to-MQXv5-Application-From-Bootloader/m-p/1340709#M18675</link>
      <description>&lt;P&gt;I currently have an application using MQXv5 on a custom K66-based board that executes just fine unless I relocate the code from a base of 0x0000 to a base of 0xF000 (to accommodate a bootloader) and then jump to the application entry point (__boot) from the bootloader.&lt;/P&gt;&lt;P&gt;I am using IAR EWARM 9.10 as my IDE.&lt;/P&gt;&lt;P&gt;When jumping to the code from the bootloader, the application raises a hard fault early in the initialization process.&lt;/P&gt;&lt;P&gt;More specifically, a hard fault is raised in __iar_data_init3 due to a data access error.&lt;/P&gt;&lt;P&gt;The Bus Fault Address Register - BFAR - indicates an address of 0x3b10e&lt;BR /&gt;The Vector Table Offset Register - VTOR - indicates an address of 0x1fff0000&lt;/P&gt;&lt;P&gt;From the linker map file for my application:&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="2"&gt;"P1", part 2 of 2:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x136&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b001 0x10d &amp;lt;for P3 mid-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b10e 0x26&amp;nbsp; &amp;lt;for rw section .vectors_ram-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;Initializer bytes&amp;nbsp; &amp;nbsp;const&amp;nbsp; &amp;nbsp;0x3'b134 0x3&amp;nbsp; &amp;nbsp;&amp;lt;for KERNEL_DATA-1&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 0x3'b137 0x136&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="2"&gt;"A1":&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x400&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;rw section .vectors_ram-1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x1fff'0000 0x400 &amp;lt;Init block&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .vectors_ram inited 0x1fff'0000 0x400 vectors.o [4]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 0x1fff'0400 0x400&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;My linker file is attached.&lt;/P&gt;&lt;P&gt;Any idea what might be causing the data access error when running the app from the bootloader or what I might do next to further debug the issue?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 15:08:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hard-Fault-When-Jumping-to-MQXv5-Application-From-Bootloader/m-p/1340709#M18675</guid>
      <dc:creator>BTaylor</dc:creator>
      <dc:date>2021-09-15T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault When Jumping to MQXv5 Application From Bootloader</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hard-Fault-When-Jumping-to-MQXv5-Application-From-Bootloader/m-p/1344870#M18676</link>
      <description>&lt;P&gt;Hi Coldfirefan:&lt;/P&gt;
&lt;P&gt;MQX v5 is under commercial license. I would suggest you contact with &lt;A href="mailto:mqxsales@nxp.com" target="_blank"&gt;mqxsales@nxp.com&lt;/A&gt;&amp;nbsp;for support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By default, MQX allocates the vector tale at the first address of the flash memory, 0x0000-0000, Because this region of flash memory is used by your bootloader, it&amp;nbsp; will be necessary to reallocate the vector table in a RAM section.&lt;/P&gt;
&lt;P&gt;Please refer to AN4367 for more details. This application note describes how to add the FENT bootloader to kinetis projects. There is a section that includes adding it to the MQX linker which is the section you will find useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 08:19:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hard-Fault-When-Jumping-to-MQXv5-Application-From-Bootloader/m-p/1344870#M18676</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2021-09-23T08:19:12Z</dc:date>
    </item>
  </channel>
</rss>

