Question about creating bootable image for FlexSPINOR XIP for IMXRT1052 (again)

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

Question about creating bootable image for FlexSPINOR XIP for IMXRT1052 (again)

1,122 Views
jackking
Senior Contributor I

I think I am missing something fundamental in the process of creating a bootable image using the elftosb utility.

I am getting confused on the right steps to use an .srec (s19) file directly from an MCUXpresso .axf file.  I assume I can use a build with XIP_BOOT_HEADER_ENABLE=1 and XIP_EXTERNAL_FLASH=1  if the .bd file is not specifying a dcd.bin.

I'm also not sure why the documentation instructs to change the FLASH region from 0x60000000 to 0x60002000.  Is this necessary if XIP_BOOT_HEADER_ENABLE=1 and dcd.bin isn't used?

The default bd file included with elftosb has the dcd file commented out (imx-flexspinor-normal-unsigned.bd)

What I am trying to get the build process down to:

1. Compile (example) project as-is for XIP   (FLASH at 0x60000000, XIP_BOOT_HEADER_ENABLE=1 , XIP_EXTERNAL_FLASH=1), not Linked to RAM.

2. Generate .srec (s19) file from MCUXpresso

3. Use elftosb with the generated .srec and default imx-flexspinor-normal-unsigned.bd  (no dcd.bin) to generate bootable image (.bin)

4. Use blhost to upload .bin to flash using flashloader.

What am I missing?

thanks

Labels (2)
0 Kudos
5 Replies

941 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Jack King,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you refer to the post which illustrates the process to generate a boot image for Hyperflash.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

941 Views
jackking
Senior Contributor I

As always, thanks for the help.

I am already using that post as a guide for the process. 

That post doesn't explain *why* you must set the flash region to 0x60002000...  is it to leave room for the dcd block?

That post also seems to assume the .bd file has dcd.bin defined, but the default .bd file included with MFGtools has the dcd file commented out, and there isn't a "-dcd" version of the bd file.  

If I leave the XIP_BOOT_HEADER_ENABLE=1, I assume dcd.bin isn't needed and I leave the flash region at 0x60000000

0 Kudos

941 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Jack King,

Thanks for your reply.
1) That post doesn't explain *why* you must set the flash region to 0x60002000...  is it to leave room for the dcd block?
-- No, it's used to leave room for the area be highlighted by the red rectangle.

pastedImage_1.png

Hope this is clear.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

941 Views
jackking
Senior Contributor I

Thanks for the further details.  How does that block get added to the image when using MCUXpresso directly with a debugger (J-Link), and why is it not possible to create a bootable image directly from MCUXpresso?

Also, I think part of my problem is that I am Mac.  I pulled the elftosb for Mac from the NXP-MCUBootUtility package, but it looks like this utility isn't ready for use (it generates a1.6GB .bin file from my .srec!).   If I use the Windows version of elftosb, it seems to function as expected.

thanks

0 Kudos

941 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Jack King,

Thanks for your reply.
1) How does that block gets added to the image when using MCUXpresso directly with a debugger (J-Link)?
-- Go to C/C++ Build >>settings > MCU C compiler > preprocessor and set the XIP_boot_header enable and and XIP_boot_header_DCD_enable both to 1 if you have a dcd.bin file to use.
1) Why is it not possible to create a bootable image directly from MCUXpresso?
-- The elftosb is an independent tool and not integrated into the MCUXpresso IDE

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos