Howdy. I'm trying to use the BSLSKEY feature of the msp430f235 and I'm
running into some trouble.
>From the datasheet (http://www.ti.com/lit/ds/symlink/msp430f235.pdf, table
7 note 9), I want to initialize the word at 0xFFDE to 0 so that it's
slightly harder for me to accidentally wipe out the DCO and ADC12
calibration constants stored in info segment A.
This seems like a job for the const_sfrw macro. Here's what I tried (full
file here: http://pastebin.com/XvURBy69 ):
#define BSLSKEY_ 0xFFDE
const_sfrw(BSLSKEY, BSLSKEY_);
BSLSKEY = 0;
and here's the error that I get (full output/command here:
http://pastebin.com/4KZatFD0 ):
toggle.c:5:1: warning: data definition has no type or storage class
toggle.c:5:1: error: conflicting type qualifiers for ‘BSLSKEY’
toggle.c:4:1: note: previous declaration of ‘BSLSKEY’ was here
The macro gets expanded to this (full output/command here:
http://pastebin.com/UPSU7b4n ):
extern const volatile unsigned int BSLSKEY asm("__" "BSLSKEY");
BSLSKEY = 0;
What am I missing here? Is this even the right way to say "I want to
initialize this location to this value"? Where does 0xFFDE even get into
this mix? Does it go in the linker script? That seems to be where the other
SFR locations are defined.
Thanks in advance,
Doug Carlson
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users