Skip to content

Commit ca9835f

Browse files
examples/leds_shell: fix segfault
1 parent 4612cc2 commit ca9835f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/leds_shell/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ QUIET ?= 1
1919
USEMODULE += shell
2020
USEMODULE += periph_gpio
2121

22+
# Prevents native and native64 program from segfault when gpio set/clear are
23+
# used without a gpiochip
24+
ifneq (,$(filter native native64,$(BOARD)))
25+
USEMODULE += periph_gpio_mock
26+
endif
27+
2228
include $(RIOTBASE)/Makefile.include

0 commit comments

Comments
 (0)