<?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 Re: Strange things happen when FreeRTOS code is moved to a static lib in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Strange-things-happen-when-FreeRTOS-code-is-moved-to-a-static/m-p/1477769#M191770</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196701"&gt;@segev-amossi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that you are doing excellent.&amp;nbsp; I received the additional information you shared via email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose that your whole program may look like below&amp;nbsp; &amp;nbsp;and you have followed some procedure like described here&amp;nbsp;&lt;A href="https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/mcuxpresso-ide%40tkb/478/1/How%20to%20create%20and%20use%20static%20library%20in%20MCUXpresso%20IDE%20-%20ver3.pdf" target="_self"&gt;How to create and use static library in MCUXpresso IDE&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int main()
{
  init_periph, pins etc.
  rtos_static_lib_enter();// problem appears when executing lib functions
  return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;Are you able to share your project?&lt;/P&gt;&lt;P&gt;I think that we could take a look to :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Which section of memory is the static library is linked to.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Monitor program counter when jumping to static library functions.&lt;/LI&gt;&lt;LI&gt;Test linking whole application to SRAM, or&amp;nbsp; link static library to SRAM using a linker script. Let me know if you need an example for this.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I mention this because I want to check if the static library is executing where we intend&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2022 02:08:20 GMT</pubDate>
    <dc:creator>diego_charles</dc:creator>
    <dc:date>2022-06-22T02:08:20Z</dc:date>
    <item>
      <title>Strange things happen when FreeRTOS code is moved to a static lib</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Strange-things-happen-when-FreeRTOS-code-is-moved-to-a-static/m-p/1474539#M191521</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using the EVK of MIMXRT1176.&lt;/P&gt;&lt;P&gt;I basically run an app that uses FreeRTOS. I run it on Core-M7 (it's a dual core).&lt;/P&gt;&lt;P&gt;The program basically does nothing, by the way, it only runs a task that prints "hello world".&lt;/P&gt;&lt;P&gt;When I run everything using a single project, everything works fine, but when I separate the FreeRTOS code to another static library - things get out of hand, and really strange bugs occur.&lt;/P&gt;&lt;P&gt;Just to get things straight - it's exactly the same code, only moved to a static lib.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the strange things that happen -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The program halts , and I get a message saying "Break at address "0x0" with no debug information available, or outside of program code." (see the Bug_1 attachment).&lt;/P&gt;&lt;P&gt;2. Another thing that happens from time to time is that the program doesn't even launch, and from then on I can't even use the microcontroller anymore, since it identifies the current core as Core-M4 instead of Core-M7 (on every program I tried to run it on!). I have to use the Boot-Utility in and perform a Mass Erase in order to use it again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When might cause such strange things? As I wrote earlier, I only switch the location from the App to a static lib.&lt;/P&gt;&lt;P&gt;Any help would be much appreciated,&lt;/P&gt;&lt;P&gt;Segev&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 14:29:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Strange-things-happen-when-FreeRTOS-code-is-moved-to-a-static/m-p/1474539#M191521</guid>
      <dc:creator>segev-amossi</dc:creator>
      <dc:date>2022-06-15T14:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Strange things happen when FreeRTOS code is moved to a static lib</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Strange-things-happen-when-FreeRTOS-code-is-moved-to-a-static/m-p/1477769#M191770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196701"&gt;@segev-amossi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that you are doing excellent.&amp;nbsp; I received the additional information you shared via email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose that your whole program may look like below&amp;nbsp; &amp;nbsp;and you have followed some procedure like described here&amp;nbsp;&lt;A href="https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/mcuxpresso-ide%40tkb/478/1/How%20to%20create%20and%20use%20static%20library%20in%20MCUXpresso%20IDE%20-%20ver3.pdf" target="_self"&gt;How to create and use static library in MCUXpresso IDE&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int main()
{
  init_periph, pins etc.
  rtos_static_lib_enter();// problem appears when executing lib functions
  return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;Are you able to share your project?&lt;/P&gt;&lt;P&gt;I think that we could take a look to :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Which section of memory is the static library is linked to.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Monitor program counter when jumping to static library functions.&lt;/LI&gt;&lt;LI&gt;Test linking whole application to SRAM, or&amp;nbsp; link static library to SRAM using a linker script. Let me know if you need an example for this.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I mention this because I want to check if the static library is executing where we intend&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Strange-things-happen-when-FreeRTOS-code-is-moved-to-a-static/m-p/1477769#M191770</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2022-06-22T02:08:20Z</dc:date>
    </item>
  </channel>
</rss>

