<?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 Mirroring the vector table(bootloader) in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728398#M2182</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;We are using s32K118 controller . i need to port the bootloader of Renesas to NXP.&lt;/P&gt;&lt;P&gt;Problem 1:&lt;/P&gt;&lt;P&gt;#pragma vector=0x3E&lt;BR /&gt;#pragma optimize=low&lt;BR /&gt;__interrupt void OSIRQ_Int31(void) @ "IRQ_VECTOR"&lt;BR /&gt;{ ((BL_pfvVirtualIrqAddr)(*(T_U16 __far *)(BL_nu32AppIVTBaseAddr + 0x3E))) (); }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is one interrupt function used to create the mirror vector table for Renesas(used IAR Tool).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to port the above mirror function for NXP controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above syntax are specific to IAR compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using S32K design studio, how to port the above function in the design studio?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma dataseg="BL_DATA_RAM"&lt;BR /&gt;__no_init T_U32 BL_gau32TM_Timer[BL_TIMER_MAX_NO_OF_TIMERS];&lt;BR /&gt;__no_init T_BOOL BL_gbDAACFlag;&lt;BR /&gt;__no_init u8BLCState_t BL_gu8BLCState;&lt;BR /&gt;__no_init u8DLTState_e BL_gu8DLTState;&lt;BR /&gt;__no_init u8BaudRate_e BL_gu8BaudRate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code has written in IAR tool.&lt;/P&gt;&lt;P&gt;same code I used it in S32 Design studio, it is showing syntax error because of __no_init.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to rewrite the above declaration in S32 design supportable format?&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help us in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Oct 2017 17:15:01 GMT</pubDate>
    <dc:creator>ambarishhundeka</dc:creator>
    <dc:date>2017-10-27T17:15:01Z</dc:date>
    <item>
      <title>Mirroring the vector table(bootloader)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728398#M2182</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;We are using s32K118 controller . i need to port the bootloader of Renesas to NXP.&lt;/P&gt;&lt;P&gt;Problem 1:&lt;/P&gt;&lt;P&gt;#pragma vector=0x3E&lt;BR /&gt;#pragma optimize=low&lt;BR /&gt;__interrupt void OSIRQ_Int31(void) @ "IRQ_VECTOR"&lt;BR /&gt;{ ((BL_pfvVirtualIrqAddr)(*(T_U16 __far *)(BL_nu32AppIVTBaseAddr + 0x3E))) (); }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is one interrupt function used to create the mirror vector table for Renesas(used IAR Tool).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to port the above mirror function for NXP controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above syntax are specific to IAR compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using S32K design studio, how to port the above function in the design studio?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma dataseg="BL_DATA_RAM"&lt;BR /&gt;__no_init T_U32 BL_gau32TM_Timer[BL_TIMER_MAX_NO_OF_TIMERS];&lt;BR /&gt;__no_init T_BOOL BL_gbDAACFlag;&lt;BR /&gt;__no_init u8BLCState_t BL_gu8BLCState;&lt;BR /&gt;__no_init u8DLTState_e BL_gu8DLTState;&lt;BR /&gt;__no_init u8BaudRate_e BL_gu8BaudRate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code has written in IAR tool.&lt;/P&gt;&lt;P&gt;same code I used it in S32 Design studio, it is showing syntax error because of __no_init.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to rewrite the above declaration in S32 design supportable format?&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help us in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:15:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728398#M2182</guid>
      <dc:creator>ambarishhundeka</dc:creator>
      <dc:date>2017-10-27T17:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Mirroring the vector table(bootloader)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728399#M2183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Kindly reply to the above post or send me the standard S32 compiler reference manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish B H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 06:53:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728399#M2183</guid>
      <dc:creator>ambarishhundeka</dc:creator>
      <dc:date>2017-11-03T06:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mirroring the vector table(bootloader)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728400#M2184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ambarish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The default compiler for S32 Design Studio is GCC. You can find the GCC compiler manual on the Internet or in S32DS local folder:&lt;/P&gt;&lt;P&gt;&amp;lt;S32DS_ARM&amp;gt;\Cross_Tools\gcc-arm-none-eabi-4_9\share\doc\gcc-arm-none-eabi\pdf\gcc\gcc.pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Regarding interrupts:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Due to ARM cortex core design an interrupt handler routine written in C does not differ from a C subroutine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore you don't need any "interrupt" key word support by the compiler.&lt;/P&gt;&lt;P&gt;All you need to do is correctly calculate the address of redirected handler and place the handler name it into the vector table e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;IMG alt="pastedImage_8.png" src="https://community.nxp.com/t5/image/serverpage/image-id/20853i923E8987118F22B3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_8.png" /&gt;&lt;/SPAN&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;SPAN style="text-decoration: underline;"&gt;Regarding to "no init" variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'd suggest you to create a separate section for uninitialized variables e.g. "&lt;STRONG&gt;m_no_init&lt;/STRONG&gt;" + "&lt;STRONG&gt;.NO_INIT_DATA_RAM&lt;/STRONG&gt;":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;MEMORY
{
&amp;nbsp; /* Flash */
&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
&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
&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 = 0x0007FBF0

&amp;nbsp; /* SRAM_L */
&amp;nbsp; m_no_init&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 = 0x1FFF8000, LENGTH = 0x00001000&amp;nbsp; 
&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 = 0x1FFF9000, LENGTH = 0x00007000
&amp;nbsp; 
&amp;nbsp; /* SRAM_U */
&amp;nbsp; m_data_2&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 = 0x20000000, LENGTH = 0x00007000
}

/* Define output sections */
SECTIONS
{
&amp;nbsp; .NO_INIT_DATA_RAM :
&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; . = ALIGN(4);
&amp;nbsp;&amp;nbsp;&amp;nbsp; KEEP(*(.NO_INIT_DATA_RAM))&amp;nbsp; /* Keep section even if not referenced. */
&amp;nbsp; } &amp;gt; m_no_init
&amp;nbsp; ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can create a macro that places the variable into this section:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;#define __NO_INIT __attribute__((section(".NO_INIT_DATA_RAM")))
__NO_INIT char str[10];‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach is to add the section into .data but then you can adjust the startup routine to avoid the copy-down for this subsection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:03:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Mirroring-the-vector-table-bootloader/m-p/728400#M2184</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2020-11-02T14:03:07Z</dc:date>
    </item>
  </channel>
</rss>

