AnsweredAssumed Answered

Back to basics: Help me use elftosb please

Question asked by rshipman on Dec 17, 2019
Latest reply on Dec 19, 2019 by rshipman

Platform: iMX RT1021

Release package: Flashloader_RT1020_1.0_GA (attached)

(Or from here: https://www.nxp.com/webapp/Download?colCode=Flashloader_RT1020_1.0_GA )

Ubuntu linux terminal running on Windows 10

 

I am trying to use elftosb to generate a standard flashloader image.

I thought I would try something nice and simple, rather than jumping straight into the encryption stuff (which I tried without success).

 

I followed the instructions in the document:

 

Flashloader_RT1020_1.0_GA\doc\i.MX MCU Manufacturing User's Guide.pdf

 

Under section:

 

4.2. Generate unsigned normal i.MX MCU bootable image

 

I created a new folder.

 

In it I created imx-flexspinor-flashloader-unsigned.bd, containing:

 

/* From "i.MX MCU Manufacturing User's Guide.pdf" section: 4.2. Generate unsigned normal i.MX MCU bootable image */

/*****************************file start******************************************/

options {

    flags = 0x00;

    startAddress = 0x20000000;

    ivtOffset = 0x400;

    initialLoadSize = 0x2000;

}

 

sources {

    srecFile = extern(0);

}

 

section (0)

{

}

/******************************file end *****************************************/

 

I copied in Flashloader_RT1020_1.0_GA/Tools/elftosb/win/elftosb.exe

 

I copied in Flashloader_RT1020_1.0_GA/Flashloader/flashloader.srec

 

I ran:

./elftosb.exe -f imx -V -c imx-flexspinor-flashloader-unsigned.bd -o ivt_flashloader_unsigned.bin flashloader.srec

 

I get:

        Section: 0x0

 

The directory listing, after running it:

 

drwxrwxrwx 1 ronnie ronnie    512 Dec 17 15:39 .

drwxrwxrwx 1 ronnie ronnie    512 Dec 17 15:08 ..

-rwxrwxrwx 1 ronnie ronnie 826880 Dec 17 15:27 elftosb.exe

-rwxrwxrwx 1 ronnie ronnie 150586 Dec 17 15:29 flashloader.srec

-rwxrwxrwx 1 ronnie ronnie    474 Dec 17 15:39 imx-flexspinor-flashloader-unsigned.bd

-rwxrwxrwx 1 ronnie ronnie      0 Dec 17 15:40 ivt_flashloader_unsigned.bin

 

So ivt_flashloader_unsigned.bin is zero length and there is no corresponding nopadding version.

 

What is going on please?

 

Thanks for your help.

Outcomes