examples/leds_shell: use periph_gpio_mock on native#20796
examples/leds_shell: use periph_gpio_mock on native#20796benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
examples/leds_shell/Makefile
Outdated
| USEMODULE += periph_gpio | ||
|
|
||
| # Prevents native program from segfault when gpio set/clear are used | ||
| ifeq (native, $(BOARD)) |
There was a problem hiding this comment.
You also want to check for native64
There was a problem hiding this comment.
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
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_shellwhen user usesgpio setorgpio clearcommand in thenativeprogram ends with segmentation fault error. This PR solves this problem by addingperiph_gpio_mockmodule. Now, when user innativeuses 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_shellfornativewithout this PR:and with this PR:
Issues/PRs references
See also #20431