<?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のトピックRe: Bootloader: problems with starting MQX app</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311547#M10014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;By default, MQX allocates the vector table at the first address of the flash memory, 0x0000-0000. Because this region of flash memory is used by the your bootloader, it will be necessary to reallocate the vector table in a RAM section.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;I want to believe that this appnote can be a guideline for your application: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;This appnote describes how to add the FNET bootloader to Kinetis projects. There is a section that includes adding it to the MQX linker which is the section that I believe you will find useful. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Regards &lt;BR /&gt; Sol&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2014 16:32:39 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2014-05-08T16:32:39Z</dc:date>
    <item>
      <title>Bootloader: problems with starting MQX app</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311546#M10013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I want to update my mcu software with serial port. So i created a bootloader using processor expert for uploading S19 records to flash. For testing a bootloader i created a test program with processor expert. The bootloader with the test programm works fine, but now i have problem with starting my main MQX application. I prepared the MQX project, but my main application doesn't start:&lt;/P&gt;&lt;P&gt;1) set vector table of main application to be placed in RAM in user_config.h and builded BSP and PSP libraries:&lt;/P&gt;&lt;P&gt;#define MQX_ROM_VECTORS&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;2) created new linker file:&lt;/P&gt;&lt;P&gt;shifted the adresses:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;bootloader&lt;/TD&gt;&lt;TD&gt;(RX): ORIGIN = 0x00000000, LENGTH = 0x00003000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;boot_flags&lt;/TD&gt;&lt;TD&gt;(RW): ORIGIN = 0x00003000, LENGTH = 0x00001000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;vectorrom&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x00004000, LENGTH = 0x00000410&lt;/P&gt;&lt;P&gt;/*cfmprotrom&amp;nbsp; (R): ORIGIN = 0x00004400, LENGTH = 0x00000020*/&lt;/P&gt;&lt;P&gt;rom (RX): ORIGIN = 0x00004420, LENGTH = 0x0004BBE0&amp;nbsp; /* Code + Const data */&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;my_rom (RW): ORIGIN = 0x00050000, LENGTH = 0x00030000&amp;nbsp; /* my data */&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&amp;nbsp; /* SRAM - RW data */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */&lt;/P&gt;&lt;P&gt;end_of_kd&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* Boot stack reused by MQX Kernel data */&lt;/P&gt;&lt;P&gt;bstack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200&amp;nbsp; /* Boot stack */&lt;/P&gt;&lt;P&gt;&amp;nbsp; end_bstack&amp;nbsp; (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000&amp;nbsp; /* Boot stack end address requires 4B alignment */&lt;/P&gt;&lt;P&gt;commented:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*.cfmprotect :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KEEP(*(.cfmconfig))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . = ALIGN (0x8);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;gt; cfmprotrom*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i don't understand what i missed. Can anybody help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 12:38:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311546#M10013</guid>
      <dc:creator>dmitriym</dc:creator>
      <dc:date>2014-05-07T12:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader: problems with starting MQX app</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311547#M10014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;By default, MQX allocates the vector table at the first address of the flash memory, 0x0000-0000. Because this region of flash memory is used by the your bootloader, it will be necessary to reallocate the vector table in a RAM section.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;I want to believe that this appnote can be a guideline for your application: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4367.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;This appnote describes how to add the FNET bootloader to Kinetis projects. There is a section that includes adding it to the MQX linker which is the section that I believe you will find useful. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Regards &lt;BR /&gt; Sol&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 16:32:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311547#M10014</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-05-08T16:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader: problems with starting MQX app</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311548#M10015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I understand that&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; reallocating vector table to the RAM is nessesary for MQX app to use it with bootloader. To allocate vector table in RAM we need to set in user_config.h:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;#define MQX_ROM_VECTORS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I've already done it and rebuild BSP and PSP libraries. And vector table is in the RAM. The MQX application starts and works normal with the vector table in RAM, when i try to debug it without bootloader (with linker file without shifting memory sections). But this MQX application is not working when I use it with bootloader (with modified linker file that i have already posted). When i try to debug it with bootloader i jump to the correct addres in memory where __boot(); of MQX app exists. Start to execute programm, but then somewhere the MQX programm stops.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I tried to jump to __boot(); while debugging only MQX app without bootloader, and it starts normaly, but in main() while starting MQX in function&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; _mqx( (MQX_INITIALIZATION_STRUCT_PTR) &amp;amp;MQX_init_struct ); crashes function _mem_zero((pointer) kernel_data, (_mem_size) sizeof(KERNEL_DATA_STRUCT));. And i don't understand why&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I think that with bootloader the MQX app crashes in the same place. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;And as have already said the test app created with processor expert without MQX starts and runs normaly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 06:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311548#M10015</guid>
      <dc:creator>dmitriym</dc:creator>
      <dc:date>2014-05-12T06:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader: problems with starting MQX app</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311549#M10016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is solved. &lt;/P&gt;&lt;P&gt;Problem was in the stack pointer before initialization of MQX. Simmilar problem: &lt;A href="https://community.nxp.com/thread/323899"&gt;Problem of initialization of MQX after jumping to the start of MQX application ( _boot() )&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 15:35:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-problems-with-starting-MQX-app/m-p/311549#M10016</guid>
      <dc:creator>dmitriym</dc:creator>
      <dc:date>2014-05-26T15:35:04Z</dc:date>
    </item>
  </channel>
</rss>

