Monday, March 19th 2018, 3:30pm UTC+1

You are not logged in.

  • Login
  • Register



Date of registration: Jan 4th 2018

Posts: 5


Tuesday, February 20th 2018, 9:51pm

Create IVT and QSPI config on RT1052 Eval Board

I am trying to add a segment to a build for a RT1052 board.
On the RT1052 you need to have a config section for QSPI which is located at the start of flash ( 0x60000000 ) which is 512 bytes long
I inserted this section above the vector assignments in (MIMXRT1052_Vectors.s)

Additionally you need to have IVT, which has info about the image in flash.

I modified my flash_placement.xml file to add this segment, as follows.
<ProgramSection alignment="4" load="No" name=".boot_hdr" start="0x60001000" />
When I look into the map file it looks like the segment has been created but no data has been allocated for this section.

__vectors_load_start__ = 0x60000000;
.vectors 0x60000000 : AT(0x60000000)
__vectors_start__ = .;
*(.vectors .vectors.*)
__vectors_end__ = __vectors_start__ + SIZEOF(.vectors);
__vectors_size__ = SIZEOF(.vectors);
__vectors_load_end__ = __vectors_end__;

. = ASSERT(__vectors_start__ == __vectors_end__ || (__vectors_end__ >= __FLASH_segment_start__ && __vectors_end__ <= __FLASH_segment_end__) , "error: .vectors is too large to fit in FLASH memory segment");

.boot_hdr 0x0000000060001000 0x0
0x0000000060001000 __boot_hdr_start__ = .
*(.boot_hdr .boot_hdr.*)
0x0000000060001000 __boot_hdr_end__ = (__boot_hdr_start__ + SIZEOF (.boot_hdr))
0x0000000000000000 __boot_hdr_size__ = SIZEOF (.boot_hdr)
0x0000000060001000 __boot_hdr_load_end__ = __boot_hdr_end__
0x0000000000000001 . = ASSERT (((__boot_hdr_start__ == __boot_hdr_end__) || ((__boot_hdr_end__ >= __FLASH_segment_start__) && (__boot_hdr_end__ <= __FLASH_segment_end__))), error: .boot_hdr is too large to fit in FLASH memory segment)
0x0000000000000001 . = ASSERT ((__vectors_end__ <= __boot_hdr_start__), error: section .vectors overlaps absolute placed section .boot_hdr)
0x0000000060001000 __init_load_start__ = ALIGN (__boot_hdr_end__, 0x4)

Additionally when I look into the ld file that the placement.xml file creates it also has no data allocated.

__boot_hdr_load_start__ = 0x60001000;
.boot_hdr 0x60001000 : AT(0x60001000)
__boot_hdr_start__ = .;
*(.boot_hdr .boot_hdr.*)
__boot_hdr_end__ = __boot_hdr_start__ + SIZEOF(.boot_hdr);
__boot_hdr_size__ = SIZEOF(.boot_hdr);
__boot_hdr_load_end__ = __boot_hdr_end__;

. = ASSERT(__boot_hdr_start__ == __boot_hdr_end__ || (__boot_hdr_end__ >= __FLASH_segment_start__ && __boot_hdr_end__ <= __FLASH_segment_end__) , "error: .boot_hdr is too large to fit in FLASH memory segment");
. = ASSERT(__vectors_end__ <= __boot_hdr_start__ , "error: section .vectors overlaps absolute placed section .boot_hdr");

By looking at the ASSERT it looks like the linker thinks that the preceeding section (vectors) overlaps this section.
But that section starts at 0x60000000 and it has a length of 0x200.



Super Moderator

Date of registration: Jan 2nd 2017

Posts: 817


Friday, March 2nd 2018, 5:25pm

Hello Paul,

Thank you for your inquiry.
When setting up your section you wrote load="No", change that to "Yes".
Now the data should be allocated.

Does that work for you?

Best regards,