How to Download Boot and App Programs Simultaneously with CodeWarrior

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

How to Download Boot and App Programs Simultaneously with CodeWarrior

685 Views
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 Kudos
Reply
3 Replies

666 Views
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 Kudos
Reply

660 Views
L_lh
Contributor I

Resolved, thank you

0 Kudos
Reply

670 Views
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 Kudos
Reply