platformio / platformio-docs

PlatformIO Documentation
https://docs.platformio.org
Apache License 2.0
240 stars 326 forks source link

Documentation for simavr with Arduino Uno Rev.3: how to get debugging info for peripherals #170

Closed DerAndere1 closed 3 years ago

DerAndere1 commented 3 years ago

The documentation for board uno at https://docs.platformio.org/en/latest/boards/atmelavr/uno.html#board-atmelavr-uno implies that debugging using simavr is possible with the Arduino Uno Rev3 without additional hardware. The documentation says it should work by simply adding debug_tool = simavr in platformio.ini.

I failed with the atmega-native-blink example in VSC + PlatformIO IDE with modified platformio.ini (see below):

  1. Clean All
  2. Build All
  3. Pre-Debug All
  4. In the left toolbar click "Start Debug"
  5. In the toolbar at the top, select "Debug (skip pre-debug) ()" and click "Start Debugging"

Observation: The section "PERIPHERALS" in the debug view only says "No information". Having the Arduino Uno Rev3 with the uploaded firmware connected via USB does not change this.

Here my modified platformio.ini

[platformio]
default_envs = unodebug

[env:uno]
platform = atmelavr
board = uno
build_type = release
upload_protocol = arduino

[env:unodebug]
platform = atmelavr
board = uno
build_type = debug
debug_tool = simavr
upload_protocol = arduino
ivankravets commented 3 years ago

There is no "peripherals" information for AVR. This is simulator, not hardware debugging.