How do you guys debug when developing for Atmega?

I’m currently working on a project based on Oliver’s code and I really need to debug my code …
Something like the arduino print function would be a must …

Oh, I’m on OSX with CrossPack AVR.

Thanks !

You should check first that:

  • You have a spare UART to send data to.
  • You have enough program space for all the string manipulation and base conversion functions.
  • The timing of writing to an UART will not disrupt the rest of the code.

Since none of these conditions are met in my projects, I don’t bother. For the very rare times when I have to track something (mostly for timing reasons), I toggle a GPIO and watch it on the scope.

If you are sure that this is feasible for your project, I can post minimal serial printing code…

While developing for Picaxe instead of ATMega i use the same technique as Olivier, i make shure every of my Projects involves a LED that i use as Indicator or just scope the Pin.
Printing on a Serial Line takes time and could be blocking the Code hence scramble up all of your timing (although you can always do this on PicAxe via the Serial Programming Link).