Variables acting up

I have at the beginning of my code a section for initializing my flags:


// Flags
    runEnable 	= 0;		// starts as stopped
    keyEnable = 1;      // allow remote start after power up
    currTask   	= NONE;		// display
    starved 	= 0;
    intake 		= 0;
    extra		= 0;
    setFactoryDef = 0;
    settestmode = 0;
    cleanout = 0;

I set a breakpoint at the CurrTask line and I have runEnable and keyEnable in my watch window but the value for runEnable doesn’t seem to want to follow the code.

keyEnable                      unsigned int      1 (0x0001)                      
runEnable                      unsigned int      33 (0x0021)                     

I don’t know why it won’t get set, I notice that this only happens after a firmware update. If you just turn off the power and back on it runs fine

I’m using ucOS/2 but the OS has yet to start at this point. Also using DC9.25.

Any ideas would be helpful

Ron

I don’t know why the compiler was ignoring my assignment but I found a workaround. I set the value to nonzero then zero and it used the assignment then

// Flags
    runEnable = 10;
    runEnable 	= 0;		// starts as stopped
    keyEnable = 1;      // allow remote start after power up
    printf("Run%d Key%d ",runEnable,keyEnable);
    currTask   	= NONE;		// display

Ron