How to Download Boot and App Programs Simultaneously with CodeWarrior

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

How to Download Boot and App Programs Simultaneously with CodeWarrior

1,183 次查看
L_lh
Contributor I

I have already written the boot and app, and I want to test whether the boot can successfully jump to the app. However, I found that I cannot download both programs to flash at the same time, and they will be erased every time I download them

0 项奖励
回复
3 回复数

1,164 次查看
RadekS
NXP Employee
NXP Employee

The second option is using S12Z Flash Programmer instead of "standard programming". It is a bit slower but offers almost full control on the programming procedure. You have to show a new window with "Target Tasks" that is a bit hidden under "Other..." option.

RadekS_1-1698923372358.png

From that point is rather pretty much straigtforward.

See https://www.nxp.com/docs/en/application-note/AN4948.pdf for more details.

What missing in AN, is the configuration of Debug Configuration to perform selected Target Task.
If you will go to Debugger tab and there Download tab, you may uncheck the "Standard Download" and select your own Target Task

RadekS_2-1698923710364.png

In such a case, the Flash Programmer will be executed directly by clicking on Debug button.

I hope it helps you.
BR
RadekS

 

 

0 项奖励
回复

1,158 次查看
L_lh
Contributor I

Resolved, thank you

0 项奖励
回复

1,168 次查看
RadekS
NXP Employee
NXP Employee

 Hi L_lh,

the simplest way is adding s19 directly into the linker file (either bootloader into an application or the opposite way).
The first line in prm file will start with "HEXFILE" followed by the name of the s19 file (they should be copied into the same folder).

For example: 
HEXFILE Simple_Serial_Bootloader_for_S12Z.s19

You have to be sure that app and bl will not overlap themselves. So, besides of memory ranges, you have to manage also interrupt and reset vectors.
For more details, please look at Chapter 4.5 in https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Simple-Serial-Bootloader-for-S12Z-AN-draft/....

The realocation of interrupt vector table is described in Chapter 3.4.
The example code should help you with more details.
The jump from bootloader to the application is part of Dispatcher.c code in the Project_Settings\Startup_Code folder.


I hope it helps you.
Best regards

RadekS

0 项奖励
回复