Generate .bin file from .elf file for M4 Freertos on i.MX7D

Hi,
I am trying the helloworld program of Freertos using M4 after following the tutorial 1. Although i am geting the .elf file but .bin file is not coming up.
I also tried with “arm-linux-gnueabihf-objcopy” utility to convert .elf to .bin but this time i am geting very hugefile with some hundreds of MB. kindly help.
With this please find the .elf.

[1] FreeRTOS on the Cortex-M4 of a Colibri iMX7 | Toradex Developer Center

Any particular reason for requiring .bin binaries? The .elf binaries should work perfectly well and are recommended.

What’s the outout of this command:
arm-none-eabi-readelf -e elf_file.elf

Looks like the binary compile line in the CMakeLists.txt is purposely commented out with an additional comment about the linker file not supporting sparse memory area

# bin does not support sparse memory area, which our default linker file uses...
#ADD_CUSTOM_COMMAND(TARGET ${ProjectName} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/${ProjectName}.elf ${EXECUTABLE_OUTPUT_PATH}/${ProjectName}.bin)

It would be nice to know why this file has deviated from the NXP demo in a few places.

The Toradex BSP uses the i.MX 7 true vector location. This worked better with debuggers and saved the storage area of an additional vector table in the internal SRAM/TCM. We debated internally whether we should move to elf or not, but ultimately decided the advantages outweigh the disadvantages.

You can read the reasons in this commit:
http://git.toradex.com/cgit/freertos-toradex.git/commit/?h=colibri-imx7-m4-freertos-v8&id=a1efb7f2ebf90307a692a1f54a03bd14714371f5

Reverting the commit should allow to build a firmware which can be converted to bin again.