From 2b2cc60a94400d9df12e5f6bd966b71b47fe2c89 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Feb 2025 10:03:48 +0000 Subject: [PATCH] pkg/nimble: Fix compilation of 'USEMODULE += nimble_svc_bas' `pkg/nimble/Makefile.include` includes logic for the module, however the corresponding Make target is missing. This produces the following error: ``` make[3]: *** No rule to make target 'nimble_svc_bas', needed by 'all'. Stop. ``` --- pkg/nimble/Makefile | 3 ++ ...001-port-npl-riot-add-svc_bas-config.patch | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 pkg/nimble/patches/0001-port-npl-riot-add-svc_bas-config.patch diff --git a/pkg/nimble/Makefile b/pkg/nimble/Makefile index 08fd2043b8..7682ba99a0 100644 --- a/pkg/nimble/Makefile +++ b/pkg/nimble/Makefile @@ -62,6 +62,9 @@ nimble_host_store_ram: $(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/store/ram/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@ # service implementations +nimble_svc_bas: + $(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/services/bas/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@ + nimble_svc_gap: $(QQ)"$(MAKE)" -C $(PDIR)/nimble/host/services/gap/src/ -f $(RIOTBASE)/Makefile.base MODULE=$@ diff --git a/pkg/nimble/patches/0001-port-npl-riot-add-svc_bas-config.patch b/pkg/nimble/patches/0001-port-npl-riot-add-svc_bas-config.patch new file mode 100644 index 0000000000..a23aa64fc6 --- /dev/null +++ b/pkg/nimble/patches/0001-port-npl-riot-add-svc_bas-config.patch @@ -0,0 +1,35 @@ +From 3cd2f7dc9f2c17ffb83499ab569a291988cbbc08 Mon Sep 17 00:00:00 2001 +From: Marian Buschsieweke +Date: Sat, 8 Feb 2025 13:54:20 +0100 +Subject: [PATCH] port/npl/riot: add svc_bas config + +--- + porting/npl/riot/include/syscfg/syscfg.h | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/porting/npl/riot/include/syscfg/syscfg.h b/porting/npl/riot/include/syscfg/syscfg.h +index 84bdea5..a0b49c8 100644 +--- a/porting/npl/riot/include/syscfg/syscfg.h ++++ b/porting/npl/riot/include/syscfg/syscfg.h +@@ -670,6 +670,19 @@ + #define MYNEWT_VAL_BASELIBC_PRESENT (1) + #endif + ++/*** @apache-mynewt-nimble/nimble/host/services/bas */ ++#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE ++#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE (1) ++#endif ++ ++#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM ++#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM (0) ++#endif ++ ++#ifndef MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE ++#define MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE (303) ++#endif ++ + /*** @apache-mynewt-core/sys/console/stub */ + #ifndef MYNEWT_VAL_CONSOLE_UART_BAUD + #define MYNEWT_VAL_CONSOLE_UART_BAUD (115200) +-- +2.43.0