ivt structure

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

ivt structure

366 Views
syed1
Contributor I

Hello,

I'm using the MIMXRT11CAE4A processor and the MCU Expresso IDE tool. I've generated a binary file from the example code evkmimxrt1010TOGGLE_igpio_led_output. According to the reference manual for the iMXRT1010, the image should include an IVT structure.

In the code, the IVT header value is defined as follows:

#define IVT_MAJOR_VERSION 0x4

#define IVT_MAJOR_VERSION_SHIFT 0x4

#define IVT_MAJOR_VERSION_MASK 0xF

#define IVT_MINOR_VERSION 0x1

#define IVT_MINOR_VERSION_SHIFT 0x0

#define IVT_MINOR_VERSION_MASK 0xF

 

#define IVT_VERSION (major, minor) \

((((major)&IVT_MAJOR_VERSION_MASK) << IVT_MAJOR_VERSION_SHIFT) | \

(((minor)&IVT_MINOR_VERSION_MASK) << IVT_MINOR_VERSION_SHIFT))

 

/* IVT header */

#define IVT_TAG_HEADER 0xD1 /**< Image Vector Table */

#define IVT_SIZE 0x2000

#define IVT_PAR IVT_VERSION (IVT_MAJOR_VERSION, IVT_MINOR_VERSION)

#define IVT_HEADER (IVT_TAG_HEADER | (IVT_SIZE << | (IVT_PAR << 24))

By calculating the above, the IVT header value should be 0x410200D1.

However, the value in the image does not match this expected value. Have I made any mistakes in generating the binary file?

I've generated the binary file by right-clicking on the .axf file, selecting binary utilities, and then create binary.

The values of XIP_EXTERNAL_FLASH and XIP_BOOT_HEADER_ENABLE is both set to 1, which should mean that the IVT and boot data are added to the image.

Additionally, the reference manual specifies that the Flash Configuration Block should be present at address 0x400 of the flash memory. How should I implement this?flash 2.pngflash.png

 

 

 

bin file.png

0 Kudos
Reply
3 Replies

339 Views
Habib_MS
NXP Employee
NXP Employee

Hello @syed1 ,

 

By default, when you create an SDK, MCUxpresso configures the external FLASH starting in the direction 0x60000000, as shown the image below:

Habib_Melchor_Santos_0-1715990754247.png

 

 

This is important, because the IVT is configured according to the start address of the FLASH, as mentioned on the chapter 9.7.1 called "Image Vector Table and Boot Data" in the reference manual.

Consequently, according with the image that you provided me, the IVT will start in the address 0x60001000, As shows the .hex that is include in the image below:

Habib_Melchor_Santos_1-1715990754248.png

As you can see, the IVT is correctly configured in this address (0x410200D1 ). Note: in the image the numbers appear swapped, as it is represented it in LSB first.

BR,

Habib

0 Kudos
Reply

294 Views
syed1
Contributor I

Hello @Habib_MS

Thanks for your reply.

I've generated a new binary file that includes the IVT structure at 0x1000bin 2.png However, booting from the external flash still isn't happening. What could be the reasons for this?

While transferring the bin file to external flash I've mentioned the flash start address as 0. Is it correct?

0 Kudos
Reply

284 Views
Habib_MS
NXP Employee
NXP Employee

Hello again @syed1 ,

With respect to your question my colleague @Pablo_Ramos will be answering you, in this post.

If you have other questions about this topic, you can ask on this post and with pleasure we are going to respond you.

BR,

Habib.

0 Kudos
Reply