I have NEVER seen this error and haven't a clue how to fix it at the moment. I was writting a simple multithreading core for our RS08-based board, and it suddenly started throwing this error. I've tried simple things like rebooting, etc, to no avail.
In threading.h
typedef struct { unsigned short lc; // current line of the thread unsigned char rc; // return condition char (*fn)(struct __thread *pt); // pointer to the function} __thread;
Then in main.c
extern char ISR_RTI(__thread *pt);//...static __thread thread[] = { { 0, 0, ISR_RTI }, // real-timer interrupt handler
//...};void main(void) { static unsigned char current_thread; //... thread[current_thread].rc = thread[current_thread].fn(&thread[current_thread]);}
Red indicates the line the error happens on.
The funny thing is that it was compiling at one point. I know I changed something and lost track of what I changed and can't seem to get it back into a working state. Any help would be greatly appreciated. Thanks in advance!
Multi threading with a RS08? Interesting.
As the RS08 does not have a stack, the compiler allows to pass only 8 bit arguments (in A)
via function pointers.
Could it be that the pt argument was added? Or could it be that the memory model has changed?
In one memory model (don't even remember the name, but the one I would use usually) plain pointers
are 8 bits. In the other one, they are 16 bits and a single pointer argument would therefore not
be possible with a function pointer call.
Daniel