Page 1 of 1

Strange problems with OSTCBP

PostPosted: Sun Nov 11, 2007 2:41 am
by tja105
Hi this has had me stumped for quite a while. If I have the following, in my AVR simulator:

#define TASK_TEST_P OSTCBP(4)

I get the following error: AVR Simulator: Invalid opcode 0xffff at address 0x00ffff

If I change it to #define TASK_TEST_P OSTCBP(5), the simulator / program works perfectly. No other changes at all to any other files / parameters. 3 tasks, and 4 binary semaphores linking to LE.

What have I missed?


Re: Strange problems with OSTCBP

PostPosted: Sun Nov 11, 2007 5:55 am
by aek
That is odd ... but I should point out that Pumpkin identified a flaw in the AVR simulator (code worked fine on real parts, failed in the simulator) and despited repeated contacts to Atmel support they failed to address the problem. So it may be a problem that's unique to the simulator.

Also be sure that OSTASKS is big enough.

I would just work around it by now by setting OSTASKS properly and "skipping" the tcb #4.

------------------