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
已解决! 转到解答。
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
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