Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
I have the following code:
volatile BYTE xdata RxQueue[RX_MAX_QUEUE] _at_ MEM_RXQUEUE;
both RX_MAX_QUEUE and MEM_RXQUEUE is defined as constants.
but I get an error:
*** ERROR C129 IN LINE 26 OF USB_BL_QUEUEMGMT.C: missing ';' before '+'
Probably, there's something wrong with your definitions!
Look at the preprocessor listing to see what the compiler's actually seeing.
That's Andy's Handy Hint for Debugging Preprocessor Problems:
www.8052.com/.../read.phtml
http://www.keil.com/support/man/docs/c51/c51_preprint.htm
Thnx
Problem with my defines:
Before: #define defineA + defineB
After: #define (defineA + defineB)
Working!
Yes, that is a clasic "problem" with #defines.
You should see this explained in any 'C' textbook, along with the recommendation to always have parentheses around any expression in a #define.
And beware of side effects...