-
Notifications
You must be signed in to change notification settings - Fork 2k
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
examples/leds_shell: use periph_gpio_mock on native #20796
examples/leds_shell: use periph_gpio_mock on native #20796
Conversation
examples/leds_shell/Makefile
Outdated
@@ -19,4 +19,9 @@ QUIET ?= 1 | |||
USEMODULE += shell | |||
USEMODULE += periph_gpio | |||
|
|||
# Prevents native program from segfault when gpio set/clear are used | |||
ifeq (native, $(BOARD)) |
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.
You also want to check for native64
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.
Till today, I never use native64
- but it behave like native
and crash without gpio_periph_mock
.
Im not an exepert in Makfile
but after reading few pages about or adding logical OR to ifeq
(for example) i decided leave this "nasty" copy-paste code.
b2fcc52
to
29c63f6
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.
Please squash
29c63f6
to
f7473f2
Compare
Squashed! Thanks for support! |
f7473f2
to
ca9835f
Compare
Sorry to chime in late, but shouldn't the module |
|
Oh nice, didn't know about that! If that is the default, there is probably no way around manually specifying Still, I'm wondering if missing that module in a certain application on |
Contribution description
In current version of the
leds_shell
when user usesgpio set
orgpio clear
command in thenative
program ends with segmentation fault error. This PR solves this problem by addingperiph_gpio_mock
module. Now, when user innative
uses these commands program works without crach - of course as this is mockup - nothing really happens. I tested this PR in few real boards and everything works fine.Testing procedure
Output from
examples/leds_shell
fornative
without this PR:and with this PR:
Issues/PRs references
See also #20431