Tool/software: Code Composer Studio
CCS V6, Win7 32 bit, F28023.
I have been trying to get CCS to add two constants together then use the result in a function call.
For example I want to write an assembly routine to set the stack to a value so I can see now much is actually used.
Here is the prototype...
extern MyMemSet(uint16 *start, uint16 size, uint16 value);
Here is the Func call.
MyMemSet( &stackStart + 8, (uint16) &_STACK_SIZE - 8, 0xa55a);
stackStart is defined in the linker,
_STACK_SIZE comes from the linker command line arg --stack_size=.
The issue:
The &stackStart + 8 and &_STACK_SIZE - 8 are happening at run time. Examining the assembly code shows the addition and subtraction assembly instructions.
Everything here is a constant, how do I get this math to happen at compile time?
Thanks,
Mark.