Hello
I am currently searching for a new toolchain for developing software for Ardunio, because Arudino IDE is so limited.
Last week I focused on PIO. But I had problems with the configuration of the debug tools, because the infos on Atmel-ICE — PlatformIO latest documentation are not maintained well. So I deinsalled PIO after 3 days and I switched to Microchip (AVR) Studio. But PIO has the killer feature → Unit Tests! So I installed PIO again and tried to get debugging working. But currently with no happy end.
My setup: Win 10 + VSC + PIO
platformio.ini:
[env:uno]
platform = atmelavr
board = uno
framework = arduino
debug_port = :4242
debug_tool = custom
debug_init_cmds =
target remote $DEBUG_PORT
file “$PROG_PATH”
load
First I tried to setup all under Windows. But I don’t get avarice build under Windows with Cygwin.
So I thought I must switch to linux. Lucky I have a Raspberry Pi on my desk. I installed avarice, modified platformio.ini
[env:uno]
platform = atmelavr
board = uno
framework = arduino
debug_port = :4242
debug_tool = custom
and I got avarice running with $ sudo avarice --edbg --debugwire --ignore-intr :4242 -d -P atmega328p on RPi.
But when I want to start a debug session from PIO I got following error:
GDB: Write 32 bytes to 0x0
jtagWrite jtagWrite(): numByte does not match page size
Again after searching in the internet I had the felling that avarice has a bug. On my Raspberry Pi avarice 2.13 is installed, but the latest one is 2.14.
So I started uninstalling avarice on RPi. But I saw that with the installation of avarice on RPi avr-gdb was also installed. So I tried avr-gdb with avarice on the RPi. And YESSS it looks good - no errors. I was able to upload the *.elf and set breakpoints. WOOW
But it seams for me that the version of avr-gdb is too old.
Following versions are used on RPi: avr-gdb 7.11.1
But the AVR toolchain which is included in PIO is using version 7.8.
Is there a plan for updating them?
Thanks in advance