Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner