AnsweredAssumed Answered

Help with CC 0028 compile error.

Question asked by ahonkan on Nov 28, 2011
Latest reply on Nov 30, 2011 by GrahamA



I want to create a compile-time array of DMA TCBs and I'm getting the "cc0028:  error: expression must have a constant value" when I try to create the DMA chain with PCI and CPDR bits.  In it's simplest form, here's what I'm trying to do:


int tcb[3] =
    (int)&tcb[0] | CPDR,
    (int)&tcb[1] | PCI,


where CPDR corresponds to BIT_20 of the CPEP0 register and PCI is BIT_19 of CPEP0.


When I compile the above code, I get the CC0028 compile error which doesn't make sense since CPDR and PCI are constants.   If I recompile without the "| CPDR" etc, it compiles with no errors.


The example given in your pdf document located at:


doesn't give me much help.


Is there a way I can initialize the array without having to write a routine to do the 'OR' operation?