elftosb output is 0 bytes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

elftosb output is 0 bytes

1,767 Views
e_v_spronsen
Contributor III

I'm trying to make a bootable images without any success.
I compiled the blinky example with the options:
XIP_BOOT_HEADER_ENABLE=0 and XIP_BOOT_HEADER_DCD_ENABLE=0

next I tried to build the image with the following command:
elftosb -f imx -V -c imx-dtcm-unsigned.bd -o evkmimxrt1064_iled_blinky.bin evkmimxrt1064_iled_blinky.s19
Section: 0x0

No error message. But the bin file size is 0 bytes any suggestion what is wrong?

Thanks

0 Kudos
Reply
6 Replies

1,753 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

You can refer to the following community document, which explains step-by-step how to generate a bootable image. 

Generating a Bootable Image for the RT1050 - NXP Community

Also, you could use the MCUBootUtility. This tool was created by a co-worker. It's an automated way to do all the steps mentioned in the above community document. You can download this tool from the following repository. In the repository, you will find the instructions on how this tool works. 

GitHub - JayHeng/NXP-MCUBootUtility: A one-stop boot utility tool based on Python2.7+wxPython4.0, it...

Regards,
Victor 

0 Kudos
Reply

1,747 Views
e_v_spronsen
Contributor III

This is what I did only at the point at first the elftosb line the output of the bin file is 0 bytes. I only used a different bd file. Because it is not clear to me which one to use.

 

Maybe it is not so good idea to take a obscure github tool to do your image signing if it is not your hobby project.

 

 

 

0 Kudos
Reply

1,743 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

What RT are you using? Where do you want to flash your application? This will determine which bd file you have to use. Please share a screenshot of your cmd windows to see the command along with its output. 

Regarding the MCUBootUtility, the tool is very robust. We have several customers that used this in their production environment and never had any type of problems.

Regards,
Victor 

0 Kudos
Reply

1,738 Views
e_v_spronsen
Contributor III

I'm using the RT1064.

This is the line i'm using with result of the tool:

elftosb -f imx -V -c imx-dtcm-unsigned.bd -o evkmimxrt1064_iled_blinky.bin evkmimxrt1064_iled_blinky.s19
Section: 0x0

 

Please point me at a document where the different bd files are explained.

 

Isn't a bit odd that NXP have to recommend a public tool over there own tools,  because they did a better job.  Signing a application is creating a chain of trust. Please explain to me how/why I can trust the tool MCUBootUtility?

 

 

 

0 Kudos
Reply

1,724 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

The bd file that you are using is for when you are trying to load your image into the internal DTCM SRAM. Do you want to load your image into this memory? If not, then you should not be using this bd file. For loading this into the on-chip flash of the RT1064, the bd file that you need to use is the program_flexspi2nor_image_qspinor.bd

If you don't want to use the MCUBootUtility tool, you could use the MCUXpresso Secure Provisioning Tool. This is an official tool. The MCUXpresso Secure Provisioning Tool is a GUI-based application provided to simplify the generation and provisioning of bootable executables on NXP MCU devices. 

MCUXpresso Secure Provisioning Tool | NXP Semiconductors

Here's some training material that explains step-by-step how to use this tool. 

Getting Starting with MCUXpresso Secure Provisioning Tool | NXP Semiconductors

 

Regards,
Victor 

0 Kudos
Reply

1,715 Views
e_v_spronsen
Contributor III

Thanks I will look into it.

0 Kudos
Reply