Kinetis K81 startup & VLLSx

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

Kinetis K81 startup & VLLSx

跳至解决方案
826 次查看
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

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
641 次查看
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 项奖励
回复
1 回复
642 次查看
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 项奖励
回复