AnsweredAssumed Answered

Assigning value to global variable in LCF is assigning an address instead of a value

Question asked by j... on Feb 18, 2016

Reading the "Linker Chapter" of "Targeting MC56F83xx/DSP5685x Controllers", page 286, it states that I can assign a value to global variable in the linker control file and then access it in the application C code. The variable must start with capital 'F'.

 

When I do this assignment, it is assigning an address to the variable rather than the value which is not helpful. In the "PDF manual" the example shows storing and retrieving a value, not address assignment and pointer operations. I actually wanted to use the F_var = .;. I got weird results to I resorted to using a constant, F_var = 0xAA55. This demonstrated the issue well.

 

See attachments.

I included a view of the X memory and P memory. In either case, it shows that a pointer out 0xAA54 is meaningless and non-nonsensical. Both are regions of all FF's.

 

If anyone can help or explain this to me, I would appreciate it.

 

Regards,

Jim

Original Attachment has been moved to: nxp_post_2016-02-18.txt.zip

Outcomes