Locating parts of code

If you want to find certain instructions in the long asm-file this can turn out to be a long search. It might help to insert a command like Serial.println(12345); and look for the 12345.

In some cases you won't find a variable because the compiler removed it while optimizing your code. In the Arduino IDE there is no way to switch off the optimization. But you can make silly use of a variable to make sure you will still find it in the asm file.

if (sin(x) > 1) Serial.println("hello");

As this condition never becomes true the behaviour of your program will not change. But the compiler (at the time of writing) is unable to detect this and does not eliminate the variable x.

contact: nji(at)gmx.de