Hi All,
Is there an easy way to use the Processor Expert generated .cmd command file values like F_StackAddr in my C code.
Does something need to be included in the C file?
I tried just using F_StackAddr or _StackAddr or StackAddr but no luck.
Thanks,
Pete
Solved! Go to Solution.
The values in the command file are pointers.
In order to use the value, ie get the addres of the Stack, you need to take the adddress of the value as follows:
extern uint16_t _StackAddr; //NOTE remove the F in F_StackAddr.
uint16_t *StackAddress;
StackAddress = &_StackAddr;
Pete
Hello
- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
CrasyCat
Hi CrasyCat,
I use CW V7.3 for 56800/E and am using a DSP56F8367 DSC.
Pete
I figured it out. It is described in the Targeting MC56F83xx manual.
I just needed to declare it in my C file like:
extern unsigned int _StackAddr; //NOTE remove the F in F_StackAddr.
The values in the command file are pointers.
In order to use the value, ie get the addres of the Stack, you need to take the adddress of the value as follows:
extern uint16_t _StackAddr; //NOTE remove the F in F_StackAddr.
uint16_t *StackAddress;
StackAddress = &_StackAddr;
Pete