MCUXpresso IMXRT debug at different flash base address

cancel
Showing results for 
Search instead for 
Did you mean: 

MCUXpresso IMXRT debug at different flash base address

360 Views
anujtanksali
Contributor II

Hello,

I am using the IMXRT 1064 EVK board. My application is at 0x70008400 address, (see linker attached debug.ld, debug_memory.ld). When i try to debug my code it results into hardfault (see attached file Debug.png). Earlier  i have used KDS with similar linker settings and it used to debug fine even if application start address is different from the flash base address. As we have shifted to new platform IMXRT with MCUXpresso the issue is observed.

When i jump to address 0x70008400 from my bootloader it is working and my application is running so i feel the linker settings are correct. But when i try to debug am getting hardfault. I am using PE Micro MULTILINK UNIVERSAL debugger.

Please let me know what could be the issue.

Regards,

Anuj Tanksali

Labels (1)
Tags (1)
0 Kudos
5 Replies

160 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali,

   You should use the Kinetis in the previous time with KDS.

   Now, RT boot mode is totally not the same as the Kinetis.

   If you want to change the app memory location, you can't modify the Flash address from 0X70000000 to 0x70008400, it's not correct.

  From 0X70000000, it will put the flexpi_nor config code, ivt, boot data, dcd data, these it used for the boot, from 0X70002000, it is your app area, so you can modify the address from 0x70002000 to your 0x70008400, 0x70000000 to 0x70001fff must can't be modified.

  So, if you want to modify, please modify the .isr_vector address to your designed app address:

pastedImage_10.png

Program address should still from 0X70000000.

Wish it helps you!


Have a great day,
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

160 Views
anujtanksali
Contributor II

Hello kerryzhou

Thank you for your reply.

I have a bootloader at 0x70000000 which contains the code to jump to address 0x70008400 and it is working. The bootloader contains the flexpi_nor config code, ivt, boot data, dcd data. My bootloader is a different project and application is a different project.

You are saying if i individually want to debug the application at 0x70008400 then it is not possible.

On all the platforms i have worked before this is possible. 

if is not possible at all then please let me know, if i want to change my application address from 0x70002000 to 0x70008400 how do i do that?

As my bootloader and application are different projects whether this will work?

Regards,

Anuj

0 Kudos

160 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali,

  Do you mean you debug the app project at 0x70008400, but when you debug it, do you download the ivt, boot data, dcd data from 0x70000000, not just use the bootloader code? IVT should put in 0x70001000.

  About the application address from 0x70002000 to 0x70008400, I think you can insert a sector (size is 0x6400)before the isr_vector in the .ld file. In the IVT code, the IMAGE_ENTRY_ADDRESS should be the app adress, actually it is the ISR_VECTOR address.

  You can try to debug the app individually, after it works, you can add your own bootloader code.

 

Have a great day,
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

160 Views
anujtanksali
Contributor II

Hello kerryzhou

Yes i debug the project which is at 0x70008400. There are no  ivt, boot data, dcd data from 0x70000000 when i debug the project at 0x70008400.

do i need these at 0x70000000? currently there is no code at 0x70000000 when i debug my app at 0x70008400.

Regards,

Anuj

0 Kudos

160 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj,

   Yes, you need to add it.

   As you know, after the chip boot, it will configure the external flash, and read the IVT, then use the IVT enter the app code, so, if you lack the IVT, it will can't enter the app code and debug it in the XIP mode.

Wish it helps you!

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

Have a great day,
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 tim

0 Kudos