<?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>S32Kのトピックramcode section not used when optimization level &amp;lt; O2</title>
    <link>https://community.nxp.com/t5/S32K/ramcode-section-not-used-when-optimization-level-lt-O2/m-p/1834242#M33384</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I am using S32DS 3.5 update 10 + RTD 3 for S32K312 and trying to put some code to .ramcode section so that it runs from RAM.&lt;/P&gt;&lt;P&gt;ie. for some functions in C40_ip.h I have changed&lt;/P&gt;&lt;P&gt;C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void);&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void) __attribute__((section (".ramcode")));&lt;/P&gt;&lt;P&gt;But when I select Optimize level O0 or O1, the code is not put into .ramcode section&lt;/P&gt;&lt;P&gt;With O2 and more, it is put into .ramcode but I cannot debug where it is causing HardFault&lt;/P&gt;&lt;P&gt;Can anybody help with this? Or give me another solution to make the code run from RAM (to be able to erase sectors and write to flash)?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 06:18:18 GMT</pubDate>
    <dc:creator>Novalis</dc:creator>
    <dc:date>2024-03-25T06:18:18Z</dc:date>
    <item>
      <title>ramcode section not used when optimization level &lt; O2</title>
      <link>https://community.nxp.com/t5/S32K/ramcode-section-not-used-when-optimization-level-lt-O2/m-p/1834242#M33384</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am using S32DS 3.5 update 10 + RTD 3 for S32K312 and trying to put some code to .ramcode section so that it runs from RAM.&lt;/P&gt;&lt;P&gt;ie. for some functions in C40_ip.h I have changed&lt;/P&gt;&lt;P&gt;C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void);&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void) __attribute__((section (".ramcode")));&lt;/P&gt;&lt;P&gt;But when I select Optimize level O0 or O1, the code is not put into .ramcode section&lt;/P&gt;&lt;P&gt;With O2 and more, it is put into .ramcode but I cannot debug where it is causing HardFault&lt;/P&gt;&lt;P&gt;Can anybody help with this? Or give me another solution to make the code run from RAM (to be able to erase sectors and write to flash)?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 06:18:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/ramcode-section-not-used-when-optimization-level-lt-O2/m-p/1834242#M33384</guid>
      <dc:creator>Novalis</dc:creator>
      <dc:date>2024-03-25T06:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: ramcode section not used when optimization level &lt; O2</title>
      <link>https://community.nxp.com/t5/S32K/ramcode-section-not-used-when-optimization-level-lt-O2/m-p/1834619#M33410</link>
      <description>&lt;P&gt;I have found that I have to change&lt;/P&gt;&lt;P&gt;#define MEM_43_INFLS_START_SEC_CODE&lt;BR /&gt;#include "Mem_43_InFls_MemMap.h"&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;#define MEM_43_INFLS_START_SEC_RAMCODE&lt;BR /&gt;#include "Mem_43_InFls_MemMap.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;#define MEM_43_INFLS_STOP_SEC_CODE&lt;BR /&gt;#include "Mem_43_InFls_MemMap.h"&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;#define MEM_43_INFLS_STOP_SEC_RAMCODE&lt;BR /&gt;#include "Mem_43_InFls_MemMap.h"&lt;/P&gt;&lt;P&gt;in the end of the file c40_ip.h&lt;/P&gt;&lt;P&gt;do not forget to also add C40_Ip_MainInterfaceHVJobStatus to the header file like in the linked post below.&lt;/P&gt;&lt;P&gt;and then functions get into .ramcode even if no optimization is selected&lt;/P&gt;&lt;P&gt;like in this post&amp;nbsp; &lt;A href="https://community.nxp.com/t5/S32K/S32K344-C40-IP-Hardware-Fault-Problem/td-p/1697432" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K/S32K344-C40-IP-Hardware-Fault-Problem/td-p/1697432&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 12:09:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/ramcode-section-not-used-when-optimization-level-lt-O2/m-p/1834619#M33410</guid>
      <dc:creator>Novalis</dc:creator>
      <dc:date>2024-04-02T12:09:48Z</dc:date>
    </item>
  </channel>
</rss>

