Regarding the application of the STARTUP function!

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

Regarding the application of the STARTUP function!

394 Views
wangbengang
Contributor I

Hello! I saw in a routine about a 9s12x controller about the "_ Startup" function! But I don't know the specific application and definition of this function! So I would like to ask if you have any tutorials on how to use this "_ Startup" function?

0 Kudos
Reply
1 Reply

382 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

there is no explanation of the startup function.

The best way to understand it is to step through it.

The S12X devices are so simple that the startup function can be omitted if you are an experienced user and your first code instruction in your project would be load stack LDS.

The startup function, however, perform initialization of variables and arrays based of linker and compilation results. The initialization is done by copying data flash flash to RAM. It also clears used part of the RAM to be initialized.

For example, if you use FILL function in your prm file then the selected RAM will be filled with given data. And this is what startup function performs.

Best regards,
Ladislav

0 Kudos
Reply