Best way to stop volatile data being optimised out if variable unreferenced in code?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Best way to stop volatile data being optimised out if variable unreferenced in code?

ソリューションへジャンプ
1,496件の閲覧回数
CarlFST60L
Senior Contributor II


Hi,

(Using CW 7.1.2, 52259EVB + MQX)

What is the best way to stop (volatile) data being optimised out if unreferenced in the code?

 

More info; We have thousands of variables in a single file which is linked to the external NVM (MRAM). As we do software updates, some of these variables are no longer referenced, therefore optimised out. This puts the rest of our variables at different address's for these versions making software updates impossible. Basically, if the MAP still had the varibles that were not referenced, the software would address the correct locations. Manually mapping hte address is not an option.

I had a look through the help files and was unable to find a 'simple' solution.

 

Thanks,

Carl

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
817件の閲覧回数
CrasyCat
Specialist III

Hello

 

Please check your ColdFire_Build_Tools_Reference.pdf manual.

 

There is a pragma force_active as well as linker directives FORCE_ACTIVE, KEEP_SECTION or FORCEFILES that can help you achieve what you are looking for.

 

CrasyCat

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
818件の閲覧回数
CrasyCat
Specialist III

Hello

 

Please check your ColdFire_Build_Tools_Reference.pdf manual.

 

There is a pragma force_active as well as linker directives FORCE_ACTIVE, KEEP_SECTION or FORCEFILES that can help you achieve what you are looking for.

 

CrasyCat

0 件の賞賛
返信