<?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>S32 Design StudioのトピックRe: S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824146#M3820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check startup_MPC5746.S file - that's where RCHW_VAL is normally defined for S32DS Projects and added into&amp;nbsp;.rchw section:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65886iDFC00DAF382A3AA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For different s-record formats you can use for example srec_cat tool:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://srecord.sourceforge.net/man/man1/srec_examples.html" title="http://srecord.sourceforge.net/man/man1/srec_examples.html"&gt;srec_examples&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another good article related to srec formating is here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/" title="https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/"&gt;CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2018 14:27:02 GMT</pubDate>
    <dc:creator>jiri_kral</dc:creator>
    <dc:date>2018-07-19T14:27:02Z</dc:date>
    <item>
      <title>S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824145#M3819</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&gt;I noticed in one of my projects, the SREC has the boot record embedded in the record, the second project does not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;S30900FA0000005A0002A0&amp;nbsp; &amp;nbsp;/* Boot Header */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;S30900FA001001000000EB&amp;nbsp; &amp;nbsp;/* Program Code Start Address */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe all I have to do is, in the project properties, under C/C++ Build Settings, in the Standard S32DS C Compiler Section, I double click the START_FROM_FLASH symbol. So, I did that.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65696i423F1D83CED91FCB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I recompile, I still do not see the Boot header. "&lt;SPAN&gt;005A0002"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing I would like to add is that the S-Record format for the 2 projects is different.&lt;/P&gt;&lt;P&gt;In the first project, the S-Record format is S0, S3 15, S7, (which is ideal)&lt;/P&gt;&lt;P&gt;In the second project, the S-Record format is S0, S2 14, S8. (which is not ideal. the length is only 15 bytes)&lt;/P&gt;&lt;P&gt;I'm not sure if it's because the program code location is different? I don't think that should matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the exact same setting as the first project&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65686i55B89AC3DE2A689F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Incidentally, I would also like to know what the check boxes are for the sections -j .text are for as well, if anybody happens to know?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is where I am trying to locate the Boot Header and Program Code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;flash_rchw : org = 0x00FC0000, len = 0x4&amp;nbsp; &amp;nbsp; /* This is the Boot Header address location */&lt;BR /&gt; cpu0_reset_vec : org = 0x00FC0000+0x10, len = 0x4 /* This is the Program Address Offset */&lt;BR /&gt; cpu2_reset_vec : org = 0x00FC0000+0x04, len = 0x4 &lt;BR /&gt; &lt;BR /&gt; m_text : org = 0x00FC8000, len = 224K &lt;BR /&gt; m_data : org = 0x40000000, len = 192K&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65687i056830F443B1F5C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2018 21:42:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824145#M3819</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2018-07-17T21:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824146#M3820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check startup_MPC5746.S file - that's where RCHW_VAL is normally defined for S32DS Projects and added into&amp;nbsp;.rchw section:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65886iDFC00DAF382A3AA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For different s-record formats you can use for example srec_cat tool:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://srecord.sourceforge.net/man/man1/srec_examples.html" title="http://srecord.sourceforge.net/man/man1/srec_examples.html"&gt;srec_examples&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another good article related to srec formating is here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/" title="https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/"&gt;CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 14:27:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824146#M3820</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-19T14:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824147#M3821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, but&amp;nbsp;your startup.s is different from mine. My Startup.S&amp;nbsp;is just assembly code.&lt;/P&gt;&lt;P&gt;The closest thing is the 57xx_flash.ld file. In there it describles the rchw location.&lt;/P&gt;&lt;P&gt;I am not sure&amp;nbsp;if it necessarily means it will put a boot header at that location and what the contents will be?&lt;/P&gt;&lt;P&gt;I'm not sure where the contents of the boot header is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;flash_rchw : org = 0x00FC0000, len = 0x4&lt;BR /&gt; cpu0_reset_vec : org = 0x00FC0000+0x10, len = 0x4&lt;BR /&gt; cpu2_reset_vec : org = 0x00FC0000+0x04, len = 0x4 &lt;BR /&gt; &lt;BR /&gt; m_text : org = 0x00FC8000, len = 224K &lt;BR /&gt; m_data : org = 0x40000000, len = 192K&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; .rchw : &lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.rchw))&lt;BR /&gt; } &amp;gt; flash_rchw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 15:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824147#M3821</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2018-07-19T15:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824148#M3822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the BootHeader must be present in the code - ideally in startup.S. Mine startup (default one) is also assembly file, but you can see that there is store RCHW_VAL to .rchw section on address (taken from linker file) 0xFA0000. So, it is user responsibility add bootheader to one of the 11 addresses. You can find more details in chapter&amp;nbsp;55.1.4 (page 2250 in reference manual&amp;nbsp;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/reference-manual/MPC5746CRM.pdf" title="https://www.nxp.com/docs/en/reference-manual/MPC5746CRM.pdf"&gt;https://www.nxp.com/docs/en/reference-manual/MPC5746CRM.pdf&lt;/A&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The different situation is for RAM target, there is no rchw section present and boot is done by debugger.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 07:20:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824148#M3822</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-20T07:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: S32 Design Studio - S-Record with Boot Header (MPC5746C)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824149#M3823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jiri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was missing the file called "flashrchw.c". That's what was causing the missing boot header in the .srec file.&lt;/P&gt;&lt;P&gt;I also noticed that when I moved the program code to 0x0010000, the srec format changed, so the srec format is dependent&lt;/P&gt;&lt;P&gt;on where the program code is located. (Kind of odd)&lt;/P&gt;&lt;P&gt;I have an assortment of srec tools { srec_cat.exe, srec_cmp.exe, srec_info.exe, SRecCvt.exe, SRecConv_v2.exe }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how I even got the file in the first place?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Content of the flashrchw.c file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#if defined(START_FROM_FLASH)&lt;BR /&gt;#include "typedefs.h"&lt;/P&gt;&lt;P&gt;#define MPC57xx_ID 0x005A0000 /* RCHW boot ID for MPC57xx devices */&lt;BR /&gt;#define VLE_ENABLE 0x01000000 /* VLE is enabled */&lt;/P&gt;&lt;P&gt;#define CPU2_ENABLED 0x00000001&lt;BR /&gt;#define CPU0_ENABLED 0x00000002&lt;BR /&gt;#define CPUC_ENABLED 0x00000004&lt;BR /&gt;#define CPU1_ENABLED 0x00000008&lt;/P&gt;&lt;P&gt;#if defined(MPC574xP) || defined(MPC5777C) || defined(MPC577xK)&lt;BR /&gt;extern void _start(void);&lt;BR /&gt;#define ENTRY_POINT _start&lt;BR /&gt;#define RCHW_VAL (VLE_ENABLE | MPC57xx_ID)&lt;BR /&gt;#else&lt;BR /&gt;#if defined(TURN_ON_CPU0) &amp;amp;&amp;amp; defined(TURN_ON_CPU1) &amp;amp;&amp;amp; defined(TURN_ON_CPU2)&lt;BR /&gt;#define TARGET_CORES (CPU0_ENABLED | CPU1_ENABLED | CPU2_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU0) &amp;amp;&amp;amp; defined(TURN_ON_CPU1)&lt;BR /&gt;#define TARGET_CORES (CPU0_ENABLED | CPU1_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU0) &amp;amp;&amp;amp; defined(TURN_ON_CPU2)&lt;BR /&gt;#define TARGET_CORES (CPU0_ENABLED | CPU2_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU1) &amp;amp;&amp;amp; defined(TURN_ON_CPU2)&lt;BR /&gt;#define TARGET_CORES (CPU1_ENABLED | CPU2_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU0)&lt;BR /&gt;#define TARGET_CORES (CPU0_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU1)&lt;BR /&gt;#define TARGET_CORES (CPU1_ENABLED)&lt;BR /&gt;#elif defined(TURN_ON_CPU2)&lt;BR /&gt;#define TARGET_CORES (CPU2_ENABLED)&lt;BR /&gt;#else &lt;BR /&gt;#error "Neither core is selected"&lt;BR /&gt;#endif /* defined(CPU0) &amp;amp;&amp;amp; defined(CPU1) &amp;amp;&amp;amp; defined(CPU2) */&lt;BR /&gt;#define RCHW_VAL (MPC57xx_ID | TARGET_CORES)&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;const uint32_t __attribute__ ((section(".rchw"))) RCHW1 = RCHW_VAL;&lt;BR /&gt;#if defined(MPC574xP) || defined(MPC5777C) || defined(MPC577xK)&lt;BR /&gt;const uint32_t __attribute__ ((section(".cpu0_reset_vector"))) RCHW2 = (uint32_t)ENTRY_POINT;&lt;BR /&gt;#else&lt;BR /&gt;#if defined(TURN_ON_CPU0)&lt;BR /&gt;const uint32_t __attribute__ ((section(".cpu0_reset_vector"))) RCHW2_0 = (uint32_t)0x1000000;&lt;BR /&gt;#endif&lt;BR /&gt;#if defined(TURN_ON_CPU1)&lt;BR /&gt;const uint32_t __attribute__ ((section(".cpu1_reset_vector"))) RCHW2_1 = (uint32_t)$(FLASH_START_2);&lt;BR /&gt;#endif&lt;BR /&gt;#if defined(TURN_ON_CPU2)&lt;BR /&gt;const uint32_t __attribute__ ((section(".cpu2_reset_vector"))) RCHW2_2 = (uint32_t)$(FLASH_START_3);&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;BR /&gt;#endif /* defined(START_FROM_FLASH) */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 13:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32-Design-Studio-S-Record-with-Boot-Header-MPC5746C/m-p/824149#M3823</guid>
      <dc:creator>cholland</dc:creator>
      <dc:date>2018-07-20T13:38:11Z</dc:date>
    </item>
  </channel>
</rss>

