<?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: Bootloader with MQX Appication using BSP Vector Table in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245520#M6980</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Hola Cristobal&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, so it is necessary to reallocate the vector table. You need to modify the intflash.lcf linker file in order to move the code section (vectorrom, cfmprotrom and rom memory segments) to the user application region. This file is located at the next path&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;\Freescale_MQX_4_0\mqx\source\bsp\CUSTOM_BOARD\cw&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;After that, you need to re-build all the libraries (BSP, PSP, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I want to believe that this appnote can be a guideline for developing your bootloader:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&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;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Espero que esto te ayude. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Saludos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Feb 2014 00:51:09 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2014-02-20T00:51:09Z</dc:date>
    <item>
      <title>Bootloader with MQX Appication using BSP Vector Table</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245519#M6979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been working in a program for K60 with CW10.2 and MQX3.8&lt;/P&gt;&lt;P&gt;I'm working with a bootloader based in example AN4368SW Rev2 (I want to share something: if someone want to us it, disconnect "Enable Exceptions" i Build properties/language). The problem is that the app that this bootloder loads uses interrupts, when I execute the program without bootloader all goes well, but when the bootloader, that uses his own vectors.c for using USB, executes the app at memory 10000h all goes well except there are no interrupts, no USB, no UART, nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;#define &lt;SPAN style="font-size: 10pt;"&gt;MQX_ROM_VECTORS 0&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; in PSP and Builded it&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;/P&gt;&lt;P&gt;SCB_VTOR = (&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #005032; font-size: 10pt;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)0x1FFF0000; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To redirect Vector Table in the APP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorrom&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x00010000, LENGTH = 0x0000400&lt;BR /&gt;&amp;nbsp;&amp;nbsp; data14000000 (RW) : ORIGIN = 0x14000000, LENGTH = 0x00001000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; rom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x00010410, LENGTH = 0x0006FBF0&amp;nbsp; # Code + Const data&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorram&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x1FFF0000, LENGTH = 0x0000418&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ram&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x0001FC00&amp;nbsp; # SRAM - RW data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; # kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end_of_kd&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; # Boot stack reused by MQX Kernel data&lt;BR /&gt;&amp;nbsp;&amp;nbsp; bstack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200&amp;nbsp; # Boot stack&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end_bstack&amp;nbsp; (RW): ORIGIN = 0x2000FBFF, LENGTH = 0x00000000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How I allocate vector table to 0x1FFF0000, I thougt that this is automatic when changing "#define &lt;SPAN style="font-size: 10pt;"&gt;MQX_ROM_VECTORS 0" and "SCB_VTOR" but seems that no. I need to use the standard MQX Vector Table for my app becouse I need some drivers in it. it seems that bootloader is initializing with his vector table and that after that the desired Vector table is not being redirected or have not been allocated perhaps, dont know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please, any help will be welcome.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sorry for my posible english errors, I'm from Barcelona, SPAIN. jejeje&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 13:45:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245519#M6979</guid>
      <dc:creator>scary2021</dc:creator>
      <dc:date>2014-02-19T13:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader with MQX Appication using BSP Vector Table</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245520#M6980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Hola Cristobal&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, so it is necessary to reallocate the vector table. You need to modify the intflash.lcf linker file in order to move the code section (vectorrom, cfmprotrom and rom memory segments) to the user application region. This file is located at the next path&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;\Freescale_MQX_4_0\mqx\source\bsp\CUSTOM_BOARD\cw&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;After that, you need to re-build all the libraries (BSP, PSP, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I want to believe that this appnote can be a guideline for developing your bootloader:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&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;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Espero que esto te ayude. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Saludos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 00:51:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245520#M6980</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-02-20T00:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader with MQX Appication using BSP Vector Table</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245521#M6981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Soledad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the table is relocated the problem is that the system is not using it. If I use in the beginning of my app "SCB_VTOR = (&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #005032; font-size: 10pt;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)0x1FFF0000;" it runs but interrupts don't go. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;If I change the line to 0x10000 for example, the app don't run at all. I use a local modified copy of intflash.lcf with all that you comment but the problem of the interrupts have me stucked.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Some code of my app (the bootloader runs it at direction 10000h)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My .lcf file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KEEP_SECTION { .vectortable }&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorrom&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x00010000, LENGTH = 0x0000400&lt;BR /&gt;&amp;nbsp;&amp;nbsp; #cfmprotrom&amp;nbsp; (RX): ORIGIN = 0x00010400, LENGTH = 0x00000010&lt;BR /&gt;&amp;nbsp;&amp;nbsp; data14000000 (RW) : ORIGIN = 0x14000000, LENGTH = 0x00001000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; rom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x00010410, LENGTH = 0x0006FBF0&amp;nbsp; # Code + Const data&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorram&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x1FFF0000, LENGTH = 0x0000418&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ram&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x0001FC00&amp;nbsp; # SRAM - RW data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; # kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end_of_kd&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; # Boot stack reused by MQX Kernel data&lt;BR /&gt;&amp;nbsp;&amp;nbsp; bstack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200&amp;nbsp; # Boot stack&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end_bstack&amp;nbsp; (RW): ORIGIN = 0x2000FBFF, LENGTH = 0x00000000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my .xmap file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# .vectorrom&lt;BR /&gt;#&amp;gt;00010000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ___VECTOR_ROM (linker command file)&lt;/P&gt;&lt;P&gt;# .vectors&lt;BR /&gt;#&amp;gt;00010000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __VECTOR_TABLE_ROM_START (linker command file)&lt;BR /&gt;&amp;nbsp; 00010000 00000400 .vectors_rom rom_vector (bsp_twrk60n512_d.a vectors.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; 00010000 00000000 .vectors_rom .vectors_rom (bsp_twrk60n512_d.a vectors.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;# .main_application&lt;BR /&gt;&amp;nbsp; 00010410 00000000 KERNEL&amp;nbsp; _sched_start_internal (psp_twrk60n512_d.a dispatch.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# .main_application_data&lt;BR /&gt;#&amp;gt;1FFF0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __VECTOR_TABLE_RAM_START (linker command file)&lt;BR /&gt;&amp;nbsp; 1FFF0000 00000418 .vectors_ram ram_vector (bsp_twrk60n512_d.a vectors.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; 1FFF0000 00000000 .vectors_ram .vectors_ram (bsp_twrk60n512_d.a vectors.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;#&amp;gt;1FFF0600&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __BDT_BASE (linker command file)&lt;BR /&gt;&amp;nbsp; 1FFF0600 00000000 .usb_bdt .usb_bdt (usb_hdk_twrk60n512_d.a khci.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; 1FFF0600 00000200 .usb_bdt bdt (usb_hdk_twrk60n512_d.a khci.o&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;#&amp;gt;1FFF0800&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __BDT_END (linker command file)&lt;BR /&gt;#&amp;gt;1FFF0800&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __START_DATA (linker command file)&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Memory map:&lt;BR /&gt;&amp;nbsp; v_addr&amp;nbsp;&amp;nbsp; p_addr&amp;nbsp;&amp;nbsp; size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;BR /&gt;&amp;nbsp; 00010000 00010000 00000000 .vectorrom vectorrom&lt;BR /&gt;&amp;nbsp; 00010000 00010000 00000400 .vectors&amp;nbsp;&amp;nbsp; vectorrom&lt;BR /&gt;&amp;nbsp; 14000000 14000000 00001000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data14000000&lt;BR /&gt;&amp;nbsp; 00010410 00010410 0002363C .main_application rom&lt;BR /&gt;&amp;nbsp; 1FFF0000 1FFF0000 00000418&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vectorram&lt;BR /&gt;&amp;nbsp; 1FFF0000 00033A4C 00002D40 .main_application_data ram&lt;BR /&gt;&amp;nbsp; 1FFF2D40 1FFF2D40 0000AC00 .main_application_bss ram&lt;BR /&gt;&amp;nbsp; 1FFFD940 1FFFD940 00000000 .kernel_data ram&lt;BR /&gt;&amp;nbsp; 2000FFF0 2000FFF0 00000000 .end_of_kernel_data end_of_kd&lt;BR /&gt;&amp;nbsp; 2000FA00 2000FA00 00000000 .boot_stack bstack&lt;BR /&gt;&amp;nbsp; 2000FBFF 2000FBFF 00000000 .end_of_boot_stack end_bstack&lt;BR /&gt;&amp;nbsp; 2000FBFF 0003678C 00000018 .romp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end_bstack&lt;/P&gt;&lt;P&gt;# Link start time: Thu Feb 20 10:32:27 2014&lt;BR /&gt;# Link end time: Thu Feb 20 10:32:28 2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need to solve it as soon as posible, thanks for your attention.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 09:57:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245521#M6981</guid>
      <dc:creator>scary2021</dc:creator>
      <dc:date>2014-02-20T09:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bootloader with MQX Appication using BSP Vector Table</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245522#M6982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried two diferent ways of having the bootloader executing my app:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code in the first lines of my app:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Using the table allocated in RAM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;#define &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;MQX_ROM_VECTORS 0&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; in PSP and Builded it&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;SCB_VTOR = (&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;)0x1FFF0000; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To redirect Vector Table in the APP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2: Using the table in FLASH (10000h):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I read that Kinetis can have more than once in flash so I test it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;#define &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;MQX_ROM_VECTORS 1&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; in PSP and Builded it&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;SCB_VTOR = (&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;)0x00010000; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To redirect Vector Table in the APP&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;The application boots perfectly but the problem is the same, the vector table is where it has to be but my interruptions don't affect to it. Seems that the Bootloader has not let free the interrupts handl for the app to use it.&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;In the bootloader I'm using CPSID to disable interruptions before jumping to the application. That's enough?&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P&gt;asm ("CPSID i");&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;&amp;nbsp; // Disable interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Code to jump to the application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r4,=New_sp&lt;/P&gt;&lt;P&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;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; sp, [r4]&lt;/P&gt;&lt;P&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;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r4,=New_pc&lt;/P&gt;&lt;P&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;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r5, [r4]&lt;/P&gt;&lt;P&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;&amp;nbsp; blx&amp;nbsp;&amp;nbsp; r5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gracias por tu atención.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 16:55:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bootloader-with-MQX-Appication-using-BSP-Vector-Table/m-p/245522#M6982</guid>
      <dc:creator>scary2021</dc:creator>
      <dc:date>2014-02-20T16:55:28Z</dc:date>
    </item>
  </channel>
</rss>

