I.MXRT1064 code placement

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

I.MXRT1064 code placement

1,703 Views
anujtanksali
Contributor II

Hello, 

I am using I.MXRT1064 EVK board for development. The architecture scheme which i will be using will contain a boot loader at 0x70000000. Application will be running at 0x70004000. The bootloader project is separate and application project is separate. 

In my application project i want to configure my flash start address to 0x70004000. How do i do it using MCUXpresso or using linker script file. Currently my application always starts from 0x70000000 and at this address currently there are sections defined  ".boot_hdr.conf" and then ".boot_hdr.ivt", ".boot_hdr.boot_data"

(see attached test_Debug.ld)

I am changing the address using the MCUXpresso memory settings (see attached mcuxpresso memory.PNG). Am changing the address highlighted in the image to 0x70004000. Now if i jump to address 0x70004000 from my bootloader then my application should start. Is this the correct way or i will have to do something else?

Assuming above changes to start application from 0x70004000 are correct then what is the significance of  ".boot_hdr.conf" and then ".boot_hdr.ivt", ".boot_hdr.boot_data" which do not get generated if flash start address is 0x70004000. these sections are only visible in map file if flash start address is 0x70000000. 

 

Another question is i wanted to place a structure at a fixed address in memory suppose 0x70003000 how do i do that using MCUXpresso settings. will i have to manually mention section (e.g. defined as __attribute__((section("test_struct")))  in my linker file or it can be done in MCUXpresso settings. if yes then how?

Regards,

Anuj

Labels (1)
0 Kudos
4 Replies

1,321 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Anuj Tanksali,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Q1) Now if I jump to address 0x70004000 from my bootloader then my application should start. Is this the correct way or I will have to do something else?
-- It's not correct because of the image structure is Image Vector Table (IVT), it consists of a variety different of sections, besides for the application, as the Fig 1 shows. You should jump to the application address to execute the application.

pastedImage_1.png

Fig 1


Q2) Will I have to manually mention section (e.g. defined as __attribute__((section("test_struct")))  in my linker file or it can be done in MCUXpresso settings. if yes then how?
-- Yes, it's able to place a structure at a fixed address via using the attribute macros, you can learn the more information via the thread:

https://community.nxp.com/thread/389101


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

1,321 Views
anujtanksali
Contributor II

Hello,

Thanks for the reply.

Can you please explain what are the sections ".boot_hdr.conf" and then ".boot_hdr.ivt", ".boot_hdr.boot_data" currently defined in my linker file and whether all sections are required?. I understand .boot_hdr.ivt will be required as it is image vector table but not sure about other 2 sections. 

As my application is a different MCUXpresso project i presume all these sections or some of the sections are required.

if yes then how can i configure them at different address as currently they start at 0x70000000. 

Please let me know

Regards,

Anuj

0 Kudos

1,321 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Anuj Tanksali,

1) Can you please explain what are the sections ".boot_hdr.conf" and then ".boot_hdr.ivt", ".boot_hdr.boot_data" currently defined in my linker file and whether all sections are required?
--boot_hdr.conf section: FDCB (Flash Device Configuration Block) is used to configure the settings of FlexSPI communication.  
boot_hdr.ivt section: Image Vector Table (IVT) that tells the memory the addresses of where everything is stored.
boot_hdr.boot_data section: Boot Data contains pointers to the start address of the Memory.
These sections are not necessary for the application demo, however bootloader demo should need these sections.

You can learn the more information about them via the thread:Generating a Bootable Image for the RT1050

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

1,321 Views
anujtanksali
Contributor II

Hello,

Thank you for your reply. The link you provided contains very good information. 

Regards,

Anuj

0 Kudos