In this article I would like to introduce simulating of AVR processors in Linux. When I start playing around AVR coding I don’t want to switch to Windows because of many development tools are available. Search through google and found some good hints how to proceed. This article should provide summary.
Steps:
1. install all AVR necessary tools (from source or from repository):
* avr-libc - The C runtime library for the AVR family of microcontrollers for use with the GNU toolset (cross-avr-binutils, cross-avr-gcc, uisp, etc.).
* cross-avr-binutils – Cross-development utilities: ar, as, gasp, gprof, ld, nm, objcopy, objdump, ranlib, size, strings, strip.
* cross-avr-gcc – compiler for AVR microprocessors.
* simulavr – AVR simulator
* gdb-avr – GNU debugger for avr
Note:
for users which are not familiar with gdb command line interface would be good install also ddd (graphic extension for gdb)
2. for compilation we will use Makefile
What is necessary set in Makefile:
* MCU – type of processor
* PROJECTNAME – project name
* PRJSRC – sources
* OPTLEVEL – optimization level (for debugging must be set to 0!!!)
3. Start debugging
start simulavr first:
simulavr
Start GDB server:
make gdbserver
start dddd:
make ddd
If everything is OK you should see a ddd debugger window with your sources loaded and you can start debugging.
Marek



Hi, cool post. I have been wondering about this topic,so thanks for writing.
Hi, thanks. I’ll try to continue with some small projects with AVR so stay tuned
.
good luck,
Marek