modules: hal_ambiq: fix cmake warning when no BLE

Added CONFIG_AMBIQ_COMPONENT_USE_BT and CONFIG_SOC_AMBIQ_BT_SUPPORTED
to fix empty zephyr_library() warning when BLE is not needed for compile.
Added CMake message if BT related Ambiq specific Kconfig is overriden for
not supported SoC.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
This commit is contained in:
Swift Tian 2025-01-07 17:40:44 +08:00 committed by Carles Cufí
commit 681bc1aa82
9 changed files with 147 additions and 75 deletions

View file

@ -1,78 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Antmicro <www.antmicro.com>
# Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
config AMBIQ_HAL
bool "Ambiq HAL drivers support"
depends on SOC_SERIES_APOLLO4X || SOC_SERIES_APOLLO3X
help
Use the Ambiq HAL
if AMBIQ_HAL
config AMBIQ_HAL_USE_ADC
bool
help
Use the ADC driver from Ambiq HAL
config AMBIQ_HAL_USE_GPIO
bool
help
Use the GPIO driver from Ambiq HAL
config AMBIQ_HAL_USE_STIMER
bool
help
Use the STIMER driver from Ambiq HAL
config AMBIQ_HAL_USE_TIMER
bool
help
Use the TIMER driver from Ambiq HAL
config AMBIQ_HAL_USE_WDT
bool
help
Use the WDT driver from Ambiq HAL
config AMBIQ_HAL_USE_I2C
bool
help
Use the I2C driver from Ambiq HAL
config AMBIQ_HAL_USE_SPIC
bool
help
Use the SPI Controller driver from Ambiq HAL
config AMBIQ_HAL_USE_SPID
bool
help
Use the SPI Device driver from Ambiq HAL
config AMBIQ_HAL_USE_MSPI
bool
help
Use the MSPI driver from Ambiq HAL
config AMBIQ_HAL_USE_HWINFO
bool
help
Use the HWINFO driver from Ambiq HAL
config AMBIQ_HAL_USE_BLEIF
bool
help
Use the BLEIF driver from Ambiq HAL
config AMBIQ_HAL_USE_ADC
bool
help
Use the ADC driver from Ambiq HAL
config AMBIQ_HAL_USE_USB
bool
help
Use the USB driver from Ambiq HAL
endif # AMBIQ_HAL
rsource "Kconfig.hal"
rsource "Kconfig.components"

View file

@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Antmicro <www.antmicro.com>
# Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
config AMBIQ_COMPONENT_USE_BT
bool
depends on SOC_AMBIQ_BT_SUPPORTED
help
Use Bluetooth component from Ambiq

View file

@ -0,0 +1,114 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023 Antmicro <www.antmicro.com>
# Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
config AMBIQ_HAL
bool "Ambiq HAL drivers support"
depends on SOC_SERIES_APOLLO3X || SOC_SERIES_APOLLO4X
help
Use the Ambiq HAL
if AMBIQ_HAL
config AMBIQ_HAL_USE_ADC
bool
help
Use the ADC driver from Ambiq HAL
config AMBIQ_HAL_USE_ITM
bool
help
Use the ITM HAL from Ambiq
config AMBIQ_HAL_USE_TPIU
bool
help
Use the TPIU HAL from Ambiq
config AMBIQ_HAL_USE_DCU
bool
help
Use the DCU HAL from Ambiq
config AMBIQ_HAL_USE_GPIO
bool
help
Use the GPIO driver from Ambiq HAL
config AMBIQ_HAL_USE_STIMER
bool
help
Use the STIMER driver from Ambiq HAL
config AMBIQ_HAL_USE_TIMER
bool
help
Use the TIMER driver from Ambiq HAL
config AMBIQ_HAL_USE_WDT
bool
help
Use the WDT driver from Ambiq HAL
config AMBIQ_HAL_USE_I2C
bool
help
Use the I2C driver from Ambiq HAL
config AMBIQ_HAL_USE_SPIC
bool
help
Use the SPI Controller driver from Ambiq HAL
config AMBIQ_HAL_USE_SPID
bool
help
Use the SPI Device driver from Ambiq HAL
config AMBIQ_HAL_USE_MSPI
bool
help
Use the MSPI driver from Ambiq HAL
config AMBIQ_HAL_USE_HWINFO
bool
help
Use the HWINFO driver from Ambiq HAL
config AMBIQ_HAL_USE_BLEIF
bool
help
Use the BLEIF driver from Ambiq HAL
config AMBIQ_HAL_USE_ADC
bool
help
Use the ADC driver from Ambiq HAL
config AMBIQ_HAL_USE_USB
bool
help
Use the USB driver from Ambiq HAL
config AMBIQ_HAL_USE_SDIO
bool
help
Use the SDIO driver from Ambiq HAL
config AMBIQ_HAL_USE_ADC
bool
help
Use the ADC driver from Ambiq HAL
config AMBIQ_HAL_USE_DSI
bool
help
Use the DSI driver from Ambiq HAL
config AMBIQ_HAL_USE_USB
bool
help
Use the USB driver from Ambiq HAL
endif # AMBIQ_HAL