How can i load both bootloader and app code into MC56F82748?

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i load both bootloader and app code into MC56F82748?

472 Views
terrybogard
Contributor II

Dear nxp experts,

I defined bootloader and app code in different project with different memory area, how can i load the bootloader and app code in the same chip without overriding each other? For example TI CCS, can set the load memory area in project, Does CW have the similar function?

0 Kudos
5 Replies

454 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you know that the bootloader project is a special project, the bootloader code is located at the high address of Program flash, while the application code is located at the low address of Program flash, so they can not overlap.

Pls refer to the bootloader application note, although it focuses on MC56F84xxx, it also adapts to MC56F82xxx.

https://www.nxp.com.cn/docs/en/application-note/AN4759.pdf

 

Hope it can help you

BR

XiangJun Rong

0 Kudos

449 Views
terrybogard
Contributor II

hi xiangjun,

what i want to say is how I can load app and bootloader code by CW without override each other, if i load app first in app project, then loading bootloader project will erase all the flash module, so the app code will lose. Is there any method avoid this problem?

 

0 Kudos

422 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Terry,

I have to say this is a wrong concept that you load bootloader via JTAG then load application code via JTAG, the correct step is

1)you load bootloader via JTAG port.

2)after the bootloader starts up, your bootloader code loads application code via uart with S-record format. The application code can not run without bootloader, because the application code Reset vector points to bootloader entry point.

I attach the an4275.pdf, which is based on MC56F82xx rather than MC56F82xxx.

Hope it can help you

BR

XiangJun Rong

0 Kudos

411 Views
terrybogard
Contributor II

as you know, in the process of factory product, I want only load program one time. Load app by SCI port is not possible in factory, it will cost too much time, and it is too complicated to conduct.

0 Kudos

402 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

If you do want to merge the bootloader and application code, you have to develop it yourself.

For simplicity, I suppose you can develop the application code and compile/link and generate a *.bin file, you can save the *.bin file in an unsigned int array. You can copy the file which including the array to bootloader project, and put the array into P:0x0000 by creating a section and locate the section to the program flash from P:0x0000.

Hope it can help you

BR

Xiangjun Rong

 

0 Kudos