Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging with simavr: avr-gdb depends on libncurses.so.5 and libtinfo.so.5 #312

Closed
michaels011235 opened this issue May 13, 2023 · 1 comment

Comments

@michaels011235
Copy link

I have just come across this issue but it is closed. Thus I'm starting a new one.

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)

Screenshot from 2023-05-13 12-33-26

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. I'd be glad at any help :)

@michaels011235
Copy link
Author

sudo apt install libncurses5 libtinfo5 libncursesw5

solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant