From ca9835fc5339493f95ce8560f947fba4f90bdbfb Mon Sep 17 00:00:00 2001 From: krzysztof-cabaj Date: Wed, 24 Jul 2024 10:45:59 +0200 Subject: [PATCH] examples/leds_shell: fix segfault --- examples/leds_shell/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/leds_shell/Makefile b/examples/leds_shell/Makefile index 64ee5ebc129c..70b9ef240022 100644 --- a/examples/leds_shell/Makefile +++ b/examples/leds_shell/Makefile @@ -19,4 +19,10 @@ QUIET ?= 1 USEMODULE += shell USEMODULE += periph_gpio +# Prevents native and native64 program from segfault when gpio set/clear are +# used without a gpiochip +ifneq (,$(filter native native64,$(BOARD))) + USEMODULE += periph_gpio_mock +endif + include $(RIOTBASE)/Makefile.include