Nick Foster wrote: > What gives? Either the variable isn't being set correctly, or the > debugger isn't reporting it back to me correctly. Or I'm totally dense > and missing something. I'm using basically the stock STM32 scripts on > revision 1370, with an Olimex ARM-USB-JTAG and the Olimex STM32-P103 dev > board. GDB is rev 6.8.50.20081007-cvs. > 1) I would use 'objdump' and dump a disassemble listing of your code and desk check it.
2) always look at the location of your stack during init code, often - I have seen people clobber their stack.. 3) disable all optimization - it might be that the compiler has placed the value in a register and you cannot see the value. 4) often 'variables' are only valid where a line number occurs. Translation: Say it takes 5 instructions to do what one line of C code is doing. You cannot stop half way through the line and examine variables. 5) And -yes, there is some funny business going on with GDB + CortexM3 - I forget the details.... agh... -Duane. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development