platformio / platformio-docs

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

Debuger for nanoatmega328 #150

Closed porlock closed 1 year ago

porlock commented 4 years ago

I found information on https://docs.platformio.org/en/latest/boards/atmelavr/nanoatmega328.html#board-atmelavr-nanoatmega328

that " Arduino Nano ATmega328 has on-board debug probe and IS READY for debugging. You don’t need to use/buy external debug probe."

but only Compatible Tools is "simavr" that is a simulator, so it can debug but only on simulated env not actual board. I didn't find any way to debug code on physical Arduino Nano MCU by platformio. This information in documentation is misleading or not fully described.

pfeerick commented 4 years ago

Pretty sure this is a documentation bug. I would not put simavr in the same category as a debugging tool/native debugging since it is only a simulator, and not necessarily a 100% or 1:1 with the actual AVR hardware. There is however discussion on the PlatformIO forum from around the same time simavr was implemented of a library that could be used to allow native debugging to happen.

I believe since then Mauro managed to get all the changes into the avr-debugger library, so everything you should need to get started with it should be in that libraries repo. => https://github.com/jdolinay/avr_debug

ivankravets commented 4 years ago

Sorry, what is wrong with docs? Debugging and simulation are totally different processes. Debugging requires hardware which could be simulated. The same as the process with drinking. You can drink water but also can drink wine. And the question, is something wrong with "drinking"?

porlock commented 3 years ago

Sorry, what is wrong with docs?

Bellow statements is miss leading,

Arduino Nano ATmega328 has on-board debug probe and IS READY for debugging. You don’t need to use/buy external debug probe.

Question is: where is that onboard probe and more important, how to use it ?

We can't just simply made a equal sign between debugging on physical board with on-board probe and debugging on simulated env.

ivankravets commented 3 years ago

Ah, yes, now I understand. We will think about how to fix this.

dlschmidt commented 1 year ago

Can you please finally update the documentation? Then I would not waste multiple hours to get gdb running by compiling from source, only to find out that the documentation is very misleading.

ivankravets commented 1 year ago

Sorry for the issue, we have finally fixed it in https://github.com/platformio/platform-atmelavr/commit/a6eafeb1a4c2be0d2ae839d2052d711c4878ba15

Docs will be regenerated soon.