Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

How to convert elf file to binary file that could boot from SD based on CycloneV and FreeRTOS

Posted by yycolin on March 31, 2017

Hello Everyone.

I am developing a project based on Altera Cyclone V SoC RTOS Demo(http://www.freertos.org/RTOSAlteraSoCARMCortex-A9.html). That Demo has been ported successfully and debug normally. Then I try to convert elf file (RTOSDemo.elf) to binary image file which could be stored in a SD card and boot from it, but failed. Two steps I have tried. Firstly, use tool "arm-altera-eabi-objcopy" as following. arm-altera-eabi-objcopy -O binary RTOSDemo.elf RTOSDemo.bin The size of file named RTOSDemo.elf is 1.85 MB, after converting,the size of RTOSDemo.bin is 3.99 GB.

Secondly, Try use tool "mkimage" as following. mkimage -A arm -T standalone -C none -a 0x100040 -e 0 -n "Baremetal Image" -d RTOSDemo.bin main-mkimage.bin But the shell return as follow. D:altera15.0embeddedhost_toolsalteramkimagemkimage.exe: Can't read RTOSDemo.bin: No error

Could you please give me some suggestion? Thank you very much.


How to convert elf file to binary file that could boot from SD based on CycloneV and FreeRTOS

Posted by rtel on March 31, 2017

Not really a FreeRTOS question as such (how do the docs for the Altera tools tell you to do this?), but:

Firstly, use tool "arm-altera-eabi-objcopy" as following. arm-altera-eabi-objcopy -O binary RTOSDemo.elf RTOSDemo.bin The size of file named RTOSDemo.elf is 1.85 MB, after converting,the size of RTOSDemo.bin is 3.99 GB.

I presume this is because you have a non-contiguous memory map (for example, executable code far away from some RAM block), and the gaps between the memory regions are just being filled with zeros.


How to convert elf file to binary file that could boot from SD based on CycloneV and FreeRTOS

Posted by yycolin on April 1, 2017

Thank you for your reply. If there is no need to use the Altera tools as above, could you please tell me how to convert the ELF file to the image file which could be stored in a SD card and boot FreeRTOS demo?


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists