iMXRT1021 - IVT address and Elftosb build issue

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

iMXRT1021 - IVT address and Elftosb build issue

Jump to solution
1,001 Views
t_thurgood
Contributor III

With reference to a previous discussion...

https://community.nxp.com/message/1299693?commentID=1299693&et=notification.mention#comment-1299693

Hi Kerry Zhou

I have downloaded the latest SDK_2.7.0_EVK-MIMXRT1020-OM13588, there was a choice of OM or AGM. I'm not sure what the those letters signify?

 

Now using those unsigned bd files from SDK_2.7.0_EVK-MIMXRT1020-OM13588\middleware\mcu-boot\bin\Tools\bd_file\imxrt102x...

imx-flexspinor-normal-unsigned.bd

options {
flags = 0x00;
startAddress = 0x60000000;
ivtOffset = 0x1000;
initialLoadSize = 0x2000;
//DCDFilePath = "dcd.bin";
# Note: This is required if the default entrypoint is not the Reset_Handler
# Please set the entryPointAddress to Reset_Handler address
// entryPointAddress = 0x60002411;
}

sources {
elfFile = extern(0);
}

section (0)
{
}

 

program_flexspinor_image_qspinor.bd

# The source block assign file name to identifiers
sources {
myBinFile = extern (0);
}

constants {
kAbsAddr_Start= 0x60000000;
kAbsAddr_Ivt = 0x60001000;
kAbsAddr_App = 0x60002000;
}

I ran the elftosb bat file and I get this error...

 

Step 1 - create iMX format image files
1 file(s) copied.
Could Not Find C:\Projects\Hub2_Firmware_dev\Tools\Serial-Download\elftosb\img\hermes_image.sb
Section: 0x0
Step 2 - create Kinetis format program files
failed to open source file: elftosb\img\ivt_output_xip_nopadding.bin (ignoring for now)
error: line 62: error opening source 'myBinFile'
Could Not Find C:\Projects\Hub2_Firmware_dev\Tools\Serial-Download\elftosb\img\ivt_output_xip_nopadding.bin

 

If I change the IVT=0x400 (incorrect address for this device), elftosb builds ok.

How can I resolve this?

Is it something to do with the output file from IAR Workbench, is there a build setting that I need?

In the IAR/project/C/C++ Compiler/Preprocessor, we are using these Defines...

XIP_BOOT_HEADER_ENABLE=1
XIP_BOOT_HEADER_DCD_ENABLE=1

Is that right?

 

br,

Tony

Labels (1)
0 Kudos
1 Solution
862 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello  Tony Thurgood ,

   Thanks for your patient!

   1. About SDK_2.7.0_EVK-MIMXRT1020-OM13588 or SDK_2.7.0_EVK-MIMXRT1020-AGM01

      It adds the other board OM13588 or AGM01

     OM13588: USB Type-C Shield Board | NXP 

      Development Boards for FXAS21002C and FXOS8700CQ | NXP 

    

    2.  You can use the SDK_2.7.0_EVK-MIMXRT1020 directly

     https://mcuxpresso.nxp.com/en/select 

Under boards:

pastedImage_4.png

3. ran the elftosb bat file and I get this error...

  Please tell me where you get the bat file? Please tell me SDK path

4. Is it something to do with the output file from IAR Workbench, is there a build setting that I need?

 Yes, please check this application note, it will be useful to you.

 https://www.nxp.com/docs/en/application-note/AN12107.pdf 

pastedImage_5.png

When you use the elftosb, and the bd files directly, you don't need to enable the DCD and the header, because the bd file will help you to add the related hearder and the dcd code.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
863 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello  Tony Thurgood ,

   Thanks for your patient!

   1. About SDK_2.7.0_EVK-MIMXRT1020-OM13588 or SDK_2.7.0_EVK-MIMXRT1020-AGM01

      It adds the other board OM13588 or AGM01

     OM13588: USB Type-C Shield Board | NXP 

      Development Boards for FXAS21002C and FXOS8700CQ | NXP 

    

    2.  You can use the SDK_2.7.0_EVK-MIMXRT1020 directly

     https://mcuxpresso.nxp.com/en/select 

Under boards:

pastedImage_4.png

3. ran the elftosb bat file and I get this error...

  Please tell me where you get the bat file? Please tell me SDK path

4. Is it something to do with the output file from IAR Workbench, is there a build setting that I need?

 Yes, please check this application note, it will be useful to you.

 https://www.nxp.com/docs/en/application-note/AN12107.pdf 

pastedImage_5.png

When you use the elftosb, and the bd files directly, you don't need to enable the DCD and the header, because the bd file will help you to add the related hearder and the dcd code.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
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
862 Views
t_thurgood
Contributor III

Hi Kerry,

There is a side effect with this solution.

When the image is built with...

XIP_BOOT_HEADER_ENABLE=0

XIP_BOOT_HEADER_DCD_ENABLE=0

The code can be built and downloaded with IAR Workbench or the NXP SerialDownload/run.bat (ivt=0x1000).

The target board will run fine in Workbench, but fails to startup in stand-alone mode from POR.

Putting those #defines back to =1 and the board will start ok.

Is there something else that needs to be done?

br,

Tony

0 Kudos
862 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tony Thurgood,

  When you debug it or download with IDE, you need to add the header.

  Please refer to this application note:

https://www.nxp.com/docs/en/nxp/application-notes/AN12183.pdf 

   The serial download with MFGTOOL didn't need to add the header, because use the elftosb will add the related IVT.

  But IDE needs to add it in the code directly.

Wish it helps you!

if you have any new questions, welcome to create the new question post.

 

Kerry

 

-------------------------------------------------------------------------------
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
862 Views
t_thurgood
Contributor III

Hi Kerry,

Altering the default setting fixed the issue. The serial-downloader works as expected now.

thanks,

Tony

0 Kudos