problems with memory using codewarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problems with memory using codewarrior

3,134 Views
jcuesta
Contributor I
Hi all and thanks for your help in advance.
 
Im still getting used to codewarrior and i have found another problem that i dont know how to solve, im still developing very simple applications although i was finally able to wirte "hello word" in rpvious programs, now im trying to do some more complex things, my problem is that severall of the variables i created (but not all) shows in the debugger as "not allocated" and in gray color, running the program step by step i have noticed that when the program reached an asignation to that variable the debbuger just skips it.
 
Im not sure what the problem is but im guessing the problem is that the variable was never asigned a memory space and therefore is that it doesnt exists, ¿anyone have found this problem?¿maybe its becouse i did something wrong in the inicialiation?.
 
Another problem less important but still annoying i have with the debbuger is that when the program reach "Uart_Print" function it doesnt writte the text completelly but only the first letters, laters when the program reach another function the interrupt "interrupt void SCIX_tx_ISR(void)" jumps in and writtes another letter, i only works if i hit on "next step" if i place another breackpoint laters it runs to the next BP withouth writting anything and if the BP was in a function when i hit in next step it jumps in again.
 
¿is there anyway to not see that interrupt in the debbuger?
 
Thanks for your help again.
Labels (1)
0 Kudos
Reply
2 Replies

1,369 Views
Lundin
Senior Contributor IV
The compiler has likely optimized away the variable and placed it inside a CPU register/accumulator. The debugger is rather poor and isn't able to show variable values if they are placed in registers.

Yep, you might want to disable interrupts in the debugger while single-stepping. You aren't telling which target you are using, but on most (all?) Freescale MCUs you will disable the interrupts by clicking on the 'i' flag in the condition code register.
0 Kudos
Reply

1,369 Views
jcuesta
Contributor I
thanks for your help Lundin, I was able to disable teh interruptions with your help, and able to track down the problem in my program withouth the interruptions.
0 Kudos
Reply