startup file modification to add image header

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

startup file modification to add image header

跳至解决方案
2,466 次查看
Bhavin_Dhulkotiya
Contributor II

Hi all,

My original image starts from location 0x00002000. I want to add image header data(Highlighted in a rectangle) at a 0x00002100 location in flash so I have added it in the g_pfnVectors section in the startup_lpc804.c file. By adding it I got a warning as shown in the below image.

1. How to remove this warning?
2. What should be the proper way to add the header data 0x00002100?

Screenshot (60).png

0 项奖励
回复
1 解答
2,367 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

This is not very easy for MCUXpresso, please refer to my below steps, I place the image header at 0x100, the same for 0x2100.

I attached the steps as picture, also the project, you can refer to.

 

 

BR

Alice

 

 
 

 

 

 

 

 

 

 

 

在原帖中查看解决方案

0 项奖励
回复
8 回复数
2,368 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

This is not very easy for MCUXpresso, please refer to my below steps, I place the image header at 0x100, the same for 0x2100.

I attached the steps as picture, also the project, you can refer to.

 

 

BR

Alice

 

 
 

 

 

 

 

 

 

 

 

0 项奖励
回复
2,345 次查看
Bhavin_Dhulkotiya
Contributor II

Thank you! @Alice_Yang 

Is there any way to add this header in the startup.c file instead of using modified .ld file?

0 项奖励
回复
2,336 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

As far as I know, there isn't .

 

BR

Alice

0 项奖励
回复
2,316 次查看
Bhavin_Dhulkotiya
Contributor II

Thank you @Alice_Yang for confirmation.

0 项奖励
回复
2,450 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

If your project start from 0x00002000, I don't think you can add anything in 0x00002100, because

it over write vector table, you can see .map file the real memory used:

Alice_Yang_0-1640069762575.png

 

And there is no image header in LPC804 boot flow, why did you want to add it ?

 

BR

Alice

0 项奖励
回复
2,446 次查看
Bhavin_Dhulkotiya
Contributor II

Hi @Alice_Yang 

We want to add the header for the Secondary Bootloader. And we want to add it at the 0x00002100 location.

Thanks.

0 项奖励
回复
2,432 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Do you mean Secondary bootloader use memory 0x0000 to 0x1FFF,

application start from 0x2000.  Add image header into secondary bootloader project?

If yes, the two projects use overlapping address.

 

BR

Alice

0 项奖励
回复
2,426 次查看
Bhavin_Dhulkotiya
Contributor II

@Alice_Yang 

We want to implement as shown below image on LPC804. Please find the reference document here

Now I want to add a header at 0x00002100.

bhavind_0-1640181165139.png

Thanks.

0 项奖励
回复