Platform IO + Arduino UNO : hw debug vs software emulation #5
-
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 12 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@wassfila For information, my setup :
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I just want to use the "debug" process in software mode (without any JTAG Hardware interface)
Rem. : I didn't modify the platformio.ini file :
|
Beta Was this translation helpful? Give feedback.
-
@MantaRayDeeJay Do you have a reference or a guide that you followed ? if you can post the links, as I don't have an arduino uno right now, I can check the guides to see if they have any tricks, I'll also try with other Arduino boards, usually for hardware debug there has to be a debug_tool option on the config file, see but now I realised you want to debug in software, does that mean without any board attached at all as with a simulator ? if that is possible, then I should be able to reproduce it. |
Beta Was this translation helpful? Give feedback.
-
@wassfila |
Beta Was this translation helpful? Give feedback.
-
It seems I have partially found the solution : To simulate an AVR device, we need an external tool as SIMAVR to simulate as example an ATMEGA328 chip with platformio. To do it, just add the following line in the platformio.ini file : UPDATED on 2022-03-28 : |
Beta Was this translation helpful? Give feedback.
-
@wassfila By default, without specifying a debug tool, the debug tool used by default is avr-stub. By switching from one to other debug tool, the behavior and issues are different. I have posted an new thread directly on the platformio forum (explain the test sequence with the 2 debug tools) : |
Beta Was this translation helpful? Give feedback.
-
@MantaRayDeeJay |
Beta Was this translation helpful? Give feedback.
-
Without having anything connected I have an error that looks like yours, so maybe your serial port connection is wrong or you did not flash the program before you start debugging ? I have to check more in depth now what they automatically put on the debug config |
Beta Was this translation helpful? Give feedback.
-
@wassfila I have also seen this video "Arduino Uno GDB Debugging" In all cases, the board seems to be needed for debugging. |
Beta Was this translation helpful? Give feedback.
-
Lot of good links here :
|
Beta Was this translation helpful? Give feedback.
It seems I have partially found the solution :
To simulate an AVR device, we need an external tool as SIMAVR to simulate as example an ATMEGA328 chip with platformio.
https://docs.platformio.org/en/latest/plus/debug-tools/simavr.html
To do it, just add the following line in the platformio.ini file :
debug_tool = simavr
UPDATED on 2022-03-28 :
by default, the avr-stub debug tool is used.
https://docs.platformio.org/en/latest/boards/atmelavr/uno.html](url)