AnsweredAssumed Answered

create binary file for uboot to start M4 from SDcard

Question asked by Stefan Singer Employee on Dec 11, 2013
Latest reply on Jan 8, 2014 by Timesys Support

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.

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):

 

arm-none-eabi-objcopy --strip-debug -R.devdata %1 %1.img

arm-none-eabi-objcopy -O srec %1.img %1.srec           

arm-none-eabi-objcopy -O binary %1.img %1.bin 

 

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 ?

 

What is the solution ?

Outcomes