<?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 Issues Making Flash Partition for Bootloader and Main Program in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issues-Making-Flash-Partition-for-Bootloader-and-Main-Program/m-p/1628380#M64929</link>
    <description>&lt;P&gt;I am attempting to create two partitions of flash, one for a future bootloader and another for the main program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set the bootloader to be from 0x0 to 0x6000 and the main partition to be from 0x6000 to 0x20000 as seen in the image below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCU Settings.JPG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217879i7B0051D8C4FF032B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MCU Settings.JPG" alt="MCU Settings.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't really have a bootloader at this point but instead I attempt to place the file startup_mkl16z4 in the bootloader partition so the system can startup correctly. Note that I have "Enable automatic placement of flash..." selected at this point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_1-1680709846128.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217881iF77CC72BF66928D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_1-1680709846128.jpeg" alt="nick_schneider_1-1680709846128.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this and compile I get an error that says "Linker Flash Config Support Enabled, but no .FlashConfig section provided within application". To prevent that error I placed a flash config table (copied from startup_mkl16z4) at the top of main thinking that a flash config section needed to be in each partition of memory since there is already one in bootloader section because of the startup file. This prevents the compile error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_2-1680710006651.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217882iA9EBA1C2E9688044/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_2-1680710006651.jpeg" alt="nick_schneider_2-1680710006651.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I load the software with this configuration it does not work. When I view the memory through the debugger it appears that the flash config table is being placed at the very beginning of the flash instead of the vector table and I am not sure why.&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_3-1680710183289.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217884i6F2C1D8CF9ADC831/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_3-1680710183289.jpeg" alt="nick_schneider_3-1680710183289.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found that I can get the program to run if I remove the flash config table before main and deselect the option&amp;nbsp;"Enable automatic placement of flash..." in the managed linker script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;Why exactly am I having this experience with the flash config table being placed at the beginning of flash?&lt;/P&gt;&lt;P&gt;I assume I do not want to have a second flash config table above main and do not want to disable the automatic placement of it, so what should I be doing instead to get the vector table and everything else to align properly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my startup_mkl16z4.c (should be unchanged from default) file and my linker file with "Enable automatic placement of flash..." checked. Let me know if there is anything else I can provide to help get this answered.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 16:19:48 GMT</pubDate>
    <dc:creator>nick_schneider</dc:creator>
    <dc:date>2023-04-05T16:19:48Z</dc:date>
    <item>
      <title>Issues Making Flash Partition for Bootloader and Main Program</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issues-Making-Flash-Partition-for-Bootloader-and-Main-Program/m-p/1628380#M64929</link>
      <description>&lt;P&gt;I am attempting to create two partitions of flash, one for a future bootloader and another for the main program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set the bootloader to be from 0x0 to 0x6000 and the main partition to be from 0x6000 to 0x20000 as seen in the image below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCU Settings.JPG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217879i7B0051D8C4FF032B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MCU Settings.JPG" alt="MCU Settings.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't really have a bootloader at this point but instead I attempt to place the file startup_mkl16z4 in the bootloader partition so the system can startup correctly. Note that I have "Enable automatic placement of flash..." selected at this point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_1-1680709846128.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217881iF77CC72BF66928D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_1-1680709846128.jpeg" alt="nick_schneider_1-1680709846128.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this and compile I get an error that says "Linker Flash Config Support Enabled, but no .FlashConfig section provided within application". To prevent that error I placed a flash config table (copied from startup_mkl16z4) at the top of main thinking that a flash config section needed to be in each partition of memory since there is already one in bootloader section because of the startup file. This prevents the compile error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_2-1680710006651.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217882iA9EBA1C2E9688044/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_2-1680710006651.jpeg" alt="nick_schneider_2-1680710006651.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I load the software with this configuration it does not work. When I view the memory through the debugger it appears that the flash config table is being placed at the very beginning of the flash instead of the vector table and I am not sure why.&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nick_schneider_3-1680710183289.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/217884i6F2C1D8CF9ADC831/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nick_schneider_3-1680710183289.jpeg" alt="nick_schneider_3-1680710183289.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found that I can get the program to run if I remove the flash config table before main and deselect the option&amp;nbsp;"Enable automatic placement of flash..." in the managed linker script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;Why exactly am I having this experience with the flash config table being placed at the beginning of flash?&lt;/P&gt;&lt;P&gt;I assume I do not want to have a second flash config table above main and do not want to disable the automatic placement of it, so what should I be doing instead to get the vector table and everything else to align properly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my startup_mkl16z4.c (should be unchanged from default) file and my linker file with "Enable automatic placement of flash..." checked. Let me know if there is anything else I can provide to help get this answered.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 16:19:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issues-Making-Flash-Partition-for-Bootloader-and-Main-Program/m-p/1628380#M64929</guid>
      <dc:creator>nick_schneider</dc:creator>
      <dc:date>2023-04-05T16:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Making Flash Partition for Bootloader and Main Program</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issues-Making-Flash-Partition-for-Bootloader-and-Main-Program/m-p/1635589#M64964</link>
      <description>&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;I suggest you to read the following documents that may help you with your problem&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;&lt;A href="https://community.nxp.com/t5/MCU-Bootloader-Knowledge-Base/Introducing-Kinetis-Bootloader-v2/ta-p/1113650" target="_blank"&gt;https://community.nxp.com/t5/MCU-Bootloader-Knowledge-Base/Introducing-Kinetis-Bootloader-v2/ta-p/1113650&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;&lt;A href="https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/kinetis/37592/1/Kinetis%20Bootloader%20v2.0.0%20Reference%20Manual.pdf" target="_blank"&gt;https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/kinetis/37592/1/Kinetis%20Bootloader%20v2.0.0%20Reference%20Manual.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;Have a good day&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 18:14:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issues-Making-Flash-Partition-for-Bootloader-and-Main-Program/m-p/1635589#M64964</guid>
      <dc:creator>CarlosGarabito</dc:creator>
      <dc:date>2023-04-18T18:14:00Z</dc:date>
    </item>
  </channel>
</rss>

