-
-
Notifications
You must be signed in to change notification settings - Fork 404
Use debug "configurations" instead or "recipes" #1033
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
Conversation
Hm, this seems to cause quite a bit of command options hardcoding in Can you comment on what this change gains? Looking at the proposal itself, why configure
This seems like a good improvement, that the debug config can be specified by the board (for builtin debuggers) or by programmer tools. |
This comes from our IDE-integration experience:
So after an internal discussion, and since this feature is still very in alpha, we decided to try this other approach. BTW it may not be the best possible, we are still iterating on this one...
I know that |
For consumers, it would be more convenient, if the Instead of As a workaround, I can do |
I verified the functionality. I could integrate the new CLI changes into IDE2; the debugger works very well! 👏 I tried with my Zero boards from both VS Code and IDE2. |
For the record: I tried it on macOS only by building things locally without the pipeline. |
ec87762
to
0b17535
Compare
@cmaglie thanks for clarifying. I still think this approach has downsides, but I can see the pragmatism of it, so let's see where this leads :-) |
It makes no sense to have two separate types to create a debug session or to create a debug configuration.
0b17535
to
342ed72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Added feature: show debug configuration info with
arduino-cli debug -I ...
Added feature: debug programmer selection with
arduino-cli debug -P ...
Previously it was required:
platform.txt
liketools.reciped-id.debug.pattern=.....
that will start agdb
session for the selected board.debug.tool
definition in theboards.txt
to recall that recipe, for examplemyboard.debug.tool=recipe-id
Now:
arduino-cli
or the GUI tool will figure out how to call and setup thegdb
session. An example of configuration is the following:the
debug.server.XXXX
subkeys are optional and also "free text", this means that the configuration may be extended as needed by the specific server.For now only
openocd
is supported. Anyway, if this change works, any other kind of server may be fairly easily added.The
debug.xxx=yyy
definitions above may be supplied and overlayed in the usual ways:platform.txt
: definition here will be shared through all boards in the platformboards.txt
as part of a board definition: they will override the global platform definitionsprogrammers.txt
: they will override the boards and global platform definitions if the programmer is selected/cc @kittaakos