I have just come across this issue but it is closed.
I am using VS Code version 1.77.3 on Debian 11 with the PlatformIO extension version 3.1.1 (2023-03-16). I tried to use simavr
to debug a trivial example but it does not work.
My platform.ini
file is
[env:myenv]
platform = atmelavr
board = uno
framework = arduino
debug_tool = simavr
and my code is
#include <Arduino.h>
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
}
In VS Code I built the project and used Run → Start Debugging, but I got no call stack, variables, etc. (see image below)
The debug console got the error message
/home/michael/.platformio/packages/toolchain-atmelavr/bin/avr-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
I suppose this is the reason for the debugger not working. Is it? Or am I missing something else?
I’d be glad at any help