Kinetis K81 startup & VLLSx

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

Kinetis K81 startup & VLLSx

Jump to solution
613 Views
valentinmanea
Contributor I

Hello,

  I'm using the K81 SDk for development and I noticed something peculiar in the startup code startup_MK81F25615.S

 Both the SDK 2.1 and SDK 2.3 have code that copies a chunk from the end of text(_etext) with the lenght of (__data_end__ - __data_start__) to __data_start__ From the linker file this seems to be the __DATA_ROM section.

 However there are 2 problems here:

* from the map file there doesn't seem to be anything of note there, so I imagine this is just junk. Which is fine cause I didn't really imagine anything interesting to be there.

* the other problem is when doing a "warm boot", from VLLS3 in my case, all the application data gets overwritten with the junk from __DATA_ROM.

  Can you tell me if this was intentional and if I can run into problems down the line if I remove this code from the startup? I would like to keep my application global state between VLLSx modes.

Thanks

Labels (1)
0 Kudos
1 Solution
428 Views
valentinmanea
Contributor I

To answer my own question the copy code is required on "cold boot" or data initialization is lost. I was just confused reading the linker file.

What I ended up doing is to skip the copy of data if RCM_BASE had the wakeup bit set.

View solution in original post

0 Kudos
1 Reply
429 Views
valentinmanea
Contributor I

To answer my own question the copy code is required on "cold boot" or data initialization is lost. I was just confused reading the linker file.

What I ended up doing is to skip the copy of data if RCM_BASE had the wakeup bit set.

0 Kudos