Strangest problem.....HELP!!!!!

I am using a uVision 3 to write a firmware program for a TI chipcon CC1110 chip.
Lately I am having VERY strange troubles with the compiler...
I write a code. And it works great. Then I add a line of code. Any line which has no logic meaning like int k=0; (This isn't a specific example..this happens with ANY line of code,anywhere in the program). Then I burn the program to the chip and suddenly it doesnt work although no logical change ha been made.
Then I write k=0;k=0;k=0;k=0; a few times (don't remember the number of times you need).Then I burn the code again and it works perfect!
I add another k=0; ... it stops working....add some other lines...works fine. IM GOING CRAZY this makes no sense at all!! it seems that the number of code lines needs to be aligned to a certain size.This should not happen.This is not a memory issue for sure since I still have 16K of memory left.

Is this a known keil compiler bug??What should I do??

Parents
  • Stack overflow?

    RAM overflow?

    Uninitialized pointer?

    Incorrect ISR?

    Use of function pointers?

    Incorrect cast of a pointer?

    Difference between memory size you think the chip has, and what the real chip has?

    Difference between memory sizes of the chip, and memory sizes specified in the project?

    Use of extended features of the chip for code banking, extra index etc?

    Time-critical code that gets affected by extra nop statements?

    What have _you_ done to try to figure out why it happens, or to try to step through the code and see where everything goes wrong?

    Have you tried to turn off a number of interrupt sources and checked if that makes a difference?

    By the way: HELP in a subject line is seldom a good choice. Everyone who ask questions wants help so did you add the "HELP" word for extra VIP treatment? Many responders intentionally ignore HELP threads.

Reply
  • Stack overflow?

    RAM overflow?

    Uninitialized pointer?

    Incorrect ISR?

    Use of function pointers?

    Incorrect cast of a pointer?

    Difference between memory size you think the chip has, and what the real chip has?

    Difference between memory sizes of the chip, and memory sizes specified in the project?

    Use of extended features of the chip for code banking, extra index etc?

    Time-critical code that gets affected by extra nop statements?

    What have _you_ done to try to figure out why it happens, or to try to step through the code and see where everything goes wrong?

    Have you tried to turn off a number of interrupt sources and checked if that makes a difference?

    By the way: HELP in a subject line is seldom a good choice. Everyone who ask questions wants help so did you add the "HELP" word for extra VIP treatment? Many responders intentionally ignore HELP threads.

Children
More questions in this forum