<?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>MQX Software SolutionsのトピックRe: Linking init_hardware function fail for MQX RTOS</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317767#M10134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just found out the reason for the warning mentioned above - I was creating the project with PE activate, which is wrong in MQX projects: it should only be configured in the bsp project. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2014 16:23:22 GMT</pubDate>
    <dc:creator>lfschrickte</dc:creator>
    <dc:date>2014-06-12T16:23:22Z</dc:date>
    <item>
      <title>Linking init_hardware function fail for MQX RTOS</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317764#M10131</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'm trying to compile my own application using the combination CW 10.6 + MQX RTOS 4.1.0 for FRDM-K64F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I tried to create a project by going to New &amp;gt; MQX 4.1 Project - however, after naming the project, no board appear in the board selection dialog. Is this a bug or am I doing anything wrong? I've tried already to reinstall the RTOS package after CW 10.6 installation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2014-06-11 17_53_36-C_C   - psp_frdmk64f_PSP_Generic_fio_io_fp.c - CodeWarrior Development Studio.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44488i04953E2DCB4FF09E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2014-06-11 17_53_36-C_C   - psp_frdmk64f_PSP_Generic_fio_io_fp.c - CodeWarrior Development Studio.png" alt="2014-06-11 17_53_36-C_C   - psp_frdmk64f_PSP_Generic_fio_io_fp.c - CodeWarrior Development Studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried to do it by hand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- imported bsp, psp, rtcs, mfs, shell, usb libraries using the .wsd RTOS file&lt;/P&gt;&lt;P&gt;- created a new bareboard project, with PE activated and ewl libs&lt;/P&gt;&lt;P&gt;- added the PE MQX RTOS component to the project&lt;/P&gt;&lt;P&gt;- added on the 'compiler include directories' table all bsp, psp, rtcs and other MQX RTOS directories (as in sample projects, same order)&lt;/P&gt;&lt;P&gt;- added bsp, psp, rtcs and shell libraries to the 'Other objects' table in the Linker settings, as in the sample projects&lt;/P&gt;&lt;P&gt;- didn't add any line of code to the application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I compile, however, I got the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="color: #575757;"&gt;Console&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**** Build of configuration FLASH_debug for project httpsrv_mqx ****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\\Freescale\\CW MCU v10.6\\gnu\\bin\\mingw32-make" -j8 all &lt;/P&gt;&lt;P&gt;'Building target: httpsrv_mqx.elf'&lt;/P&gt;&lt;P&gt;'Executing target #79 httpsrv_mqx.elf'&lt;/P&gt;&lt;P&gt;'Invoking: ARM Ltd Windows GCC C Linker'&lt;/P&gt;&lt;P&gt;"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc"&amp;nbsp;&amp;nbsp;&amp;nbsp; @"httpsrv_mqx.args" -o"httpsrv_mqx.elf"&lt;/P&gt;&lt;P&gt;C:/Freescale/Freescale_MQX_4_1_FRDMK64F/lib/frdmk64f.cw10gcc/debug/psp/psp.a(comp.o): In function `__init_hardware':&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:/Freescale/Freescale_MQX_4_1_FRDMK64F/mqx/source/psp/cortex_m/compiler/gcc_cw/comp.c:58: undefined reference to `init_hardware'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mingw32-make: *** [httpsrv_mqx.elf] Error 1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add an empty init_hardware function to my application I get the things compiled, so the only problem is resolving this reference!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The weird part is that I checked bsp.a lib and it contains a init_hardware() function available on init_hw.o. If this lib is being pointed as "Other Objects" section of the project linker settings, why can't the linker find the function? I'm sure init_hw.o is on bsp.a lib, which is being included. Below is the prints of my compiled includes and linked "other objects":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2014-06-11 18_03_44-Properties for httpsrv_mqx.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44489iE1461200121A0AB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="2014-06-11 18_03_44-Properties for httpsrv_mqx.png" alt="2014-06-11 18_03_44-Properties for httpsrv_mqx.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2014-06-11 18_03_57-Properties for httpsrv_mqx.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44490i042E86D7B920393D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2014-06-11 18_03_57-Properties for httpsrv_mqx.png" alt="2014-06-11 18_03_57-Properties for httpsrv_mqx.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found more than one reference on how to create a MQX project on CodeWarrior, but neither works OK. So:&lt;/P&gt;&lt;P&gt;1. Am I doing things in the right way? Is there any simple guide on how to put a MQX project to work considering MQX 10.6 + PE? I can compile examples given in the MQX RTOS package, however I want to have the opportunity to start a new fresh project using MQX!&lt;/P&gt;&lt;P&gt;2. Does someone have any idea of the reason I can't get my project compiled, following steps above?&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; (yes, I don't know if the compiled application I was mentioning will work in the hardware later :smileysad:).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;3. Maybe the problem is that I'm using the MQX RTOS specific FRDM-K64F package, instead of the generic one?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luiz Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 21:05:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317764#M10131</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2014-06-11T21:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Linking init_hardware function fail for MQX RTOS</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317765#M10132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Luiz,&lt;/P&gt;&lt;P&gt;Yes, the MQX 4.1 New Project Wizard does not contain the support for K64 boards (both FRDM and TWR) so far. We will assign engineer to work on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================================================&lt;/P&gt;&lt;P&gt;this answer is for you. if it helps, please click on "correct answer " button. thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jennie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 05:40:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317765#M10132</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-06-12T05:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Linking init_hardware function fail for MQX RTOS</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317766#M10133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I just find out what the problem was with the init_hardware function: the linking order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 2 ways I could get around it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;changing link order, putting all static libraries (*.a) in the top of the link order list&lt;/LI&gt;&lt;LI&gt;changing the linker line by putting -Xlinker --start-group ${INPUTS} -Xlinker --end-group, insted of just ${INPUTS} as the default link line. I found out that in the example projects this is already done. It means the linker should check all the objects/libs cyclically until it can get dependencies resolved.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second case, which results in worst compilation performance, but I consider more "elegant", I've found a couple bugs in the CodeWarrior suite. They are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;if you keep the "Customize linker input order" checkbox marked, even if you don't change the default order, it can't resolve some environment variables used in the main project .args file. ${BSP}, ${PSP} and other variables aren't resolved, so the file has lines like this: &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;"${BSP}/bsp.a". Obviously the linking process fails. I had to uncheck that box.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if you don't have any library added, like m or rt, there is a variable, ${LIBS_QUOTED} which also get unresolved in the .args file. Putting a library to be linked together solves this.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, finally I could compile it, with one warning only: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;c:/freescale/cw mcu v10.6/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: Warning: size of symbol `PE_CpuClockConfigurations' changed from 40 in ./Generated_Code/PE_LDD.o to 120 in C:/Freescale/Freescale_MQX_4_1_FRDMK64F/lib/frdmk64f.cw10gcc/debug/bsp/bsp.a(bsp_cm.o)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this will bring me problems.. will check it later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I don't have my FRDM-K64F board yet I can't tell if all these changes I needed to compile an MQX RTOS app will result in a functional program, but let's hope I can get through this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;Luiz Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 13:41:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317766#M10133</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2014-06-12T13:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Linking init_hardware function fail for MQX RTOS</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317767#M10134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just found out the reason for the warning mentioned above - I was creating the project with PE activate, which is wrong in MQX projects: it should only be configured in the bsp project. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 16:23:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Linking-init-hardware-function-fail-for-MQX-RTOS/m-p/317767#M10134</guid>
      <dc:creator>lfschrickte</dc:creator>
      <dc:date>2014-06-12T16:23:22Z</dc:date>
    </item>
  </channel>
</rss>

