diff --git a/pkg/gecko_sdk/Kconfig b/pkg/gecko_sdk/Kconfig index f4059241b5..dfdac1e4a1 100644 --- a/pkg/gecko_sdk/Kconfig +++ b/pkg/gecko_sdk/Kconfig @@ -1,11 +1,29 @@ # Copyright (c) 2021 HAW Hamburg +# 2022 SSV Software Systems GmbH # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # -config PACKAGE_GECKO_SDK +## Definition of Gecko SDK specific features +config HAS_GECKO_SDK_LIBRAIL_NONFPU + bool + help + Indicates that the CPU offers librail support if the FPU is disabled. + Librail is shipped as pre-compiled blobs. Thus, we have to adapt to + their choice how to process floats. + +config HAS_GECKO_SDK_LIBRAIL_FPU + bool + help + Indicates that the CPU offers librail support if the FPU is enabled. + Librail is shipped as pre-compiled blobs. Thus, we have to adapt to + their choice how to process floats. + + +## Provided modules +menuconfig PACKAGE_GECKO_SDK bool "Vendor library for EFM/EFR/EZR32 MCUs" depends on TEST_KCONFIG help @@ -27,4 +45,18 @@ config MODULE_GECKO_SDK_EMLIB_EXTRA help Extra utility methods from EMBLIB vendor library. +config MODULE_GECKO_SDK_LIBRAIL + bool "Radio Abstraction Interface Layer (RAIL)" + depends on (HAS_GECKO_SDK_LIBRAIL_NONFPU && !MODULE_CORTEXM_FPU) || (HAS_GECKO_SDK_LIBRAIL_FPU && MODULE_CORTEXM_FPU) + help + The Silicon Labs Radio Abstraction Interface Layer (RAIL) is required + to use the integrated radio offered by the EFR32 families. + +config MODULE_GECKO_SDK_LIBRAIL_PA + bool "Power Amplifier Power Conversion Functions" + depends on MODULE_GECKO_SDK_LIBRAIL + help + Helper to convert between transmission power in dBm and the + chip- and circuit-specific raw power level. + endif # PACKAGE_GECKO_SDK diff --git a/pkg/gecko_sdk/Makefile.dep b/pkg/gecko_sdk/Makefile.dep index 63d497bfbd..500682fa8d 100644 --- a/pkg/gecko_sdk/Makefile.dep +++ b/pkg/gecko_sdk/Makefile.dep @@ -1,2 +1,6 @@ USEMODULE += gecko_sdk_emlib USEMODULE += gecko_sdk_emlib_extra + +ifneq (,$(filter gecko_sdk_librail_pa,$(USEMODULE))) + USEMODULE += gecko_sdk_librail +endif diff --git a/pkg/gecko_sdk/Makefile.include b/pkg/gecko_sdk/Makefile.include index af892cddb0..a46cc88de2 100644 --- a/pkg/gecko_sdk/Makefile.include +++ b/pkg/gecko_sdk/Makefile.include @@ -1,3 +1,14 @@ INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/common/inc INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/emlib/inc INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/emlib-extra/inc + +ifneq (,$(filter gecko_sdk_librail,$(USEMODULE))) + ARCHIVES += $(BINDIR)/gecko_sdk_librail.a + INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/common + INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/chip/efr32/$(EFM32_LIBRAIL_HEADER_NAME) +endif + +ifneq (,$(filter gecko_sdk_librail_pa,$(USEMODULE))) + INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions + INCLUDES += -I$(PKGDIRBASE)/gecko_sdk/dist/radio/rail_lib/plugin/pa-conversions/$(EFM32_LIBRAIL_PA_HEADER_NAME)/config +endif