<?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>Vybrid ProcessorsのトピックRe: create binary file for uboot to start M4 from SDcard</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256360#M1251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allow us some time to investigate; if you have an example elf we can use to test with, that would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 20:10:28 GMT</pubDate>
    <dc:creator>timesyssupport</dc:creator>
    <dc:date>2013-12-19T20:10:28Z</dc:date>
    <item>
      <title>create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256355#M1246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, we use the Mentor CodeSourcery Sourcery_CodeBench_Lite_for_ARM_EABI Compiler to develop an applications for the M4 core of Vybrid. Everything works fine with the debugger. For a standalone operation we do now want to put the application just onto the SD card and let uboot start it. We have done this before. I need now to convert the ELF file into a .bin file, which uboot can load.&lt;/P&gt;&lt;P&gt;I am trying to do this with arm-eabi-objcopy and also the arm-none-eabi-objcopy. I run the following steps in a batch file (therefore the %1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arm-none-eabi-objcopy --strip-debug -R.devdata %1 %1.img&lt;/P&gt;&lt;P&gt;arm-none-eabi-objcopy -O srec %1.img %1.srec&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;arm-none-eabi-objcopy -O binary %1.img %1.bin&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all files look reasonable, however the created .bin file is huge ! I have also tried to do this directly from the elf file with -S -O. All attempts lead to some huge file. I assume this has to do with the fact, that the project uses small sections of memory accross all the RAMs on vybrid and that the objdump seems to create a contiguos memory file ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the solution ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:21:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256355#M1246</guid>
      <dc:creator>stefansinger</dc:creator>
      <dc:date>2013-12-11T19:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256356#M1247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your assumption is right. The bin includes the RAM areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But why not using the elf file directly? u-boot supports loading an elf. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could setup your SDCard to have a FAT filesystem. Then copy the elf to the FAT partition. And finally load it like that:&lt;/P&gt;&lt;P&gt;fatload mmc 0:1 0x85C00000 app.elf; bootelf 0x85C00000 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x85C00000 is just an address within the external RAM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course instead of FAT you could also use ext2 and use the u-boot command ext2load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u-boot cmds: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.compulab.co.il/workspace/mediawiki/index.php5/U-Boot_quick_reference" title="http://www.compulab.co.il/workspace/mediawiki/index.php5/U-Boot_quick_reference"&gt;U-Boot: Quick reference - Wiki&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:33:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256356#M1247</guid>
      <dc:creator>dirkdoerr</dc:creator>
      <dc:date>2013-12-11T19:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256357#M1248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure, that fatload supports ELF files on the Vybrid UBOOT ? I tried this now with an ELF file working perfectly in the debugger.&lt;/P&gt;&lt;P&gt;When I try this, the following happens:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;fatload mmc 0:1 0x1F000200 vybrid_amp.elf&lt;/P&gt;&lt;P&gt;&amp;gt;reading vybrid_amp.elf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and than it hangs forever .....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 10:19:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256357#M1248</guid>
      <dc:creator>stefansinger</dc:creator>
      <dc:date>2013-12-12T10:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256358#M1249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My example is exactly what I am doing. But I must admit that I target the A5 core not M4 and everything is loaded to DRAM. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 10:30:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256358#M1249</guid>
      <dc:creator>dirkdoerr</dc:creator>
      <dc:date>2013-12-12T10:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256359#M1250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timesyssupport"&gt;timesyssupport&lt;/A&gt; can you help on this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 22:54:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256359#M1250</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-12-18T22:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256360#M1251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allow us some time to investigate; if you have an example elf we can use to test with, that would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 20:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256360#M1251</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2013-12-19T20:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256361#M1252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does &lt;EM&gt;objdump -h %1&lt;/EM&gt; have to say?&amp;nbsp; If you have setup the images with huge holes, then the binary image will be large.&amp;nbsp; You can &lt;EM&gt;objcopy&lt;/EM&gt; the sections individually and load each of them separately.&amp;nbsp; You will call multiple &lt;EM&gt;fatload&lt;/EM&gt; commands.&amp;nbsp; One to load text and another to load data.&amp;nbsp; This actually makes sense as the M4 has a separate code/data space, so most likely the ELF has a large hole which the binary will fill with empty data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you can only use &lt;STRONG&gt;BSS&lt;/STRONG&gt; data and then write some start-up which clears all of the data section.&amp;nbsp; People who do this typically have a bunch of &lt;EM&gt;init_module() &lt;/EM&gt;functions which initialize things, including setting some static/global variables to non-zero constants.&amp;nbsp; Then there is no &lt;EM&gt;data binary&lt;/EM&gt; that needs generation, which might be the better case if you are going to move away from &lt;EM&gt;u-boot &lt;/EM&gt;for your production system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: &lt;/STRONG&gt;Some of the addresses in the MQX Elf may not work with &lt;EM&gt;u-boot&lt;/EM&gt;.&amp;nbsp; Remember &lt;EM&gt;u-boot&lt;/EM&gt; is running on the A5 and some addresses are different between the two CPUs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 23:16:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256361#M1252</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-19T23:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256362#M1253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timesyssupport"&gt;timesyssupport&lt;/A&gt; please continue with the follow up on this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 22:55:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256362#M1253</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2014-01-07T22:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: create binary file for uboot to start M4 from SDcard</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256363#M1254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to upload the elf file you have generated? As per Bill's advice, do you have a contiguous elf file? You could try using mainline u-boot (which has Vybrid support) in case the issue is with u-boot 2011.12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 00:18:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/create-binary-file-for-uboot-to-start-M4-from-SDcard/m-p/256363#M1254</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-09T00:18:52Z</dc:date>
    </item>
  </channel>
</rss>

