How to specify custom bootloader jump to exec?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify custom bootloader jump to exec?

358 Views
estacey
Contributor III

We are currently designing a bootloader that is linking in at the default base of our external Flash (0x6000000).  We need to have a separate exec linked in at a higher address in external Flash.  How do we specify a different starting address (e.g. 0x60080000) for the linker in MCU Expresso?

Thanks in advance,

Ellen 

0 Kudos
9 Replies

171 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Ellen,

Hope you are doing well.

Could you please specify the microcontroller that you are working with?

In general the starting address for different mem space can be edited using the following:

Select the project you are working with, right click then choose Properties ->C/C++Build -> MCU Settings

pastedImage_2.png

You can change the location address here, click apply and the changes will be applied to your linker files.

Please let me know if this is what you were looking for!

Hope it helps!

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos

171 Views
estacey
Contributor III

We're using the RT1021 for this project.  If we link the exec at a higher address, can we still use the debugger?

0 Kudos

171 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hope you are well.

Do you mean if you change the address for the board_flash for example to a higher address like 0x7000000 and still be able to flash and debug your application? 

0 Kudos

171 Views
estacey
Contributor III

Yes, exactly.  The debugger doesn't seem to work this way.

pastedImage_1.png

0 Kudos

171 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Ellen,

I believe this thread covers exactly what you would like to accomplish.

MCUXpresso IMXRT debug at different flash base address 

Please let me know if this works for you or if any other question comes up.

Best Regards,

Sabina

0 Kudos

171 Views
estacey
Contributor III

Is there a way I can specify a memory segment to build the debug target for and a different one for the release target? 

0 Kudos

171 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Ellen,

Unfortunately it is not possible at the moment. You can find more details described by my colleague. 

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

Best Regards,

Sabina

0 Kudos

171 Views
estacey
Contributor III

Thank you for your reply, but I actually got it to work today afterall.   I spoke to a more experienced engineer here and he told me how to do it.  Under project properties, MCU Linker, Managed Linker Script - uncheck "Manage Linker Script" for the target you want to change.  Then modify the linker script that was previously auto generated and change the memory areas designated for each section to the memory area you want to be different.  There you have it.  I have MCUXpresso manage the linker script for debug and I manage it for release.  Works nicely.

0 Kudos

171 Views
Sabina_Bruce
NXP Employee
NXP Employee

I'm glad that it worked. Thank you for posting your answer as well!

Have a good week :smileyhappy:

0 Kudos