在84789的data flash中定义变量的问题:

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

在84789的data flash中定义变量的问题:

838 Views
jero17
Contributor I
以const 前缀定义了一个word数组和几个不同类型的单个变量,并禁止ram copy。由于使用小数据模式,编译中加入了-largeAddrInSdm选项。编译后,map文件可见word数组,但是单个变量不知所踪。

Original Attachment has been moved to: CAN84789.rar

Labels (1)
0 Kudos
1 Reply

621 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello Jun

56800E(X) linker removes unused code and data from the output file. This process is called deadstripping. To avoid this behavior of linker, you may use the keywords “FORCE_ACTIVE”, “KEEP_SECTION” in lcf file to preserve the data.

For details, please refer to section < 4.9 Deadstripping and Link Order>, <7.2.4 Deadstrip Prevention> in <7.3.5 FORCE_ACTIVE>:

C:\Freescale\CW MCU v10.6.4\MCU\Help\PDF\MCU_DSC_Compiler.pdf

In your project, to disable the deadstripping for variable ‘EdataFlt’ and ‘EdataEnd’, please:

1)  After building project successfully, open CPU Component Inspector, disable link file generation.

PE build.png

2)  Add the FORCE_ACTIVE directive in the link command file for your variables.

force_active.png

In addition, for the questions on software tools, please post on CodeWarrior forum:

CodeWarrior Development Tools

Thanks!

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

  ---------------------------------------------------------------------------------------------------------------------

0 Kudos