Arduino Uno and Nano in PICSimLab: ATmega328P with simavr

The Arduino Uno and Arduino Nano are the two ATmega328P boards in PICSimLab. Both run on the simavr backend, both can be programmed the Arduino way, and both offer something the PIC boards do not: two debugging paths instead of one. If you want to practise Arduino sketches and bare-metal AVR code without hardware, this is where to start.

Overview

PICSimLab’s Uno and Nano are simulations of the classic 328P-based Arduino boards. Under the hood sits simavr, the AVR simulator backend. PICSimLab itself has no code editor — for these boards the Code Project Wizard generates VSCode + PlatformIO projects, and the official documentation also covers programming through the Arduino IDE, with simavr-side example sources built using the Arduino IDE and avr-gcc.

Supported MCUs

Board Microcontroller Backend
Arduino Uno ATmega328P simavr
Arduino Nano ATmega328P simavr

One chip, two form factors: code written for the 328P runs on both boards, exactly as on real hardware.

Backend & debugging

simavr boards have the richest debugging story in PICSimLab: MPLAB X Integrated Debug (via the PICSimLab plugin — the plugin works for PICs and AVRs) plus remote avr-gdb debugging. For the GDB path, enable debugging in the configuration window, start avr-gdb with your .elf file and connect with target extended-remote localhost:1234. PlatformIO users can upload firmware with the picsimlab_tool command-line tool and a custom debug configuration.

What you can do

  • Build and run Arduino-framework projects for the 328P generated by the project wizard (VSCode + PlatformIO), or program the board from the Arduino IDE.
  • Debug with breakpoints in MPLAB X or avr-gdb instead of relying on Serial prints alone.
  • Combine the boards with spare parts and the oscilloscope for complete bench-style experiments, and use the virtual serial port setup when a sketch talks to a PC application.
  • Carry the same 328P code to the generic Breadboard, which also runs simavr chips.

Real limits

  • simavr’s own scope note: upstream describes its AVR core as stable for parts with up to 128 KB of flash, with preliminary support for bigger parts. The ATmega328P (32 KB) sits comfortably inside the stable range — but do not generalise that to every AVR chip.
  • Only the ATmega328P is offered on these two boards. Other Arduino boards are not in PICSimLab’s list, apart from the Arduino Mega.
  • Desktop serial simulation needs a virtual null-modem pair (com0com / tty0tty), and the online version of PICSimLab has no debugging and no real serial support — use the desktop build for these boards’ debugging features.
  • A simulation is not the physical board: electrical behaviour and precise timing still need real hardware for final validation.

Install PICSimLab from the download page, select Arduino Uno or Nano, and load your first 328P sketch.

Similar Posts