RT1024 Double bank with memory offset

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1024 Double bank with memory offset

251 次查看
Gaetan
Contributor II

In our system, we have RT1024 and RT1064 processors.
For each microprocessor, we implemented a dual-bank bootloader mechanism to handle updates.
Since our code is quite large, we cannot execute it from RAM and instead execute it from flash.
Our images are compiled with static addresses corresponding to bank one.
When image two boots, we want to perform an address translation.
There is a simple solution for the RT1064 that involves using the IOMUXC_GPR_GPR30, 31, and 32 registers.
The operating principle is explained in the following documentation:
https://www.nxp.com/docs/en/application-note/AN12240.pdf
However, we haven't found an equivalent mechanism for the RT1024.

Does one exist?

If not, do you have a solution to suggest?

0 项奖励
回复
3 回复数

222 次查看
Gaetan
Contributor II

I found a post similar to my needs:

 

https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/imx-rt-1024-position-independent-code/m-p/144824...

 

However, I can't get it to work. Here are the steps I took:

I started a project from scratch with only a flashing debug LED. Modified the linker:

Gaetan_1-1753196122906.png

Setting the compilation options:

Gaetan_2-1753196176196.png

Adding the correct reference in the r9 register:

Gaetan_3-1753196208527.png

I load the .bin file at address 0x60080000 I created a bootloader project with only a jump to address 0x6008238D, which is the address of the reset handler 0x6000238D + the offset.

During the jump, the code fails.

I must be missing an operation, can you help me?

0 项奖励
回复

222 次查看
Gaetan
Contributor II

One thing that seems strange to me is the contents of the .map in the .got section.
I don't know if it's normal for there to be so little.

Gaetan_0-1753196566491.png

 

0 项奖励
回复

197 次查看
Gaetan
Contributor II

I think I'm close to the goal.
I've hard-coded all the values into the startup file.
When I disassemble the code, something seems strange: the function addresses are static despite the -pFIC option.

 

Gaetan_1-1753350493298.png

 

0 项奖励
回复