This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

weird behavior of C167

Hello,

I'm programming a OS on the C167 & XC167. Everything works fine on Simulation and with Monitor on the XC167. But when I want to debug the program on the C167 it changes structure. Here is my struct.

typedef struct taskStateStructure {
  unsigned int  id;
  unsigned int  *stack;
  unsigned int  stackSize;
  unsigned int  *usrStack;
  unsigned int  usrStackSize;
  unsigned int  taskAddress;
  unsigned int  sp;
  unsigned int  prio;
  TaskStateType taskState;
  unsigned int   nrOfOccupiedResources;
  unsigned int   nrOfActivations;
  unsigned int  isPreemptive;
  unsigned int  eventMask;
  unsigned int  eventMaskSet;
  struct taskStateStructure* next;
}tss;

When declaring a task it has the values:

id: 0
prio: 1
stack: F9E6
stackSize: 40
usrStack: C958
usrStackSize: 40
isPreemptive: 1
nrOfActivations: 0
nrOfOccupiedResources: 0
eventMask: 0
eventMaskSet: 0
next: 0



I do not change any value of the struct, but when i want to read the values in another function the task looks like this.


id: 1
prio: 1
stack: F9E6
stackSize: 40
usrStack: 1
usrStackSize: 1
isPreemptive: 1
nrOfActivations: 1
nrOfOccupiedResources: 1
eventMask: 1
eventMaskSet: 1
next: 1


What may went wrong. This program already works on the XC167 so i do not understand this behavior of the C167.

Best regards
Nora

0