We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, Is it normal that EC++ won't compile properly if a variable is called "priority" or "_priority"? Example:
unsigned int priority = 1; unsigned int _priority = 1;
extern void os_init_context (P_TCB p_TCB, U8 priority, FUNCP task_body, U8 full_contxt);
Stephane, priority, _priority, _priority_ and __priority are keywords in the EC166 compiler. They all mean the same and are used to pass 'task' specific info to the C166 compiler. Please see the example below on how they are used. Peter
volatile int c16, c17; bit c16Bit; void Task4 (void) __task 4*4 __priority 2*3 __using REG_RB2 { ++c16; --c17; c16Bit = 1; }
Not quite. - priority, _priority and __priority are EC++ keywords. - _priority_ is a C keyword, not EC++ - priority and _priority should not be EC++ tokens, for they are used elsewhere in Keil AR166 headers, and not documented in the EC++ manual. Let me get to the point then: it would be really cool if the next version of AR166 headers could compile successfully with EC++! Rgds, Steph-