startup file modification to add image header

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

startup file modification to add image header

Jump to solution
2,461 Views
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 Kudos
Reply
1 Solution
2,362 Views
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

 

 
 

 

 

 

 

 

 

 

 

View solution in original post

0 Kudos
Reply
8 Replies
2,363 Views
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 Kudos
Reply
2,340 Views
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 Kudos
Reply
2,331 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello bhavind,

As far as I know, there isn't .

 

BR

Alice

0 Kudos
Reply
2,311 Views
Bhavin_Dhulkotiya
Contributor II

Thank you @Alice_Yang for confirmation.

0 Kudos
Reply
2,445 Views
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 Kudos
Reply
2,441 Views
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 Kudos
Reply
2,427 Views
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 Kudos
Reply
2,421 Views
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 Kudos
Reply