-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
support 'west flash' with native_sim, add debugserver support #68835
Conversation
8c2777e
to
63aa854
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.
2 nits:
- About the rename, given that "native_sim" is the name of one of the boards in tree, and that this works with any other "native" (posix arch based) board in tree including native_posix, I would prefer if we did not call the runner also "native_sim". Maybe just "native" or "native_runner" or "native_run"..
- You can add the flash target to the other boards' cmake (native_posix and nrf_bsim)
63aa854
to
1b79741
Compare
1b79741
to
ef86f8a
Compare
Just my two cents: I think the old name |
This implements debugserver, debug and flash commands, independent of how you debug or flash etc, debug interfaces can be something else other than gdb, still covered by the same runner, i.e.. through command line arguments. We should not have a runner for gdb and another one for something else.. Also, look at |
Sure, 'can'. But it's not. This runner is de-facto GDB-specific. Early abstraction is usually bad abstraction. E.g. You are adding a '-tui' parameter to this runner. This would make no sense in a GUI or server environment. Btw, it would be nice if we documented how to trigger the '-tui' parameter. |
I just realized that |
I think it's weird that runners have a separate command for 'debug' and 'debugserver'. I would think that should be two separate runners. What do you think? This may be off-topic. |
ef86f8a
to
7fce526
Compare
|
I see you added code to make it work now. Pro tip: Don't rebase before force-pushing changes. Do an extra force-push just for the rebase. This makes the 'Compare'-feature of GitHub work much better. |
7fce526
to
d186573
Compare
changing assignee, most related to native targets, no changes to west |
else: | ||
assert False | ||
|
||
def do_flash(self, **kwargs): |
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.
The kwargs
are not used. Is it not better to remove them? Same applies to do_debug
and do_debugserver
.
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.
This is the "interface" afaik, looking at all the runners:
scripts/west_commands/runners/intel_cyclonev.py: self.do_flash_elf(**kwargs)
scripts/west_commands/runners/intel_cyclonev.py: self.do_flash_elf(**kwargs)
scripts/west_commands/runners/intel_cyclonev.py: def do_flash_elf(self, **kwargs):
scripts/west_commands/runners/native.py: self.do_flash(**kwargs)
scripts/west_commands/runners/native.py: def do_flash(self, **kwargs):
scripts/west_commands/runners/nsim.py: self.do_flash(**kwargs)
scripts/west_commands/runners/nsim.py: def do_flash(self, **kwargs):
scripts/west_commands/runners/openocd.py: self.do_flash_elf(**kwargs)
scripts/west_commands/runners/openocd.py: self.do_flash(**kwargs)
scripts/west_commands/runners/openocd.py: def do_flash(self, **kwargs):
scripts/west_commands/runners/openocd.py: def do_flash_elf(self, **kwargs):
No harm in leaving this allowing future expansions
Add 'west flash' support which in the case of native_sim just start the built application. Reuse existing runner and rename it to be more generic as it does more than just debugging now. Also add debugserver command. Fixes zephyrproject-rtos#36706 Signed-off-by: Anas Nashif <[email protected]>
d186573
to
d6edf48
Compare
Fixes #36706