<?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: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433146#M25151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the modification to be done to the linker file.&lt;/P&gt;&lt;P&gt;And where exactly is the heap statically defined in the bare board code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2015 13:27:46 GMT</pubDate>
    <dc:creator>josephxavier</dc:creator>
    <dc:date>2015-04-30T13:27:46Z</dc:date>
    <item>
      <title>what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433142#M25147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using CodeWarrior for K20D72M board , I just want to know the difference between steps from reset vector to MQX initialization (in case of MQX 4.0 project ) and reset vector to main function in case of bare board project .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 13:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433142#M25147</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-04-22T13:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433143#M25148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In “classic” MQX:&lt;/P&gt;&lt;P&gt;Reset vector at address 0x00 contains address of __boot function and stack pointer (filled by linker). They will be loaded automatically during reset sequence.&lt;/P&gt;&lt;P&gt;__boot function in boot.s contains code for these steps:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Disable interrupts and clear pending flags&lt;/LI&gt;&lt;LI&gt;Setup and switch to process stack&lt;/LI&gt;&lt;LI&gt;If MCU has FPU and we enable it, code will initialize FPU module&lt;/LI&gt;&lt;LI&gt;Call toolchain_startup function&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;toolchain_startup function is toolchain dependent function which will:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;initialize necessary hardware (clocks, ddr, watchdog, ...)&lt;/LI&gt;&lt;LI&gt;initialize data - copy static variables from flash to RAM and clear zero sections&lt;/LI&gt;&lt;LI&gt;…&lt;/LI&gt;&lt;LI&gt;Call main() function&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Main() function in mqx_main.c file call MQX (function _mqx()).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bareboard startup does almost the same with exception of process stack – this is not necessary for bareboard project.&lt;/P&gt;&lt;P&gt;In CW bareboard project __thumb_startup() function in __arm_start.c file will initialize stack, hardware, FPU unit (if necessary), initialize data in RAM and call main() function. Some of init functions are located in __arm_eabi_init.c 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;RadekS&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>Tue, 28 Apr 2015 15:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433143#M25148</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-04-28T15:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433144#M25149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your advice , I am able to use malloc in the bare board project ,but I am not able to use malloc before the mqx_init in a mqx 4.0 project .&lt;/P&gt;&lt;P&gt;What is the reason for this ? I am using freescale tool chain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 04:28:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433144#M25149</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-04-29T04:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433145#M25150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for more specify question.&lt;/P&gt;&lt;P&gt;This behavior is most probably caused by missing user heap in MQX linker file.&lt;/P&gt;&lt;P&gt;In bare metal code, you have statically defined heap where you can allocate memory by malloc() function (and de-allocate by free() function).&lt;/P&gt;&lt;P&gt;Since MQX use all remaining RAM memory as MQX heap, this RAM area is initialized during MQX initialization. In MQX you have integrated allocators, therefore statically allocated heap presents wasting of RAM resources in most of cases.&lt;/P&gt;&lt;P&gt;So, If you want use malloc() and free() functions prior you run MQX, you have to modify 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;RadekS&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>Thu, 30 Apr 2015 11:10:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433145#M25150</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-04-30T11:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433146#M25151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the modification to be done to the linker file.&lt;/P&gt;&lt;P&gt;And where exactly is the heap statically defined in the bare board code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:27:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433146#M25151</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-04-30T13:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433147#M25152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose that you have to add .heap section and specify heap_size.&lt;/P&gt;&lt;P&gt;However I never do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linker file format depends on your toolchain.&lt;/P&gt;&lt;P&gt;I found nice description of GCC linker file for example here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://hertaville.com/2012/06/29/a-sample-linker-script/"&gt;http://hertaville.com/2012/06/29/a-sample-linker-script/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:54:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433147#M25152</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-04-30T13:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433148#M25153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attaching my linker file please specify where exactly is the heap statically defined I am not so familiar with linker scripts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 14:37:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433148#M25153</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-04-30T14:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433149#M25154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;__SP_INIT = . + 0x00004000; # set stack to 16kb&lt;/P&gt;&lt;P&gt;__heap_addr = __SP_INIT; # heap grows opposite stack direction&lt;/P&gt;&lt;P&gt;__heap_size = 0x00004000; # set heap to 16kb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} # end SECTIONS segment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More details about lcf file structure you can find in c:\Freescale\CW MCU v10.6\MCU\Help\PDF\MCU_Kinetis_Compiler.pdf document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GCC compiler use *.ld files with slightly different syntax. - Therefore I mention .heap section.&lt;/P&gt;&lt;P&gt;IAR compiler use *.icf files.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 17:24:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433149#M25154</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-04-30T17:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433150#M25155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since MQX use all remaining RAM memory as MQX heap, this RAM area is initialized during MQX initialization. In MQX you have integrated allocators,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur advice , it was said that MQX uses integrated allocators for heap, where is it done in MQX 4.0 projects&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 06:01:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433150#M25155</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-05-05T06:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433151#M25156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX 4.0 could use MEM or LWMEM allocators.&lt;/P&gt;&lt;P&gt;LWMEM allocators are used in default. MCUs with cache like MK70, Vybrid, CF54418 use MEM allocators instead of LWMEM (due to additional code for cached memory).&lt;/P&gt;&lt;P&gt;For allocating please use _mem_alloc() function. Appropriate allocator (MEM or LWMEM) will be selected on base of MQX_USE_LWMEM_ALLOCATOR macro.&lt;/P&gt;&lt;P&gt;There are several versions of _mem_alloc() function with specific behavior like _mem_alloc_zero(), _mem_alloc_align(),_mem_alloc_at() or _mem_alloc_system(), …. For more details please look at MQX reference manual:&lt;/P&gt;&lt;P&gt;c:\Freescale\Freescale_MQX_4_0\doc\mqx\MQXRM.pdf&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;RadekS&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>Tue, 05 May 2015 12:26:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433151#M25156</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-05-05T12:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: what is the differance in steps( from reset vector to mqx initialisation in case of mqx project and reset vector to main in case of bare board project )for code warrior project with K20D72M</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433152#M25157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u be more specific ,where exactly in code is this RAM area  initialized during MQX initialization.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:12:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/what-is-the-differance-in-steps-from-reset-vector-to-mqx/m-p/433152#M25157</guid>
      <dc:creator>josephxavier</dc:creator>
      <dc:date>2015-05-05T13:12:02Z</dc:date>
    </item>
  </channel>
</rss>

