Comments (8)
Considering its now 2020 and the popularity of the 328/Arduino, I'm quite surprised debugging isn't supported yet. Is this being considered or not?
from platform-atmelavr.
Hi @warrenwoolseyiii ! Thanks for your request!
We don't have required hardware, so it would be great if you could help us implement initial support for debugging in atmelavr
platform.
First steps:
Install the development version of atmelavr
:
pio platform uninstall atmelavr
pio platform install https://github.com/platformio/platform-atmelavr.git
Then create a new project and modify platformio.ini
to fit your needs, e.g.:
[env:uno]
platform = atmelavr
framework = arduino
board = uno
debug_port = :4242
debug_tool = custom
debug_init_cmds =
target remote $DEBUG_PORT
file "$PROG_PATH"
load
debug_server =
/path/to/avarice
--edbg
--debugwire
--ignore-intr
:4242
Now you can start debugging session from terminal using pio debug --interface gdb -x .pioinit
Some of above commands might not work, especially load
(in this case you will need to upload debug version of firmware manually using avrdude
)
from platform-atmelavr.
from platform-atmelavr.
How's the progress @warrenwoolseyiii, did you manage to get it working? 😄
from platform-atmelavr.
I tried this and got:
$ pio debug --interface gdb -x .pioinit
PlatformIO Plus (https://pioplus.com) v0.14.1
Error: Traceback (most recent call last):
File "main.py", line 128, in main.main
File "/home/kaspar/.local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/home/kaspar/.local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/home/kaspar/.local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/kaspar/.local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/kaspar/.local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/home/kaspar/.local/lib/python2.7/site-packages/click/decorators.py", line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File "cmd_debug.py", line 61, in cmd_debug.cli
File "cmd_debug.py", line 66, in cmd_debug.cli
File "cmd_debug.py", line 235, in cmd_debug.validate_debug_options
TypeError: argument of type 'NoneType' is not iterable
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
http://docs.platformio.org/page/faq.html
* Report this problem to [email protected]
============================================================
$ pio --version
PlatformIO, version 3.5.2rc2
$ pio update
...
Platform Atmel AVR
--------
Updating atmelavr @ 5d08019 [Up-to-date]
Updating toolchain-atmelavr @ 1.40902.0 [Up-to-date]
Updating framework-arduinoavr @ 1.10620.2 [Up-to-date]
...
With PlatformIO 3.5.1 I get:
$ pio debug --interface gdb -x .pioinit
************************************************************************************
Obsolete PIO Core v3.5.1 is used (previous was 3.5.2rc2)
Please remove multiple PIO Cores from a system:
http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
************************************************************************************
PlatformIO Plus (https://pioplus.com) v0.14.1
Error: Traceback (most recent call last):
File "main.py", line 128, in main.main
File "/tmp/venv/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/tmp/venv/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/tmp/venv/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/venv/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/venv/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/tmp/venv/local/lib/python2.7/site-packages/click/decorators.py", line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File "cmd_debug.py", line 61, in cmd_debug.cli
File "cmd_debug.py", line 66, in cmd_debug.cli
File "cmd_debug.py", line 233, in cmd_debug.validate_debug_options
AttributeError: 'PlatformBoardConfig' object has no attribute 'get_debug_tool_name'
...
from platform-atmelavr.
Any updates on this?
from platform-atmelavr.
Since Black Magic probe is supported, I think it may be possible to hack this firmware to make it pio friendly with AVR ... any other idea?
from platform-atmelavr.
Hello, I have PICKIT4. I want debugging . Arduino leonardo is also trying to make mistakes. But it didn't work out. How should I proceed?
I have Win10, Visual Studio Code( 1.64.2), PlatformIO (v2.4.2)
from platform-atmelavr.
Related Issues (20)
- Update MCUdude cores (yet again, sorry) HOT 1
- tool-micronucleus package (Digispark support) needs update to fix "flash erase error" -71, -32, etc. on Linux
- [Feature Request] HOT 1
- Updated PIO, build now fails with "KeyError: 'tool-avrdude," but I'm not even using avrdude HOT 2
- relocation truncated to fit: R_AVR_13_PCREL against `no symbol'
- Update MCUdude cores the the latest version HOT 1
- debugging with simavr: avr-gdb depends on libncurses.so.5 and libtinfo.so.5 HOT 1
- avr-gdb in toolchain atmelavr is obsolete and depends on libncurses5 HOT 1
- framework-arduino-avr package incredibly outdated HOT 7
- DOCS: Invalid Parameters. HOT 1
- Addding a custom board to your boards list (CRODUINO_ATMEGA328P_LoRA) HOT 1
- PlatformIO passes the wrong -mmcu flag for the assembler (ATmega328PB) HOT 4
- Upload to attiny85 using optiboot (serial)
- Support for Urboot and Mighty/Mini/Mega/MajorCore v3.0.0 HOT 2
- error: 'fabs' was not declared in this scope HOT 2
- Add support for ATX2 HOT 3
- toolchain-atmelavr source code and build scripts? HOT 12
- Custom board pull request. (STF Labs B107AA)
- please consider to add upload.mcu HOT 2
- Uploading .pio\build\megaatmega2560\firmware.hex avrdude: ser_open(): can't open device "\\.\COM4": System can't find the specified file. avrdude: ser_drain(): read error: Not valid Controller. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform-atmelavr.