<?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>S12 / MagniV MicrocontrollersのトピックS12ZVMC128 Bootloader</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653714#M13838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;BR /&gt;Now I am trying to make a code for bootloader of S12ZVMC128 MCU.&lt;BR /&gt;Flash Start Address = 0xFE0000, Application Start Address = 0xFE0000,&lt;BR /&gt;Vector Sector Address = 0xFFFE00 etc. The address is set according to the memory map, but the bootloader does not work. I do not know the cause of the problem.&lt;BR /&gt;Please help me&lt;BR /&gt;I attached the code and the Application SX file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338807"&gt;S12ZVMC_Bootloader.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338807"&gt;UserApp.sx.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 07:09:44 GMT</pubDate>
    <dc:creator>chojunghun</dc:creator>
    <dc:date>2017-04-06T07:09:44Z</dc:date>
    <item>
      <title>S12ZVMC128 Bootloader</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653714#M13838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;BR /&gt;Now I am trying to make a code for bootloader of S12ZVMC128 MCU.&lt;BR /&gt;Flash Start Address = 0xFE0000, Application Start Address = 0xFE0000,&lt;BR /&gt;Vector Sector Address = 0xFFFE00 etc. The address is set according to the memory map, but the bootloader does not work. I do not know the cause of the problem.&lt;BR /&gt;Please help me&lt;BR /&gt;I attached the code and the Application SX file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338807"&gt;S12ZVMC_Bootloader.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338807"&gt;UserApp.sx.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 07:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653714#M13838</guid>
      <dc:creator>chojunghun</dc:creator>
      <dc:date>2017-04-06T07:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVMC128 Bootloader</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653715#M13839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi CHO JUNG HUN,&lt;/P&gt;&lt;P&gt;Bootloader:&lt;/P&gt;&lt;P&gt;The define.h file contains&lt;/P&gt;&lt;P&gt;#define dfFLASH_START_ADD 0xFE0000&lt;/P&gt;&lt;P&gt;#define dfAPPLICATION_START_ADD&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; 0xFE0000&lt;/P&gt;&lt;P&gt;#define dfBOOTLOADER_START_ADD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFE0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is obvious issue – your bootloader erases 252 sectors from address 0xFE0000 for application use.&lt;/P&gt;&lt;P&gt;So, the bootloader must be placed at highest 4 sectors in Flash.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please update bootloader prm linker file. The ROM segment should start at address 0xFFF800.&lt;/P&gt;&lt;P&gt;Also, SHADOW_ROM_S must not overlap ROM segment and the same is valid for SHADOW_RAM_S and RAM segments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Application:&lt;/P&gt;&lt;P&gt;Your UserApp S-record file contains 6 interrupt and 1 reset vectors at the area which is already occupied by bootloader (0xFFFE00.. 0xFFFFFF).&lt;/P&gt;&lt;P&gt;You must create vector table somewhere else in Flash or RAM and modify IVBR register at application start.&lt;/P&gt;&lt;P&gt;See attached simple example code with relocated vector table into Flash/RAM for your inspiration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the UserApp will be called from Bootloader, please comment out default reset vector in UserApp linker file:&lt;/P&gt;&lt;P&gt;//VECTOR 0 _Startup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From UserApp S-record file is not clear linker settings. Please do not forget on trim Flash size in UserApp linker file for avoiding any UserApp/Bootloader overlap – up to 0xFFF7FF. This typically doesn’t problem for RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please be aware, that there may be an issue with default starts12z.c file – the linker typically place DoZeroOut() function as first into Flash. This leads into the situation, that _Startup() position in flash depends on number and sizes of used initialized variables.&lt;/P&gt;&lt;P&gt;There are at least two workarounds. Please select one of them:&lt;/P&gt;&lt;P&gt;1. You may change order of DoZeroOut(), DoCopyDown() and _Startup() functions in starts12z.c file for manage that _Startup() will be the first function placed into flash.&lt;/P&gt;&lt;P&gt;See attached starts12z.c file.&lt;/P&gt;&lt;P&gt;2. You may place jump instruction and vector to _Startup() function as first in UserApp linker file.&lt;/P&gt;&lt;P&gt;See attached example linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Radek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Fri, 07 Apr 2017 11:20:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653715#M13839</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2017-04-07T11:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVMC128 Bootloader</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653716#M13840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Radek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am using can interrupt in the boot loader code, and I want to know if it is possible to use the same CAN Interrupt in the application code.&lt;/P&gt;&lt;P&gt;2. When the application sx file is downloaded after loading the boot loader code on the target board. Last S2 10 FFF1F0 FF FE 0E D9 FF FE 0E D9 FF FE 0E D9 63 The value does not wirte memory.&lt;/P&gt;&lt;P&gt;3. I want to know if the application's vector table relocation is correct.&lt;BR /&gt;Now the interrupts I use in my application&lt;BR /&gt;VECTOR 13 TIMch1_ISR&lt;BR /&gt;VECTOR 14 TIMch2_ISR&lt;BR /&gt;VECTOR 15 TIMch3_ISR&lt;BR /&gt;VECTOR 28 ADC0error_ISR&lt;BR /&gt;VECTOR 30 ADC0done_ISR&lt;BR /&gt;VECTOR 42 CAN_ISR&lt;/P&gt;&lt;P&gt;4. I want to know if each memory address setting in the boot loader and application prm file is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attachment: Application sx, prm, Vector_Relocation&lt;BR /&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; Bootloader Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Have a great day,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;CHO JUNG HUN&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 07:51:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653716#M13840</guid>
      <dc:creator>chojunghun</dc:creator>
      <dc:date>2017-05-26T07:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVMC128 Bootloader</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653717#M13841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cho,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Yes, you can have two interrupt vectors for CAN. The relocation is managed by IVBR register.&lt;/LI&gt;&lt;LI&gt;The last two S record lines in your App.sx file are formatted strange way. I supposed, that it is your own modification. Correct? Currently, I do not see any obvious reason for that behavior.&lt;/LI&gt;&lt;LI&gt;Unfortunately, your implementation of relocated vector table contains error. But it is my error from an older version of my example code. The IVBR line should be:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;IVBR=(dfINT_VECTOR_TABLE_ADDR_IN_FLASH&amp;gt;&amp;gt;8) &amp;amp; 0xFFFE;&lt;/P&gt;&lt;P&gt;For selected vector table address, it is a rather formal error- it will not have any effect on the result.&lt;/P&gt;&lt;OL start="4"&gt;&lt;LI&gt;Your prm file in bootloader is quite confusing since you filled it also by information related to application (APP_ROM_ENTRY, APP_ISR_SEG, APP_SEG,…). But I do not see any obvious issue there.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I found one issue in define.h file. You increased Bootloader size. So, the flash size for Application will be smaller. Please update also dfFLASH_SECTORS_TO_ERASE value.&lt;/P&gt;&lt;P&gt;Since your Bootloader code starts at address 0xFFF400, the higher 6 sectors are occupied by the bootloader. The dfFLASH_SECTORS_TO_ERASE value should be in this case just 250.&lt;/P&gt;&lt;P&gt;It is possible that the bootloader erased his code during Flash preparation and he cannot finish his operation correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Radek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Fri, 26 May 2017 12:13:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653717#M13841</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2017-05-26T12:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVMC128 Bootloader</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653718#M13842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;HI Radek&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vector table Relocation and dfFLASH_SECTORS_TO_ERASE Size have been modified.&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Have a great day,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;CHO JUNG HUN&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 06:12:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVMC128-Bootloader/m-p/653718#M13842</guid>
      <dc:creator>chojunghun</dc:creator>
      <dc:date>2017-05-29T06:12:10Z</dc:date>
    </item>
  </channel>
</rss>

