<?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: kboot: jump to bootloader from application in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561762#M33845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not GCC; I'm using IAR EWARM (&lt;A class="link-titled" href="https://www.iar.com/iar-embedded-workbench/#!?device=MK22FN512xxx12&amp;amp;architecture=ARM" title="https://www.iar.com/iar-embedded-workbench/#!?device=MK22FN512xxx12&amp;amp;architecture=ARM"&gt;IAR Embedded Workbench&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 18:35:46 GMT</pubDate>
    <dc:creator>kevinlfw</dc:creator>
    <dc:date>2016-09-13T18:35:46Z</dc:date>
    <item>
      <title>kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561753#M33836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was searching for how I could jump to the bootloader when running the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the Kinetis Booloader Reference Manual states the following:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;To get the address of the entry point, the user application reads the word containing the&lt;/P&gt;&lt;P&gt;pointer to the bootloader API tree at offset 0x1C of the bootloader's vector table. The&lt;/P&gt;&lt;P&gt;vector table is placed at the base of the bootloader's address range.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I look at the bootlaoder sources there is no evidence that this is actually done.&lt;/P&gt;&lt;P&gt;1. The vector table defined in the startup_*.s file does not place the g_bootloaderTree symbol at a specific offset&lt;/P&gt;&lt;P&gt;2. The linker file does also not contain an explicit location for g_bootloaderTree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so what am I missing? How can the application expect an bootloader entry point at 0x1C?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like I just should to it as the bootloader jumps to the application (jump_to_application() )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 09:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561753#M33836</guid>
      <dc:creator>peterruesch</dc:creator>
      <dc:date>2016-07-12T09:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561754#M33837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached files on how to do it.&amp;nbsp; This is using GCC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/** @(#)bootldrstart.c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;18-Nov-2015 08:13:50 bob p&amp;gt;&lt;/P&gt;&lt;P&gt; *&amp;nbsp; \date Last Time-stamp: &amp;lt;12-Jul-2016 08:24:01 bob p&amp;gt;&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp; \file bootldrstart.c&lt;/P&gt;&lt;P&gt; *&amp;nbsp; \brief&amp;nbsp; Jump to Boot Loader.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * Note:&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You may not even convert a void * to a function pointer by&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; explicit casting (6.3.2.3|1).&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C's abstract machine does not assume that code and data are&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addressed the same way, so as far as C is concerned function&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pointers and data pointers have nothing to do with each other&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (they could have different widths).&lt;/P&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*lint -save */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "includes.h" /* Include things like stdint.h etc. */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define&amp;nbsp; DEFINE_SPACE_BOOTLDRSTART_H (1)&lt;/P&gt;&lt;P&gt;#include "bootldrstart.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Function Pointer returning void, past void pointer: */&lt;/P&gt;&lt;P&gt;void (*_boot_loader_start)( void * arg );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void boot_loader_start( void )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Read the function address from the ROM API tree: */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; uint32_t const _boot_loader_start_address = **(uint32_t **)(0x1C00001CUL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Turn address in to a funciton pointer: */&lt;/P&gt;&lt;P&gt;&amp;nbsp; _boot_loader_start = (void (*)(void * arg))_boot_loader_start_address;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _boot_loader_start( NULL ); /* Call the function.&amp;nbsp; Will not return from here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;) /* Pacify the compiler about returning from a no return funciton */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 12:27:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561754#M33837</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-12T12:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561755#M33838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your attention, but 0x1C00001CUL seems not to be in the flash memory region into which the bootloader is linked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is your implementation only valid for ROM resident bootloaders?&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 13:10:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561755#M33838</guid>
      <dc:creator>peterruesch</dc:creator>
      <dc:date>2016-07-12T13:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561756#M33839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;0x1C is offset from the start of the bootloader address of where ever it is located.&lt;/P&gt;&lt;P&gt;Yes my example is for the KL27 ROM Bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does your linker script look like?&amp;nbsp; It should be defining a symbol to the start of the bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you linking both the bootloader and your application at the same time or separately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 16:46:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561756#M33839</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-12T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561757#M33840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a part of the booloader linker file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_interrupts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_flash_config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_text&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; (RX)&amp;nbsp; : ORIGIN = 0x00000410, LENGTH = 0x000FFBF0&lt;/P&gt;&lt;P&gt;&amp;nbsp; m_data&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; (RW)&amp;nbsp; : ORIGIN = 0x1FFF0000, LENGTH = 0x00040000&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it does not define a special region for the bootloader entry symbol. thats why I'm confused about the proposed fixed entry point for the bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bootloader and application get compiled and linked in two different projects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 10:56:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561757#M33840</guid>
      <dc:creator>peterruesch</dc:creator>
      <dc:date>2016-07-13T10:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561758#M33841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;0x1C00001CUL with 0x00000004UL in the&amp;nbsp; code I posted above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 12:01:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561758#M33841</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-13T12:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561759#M33842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As it appears the bootloader is what will run out of reset, restarting the bootloader via reset is better than a jump to it.&lt;/P&gt;&lt;P&gt;This will assure that the stack pointer gets set correctly from the value at 0x00000000UL.&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt; * Data Synchronization Barrier (DSB): Ensures that all explicit data&lt;/P&gt;&lt;P&gt; * memory transfer before the DSB are complete before any instruction&lt;/P&gt;&lt;P&gt; * after the DSB is executed.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ensure effects of an access to SCS take place before the next&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operation&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ensure memory is updated before the next operation, for&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; example, SVC, WFI, WFE.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector table changes:&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; If the program changes an entry in the vector table,&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; and then enables the corresponding exception, a DSB&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; instruction should be used between these two&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; operations. This ensures that if the exception is&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; taken after being enabled the processor uses the new&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; exception vector. If the updated vector table is&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; required immediately, for example if an SVC&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; immediately follows an update to the SVC table entry&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; via a store, then a DSB is also required.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Memory Map modifications:&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; If the system contains a memory map switching&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; mechanism then use a DSB instruction after switching&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; the memory map in the program. This ensures subsequent&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; instruction execution uses the updated memory map, if&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; the memory system makes the updated memory map visible&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; to all subsequent memory accesses.&lt;/P&gt;&lt;P&gt; *&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; Note:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; An ISB or an exception entry/return is required&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to ensure that the subsequent instructions are&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fetched using the new memory map.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * The memory barrier instructions, DMB and DSB, can be used to ensure&lt;/P&gt;&lt;P&gt; * that the write buffer on the processor has completed its operation&lt;/P&gt;&lt;P&gt; * before subsequent operations can be started. However, it does not&lt;/P&gt;&lt;P&gt; * check the status of the bus level write buffers. In such cases, if&lt;/P&gt;&lt;P&gt; * the system is based on AHB or AHB Lite, you might need to perform a&lt;/P&gt;&lt;P&gt; * dummy read through the bus bridge to ensure that the bus bridge has&lt;/P&gt;&lt;P&gt; * completed its operation.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * The Cortex-M0 processor (r0p0) and the Cortex-M0+ processor (r0p0)&lt;/P&gt;&lt;P&gt; * do not include a write buffer in their processor bus interface.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * Architecturally, a DSB instruction should be used after changing&lt;/P&gt;&lt;P&gt; * the VTOR if an exception is to be generated immediately and should&lt;/P&gt;&lt;P&gt; * use the latest vector table setting.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * In Cortex-M3, Cortex-M4 and Cortex-M0+ processors, accesses to the&lt;/P&gt;&lt;P&gt; * SCS have the DSB behavior, so there is no need to insert the DSB&lt;/P&gt;&lt;P&gt; * instruction.&lt;/P&gt;&lt;P&gt; *&lt;/P&gt;&lt;P&gt; * A DSB is required before generating self-reset to ensure all&lt;/P&gt;&lt;P&gt; * outstanding transfers are completed. The use of the CPSID I&lt;/P&gt;&lt;P&gt; * instruction is optional.&lt;/P&gt;&lt;P&gt; */&lt;/P&gt;&lt;P&gt;static inline ATTR_NO_INSTRUMENT_FUNCTION void sync_barrier_data( void )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm__ __volatile__ ("dsb");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void __attribute__ ((noreturn)) reset_mcu( void )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; * A DSB is required before generating self-reset to ensure all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; * outstanding transfers are completed. The use of the CPSID I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; * instruction is optional, if state of system is understood.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; * sync_barrier_data();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp; irq_disable();&lt;/P&gt;&lt;P&gt;&amp;nbsp; sync_barrier_data();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SCB_AIRCR = (SCB_AIRCR_VECTKEY(0x05FAU) | SCB_AIRCR_SYSRESETREQ_MASK); /* Generate a System Reset */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;)&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; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 12:13:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561759#M33842</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-13T12:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561760#M33843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bobpaddock"&gt;bobpaddock&lt;/A&gt;‌ I cannot get your code to compile, and using the method with address 0x04UL doesn't work either--my linker file is the same. &amp;nbsp;Also, I am running MQX, which I'm not sure matters. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers on getting the above code running. &amp;nbsp;On the static inline function itself I'm getting a "inline specifier allowed on function declarations only" and "explicit type is missing ("int" assumed)". &amp;nbsp;I'm using IAR EWARM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I added "#define ATTR_NO_INSTRUMENT_FUNCTION __attribute__( ( no_instrument_function ) ) &amp;nbsp;/* Really needed for these inlined single instructions */" and that prompted a "the "no_instrument_function" attribute is not supported".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:39:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561760#M33843</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-09-13T15:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561761#M33844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#define ATTR_NO_INSTRUMENT_FUNCTION __attribute__( ( no_instrument_function ) )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Those can be deleted. &amp;nbsp;They are only needed if&amp;nbsp;CFLAGS += -finstrument-functions is used.&lt;BR /&gt;&lt;BR /&gt;The above code is written for GCC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 18:32:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561761#M33844</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-09-13T18:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561762#M33845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not GCC; I'm using IAR EWARM (&lt;A class="link-titled" href="https://www.iar.com/iar-embedded-workbench/#!?device=MK22FN512xxx12&amp;amp;architecture=ARM" title="https://www.iar.com/iar-embedded-workbench/#!?device=MK22FN512xxx12&amp;amp;architecture=ARM"&gt;IAR Embedded Workbench&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 18:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561762#M33845</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-09-13T18:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561763#M33846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this line compile?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; SCB_AIRCR = (SCB_AIRCR_VECTKEY(0x05FAU) | SCB_AIRCR_SYSRESETREQ_MASK); /* Generate a System Reset */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;If not the header files are different.&lt;BR /&gt;&lt;BR /&gt;IAR should have intrinsic that replace the GCC Attributes. &amp;nbsp;The main one is to disable the interrupts before generating the reset. &amp;nbsp;Flushing the caches and pending writes is wise, may not absolutely needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 18:41:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561763#M33846</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-09-13T18:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: kboot: jump to bootloader from application</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561764#M33847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems the IAR equivalent is below, however it does not work. &amp;nbsp;The system is reset, but it doesn't put&amp;nbsp;me in the bootloader, at least in my case. &amp;nbsp;I currently have my BCA configured to direct boot into the user application. I've created a question regarding this yesterday:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/434591"&gt;Jumping from bootloader to user application&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;static inline void sync_barrier_data( void )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;__ASM volatile ("dsb");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;void __attribute__ ((noreturn)) reset_mcu( void )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;/*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;* A DSB is required before generating self-reset to ensure all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;* outstanding transfers are completed. The use of the CPSID I&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;* instruction is optional, if state of system is understood.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;* sync_barrier_data();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;__disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;sync_barrier_data();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;NVIC_SystemReset();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;for(;;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;} &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 18:49:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kboot-jump-to-bootloader-from-application/m-p/561764#M33847</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-09-13T18:49:29Z</dc:date>
    </item>
  </channel>
</rss>

