diff options
Diffstat (limited to 'lib/bt/CMakeLists.txt')
| -rw-r--r-- | lib/bt/CMakeLists.txt | 326 |
1 files changed, 220 insertions, 106 deletions
diff --git a/lib/bt/CMakeLists.txt b/lib/bt/CMakeLists.txt index 6dd5ef9b..a5a0742f 100644 --- a/lib/bt/CMakeLists.txt +++ b/lib/bt/CMakeLists.txt @@ -4,29 +4,19 @@ if(${target} STREQUAL "linux") return() # This component is not supported by the POSIX/Linux simulator endif() +if(CONFIG_IDF_TARGET_ESP32S3) + set(target_name "esp32c3") +elseif(CONFIG_IDF_TARGET_ESP32C61) + set(target_name "esp32c6") +else() + set(target_name "${idf_target}") +endif() + # API headers that are used in the docs are also compiled # even if CONFIG_BT_ENABLED=n as long as CONFIG_IDF_DOC_BUILD=y -if(CONFIG_IDF_TARGET_ESP32) - set(target_specific_include_dirs include/esp32/include) - -elseif(CONFIG_IDF_TARGET_ESP32C3) - set(target_specific_include_dirs include/esp32c3/include) - -elseif(CONFIG_IDF_TARGET_ESP32S3) - set(target_specific_include_dirs include/esp32c3/include) - -elseif(CONFIG_IDF_TARGET_ESP32C2) - set(target_specific_include_dirs include/esp32c2/include) - -elseif(CONFIG_IDF_TARGET_ESP32C6) - set(target_specific_include_dirs include/esp32c6/include) - -elseif(CONFIG_IDF_TARGET_ESP32H2) - set(target_specific_include_dirs include/esp32h2/include) - -elseif(CONFIG_IDF_TARGET_ESP32C5) - set(target_specific_include_dirs include/esp32c5/include) +if(CONFIG_SOC_BT_SUPPORTED) + set(target_specific_include_dirs include/${target_name}/include) endif() set(common_include_dirs @@ -34,6 +24,7 @@ set(common_include_dirs common/btc/profile/esp/blufi/include common/btc/profile/esp/include common/hci_log/include + common/ble_log/include ) set(ble_mesh_include_dirs @@ -49,12 +40,20 @@ set(ble_mesh_include_dirs "esp_ble_mesh/api/core/include" "esp_ble_mesh/api/models/include" "esp_ble_mesh/api" +) + +set(ble_mesh_v11_include_dirs "esp_ble_mesh/lib/include" "esp_ble_mesh/v1.1/api/core/include" "esp_ble_mesh/v1.1/api/models/include" "esp_ble_mesh/v1.1/btc/include" ) +if(CONFIG_IDF_DOC_BUILD) + list(APPEND ble_mesh_include_dirs + ${ble_mesh_v11_include_dirs}) +endif() + set(bluedroid_include_dirs host/bluedroid/api/include/api) if(CONFIG_BT_CONTROLLER_ENABLED OR CONFIG_IDF_DOC_BUILD) @@ -76,34 +75,24 @@ if(CONFIG_BT_ENABLED) set(include_dirs "") set(ldscripts "linker_common.lf") if(CONFIG_BT_CONTROLLER_ENABLED) + list(APPEND srcs "controller/${target_name}/bt.c") + if(CONFIG_IDF_TARGET_ESP32) - list(APPEND srcs "controller/esp32/bt.c" - "controller/esp32/hli_api.c" + list(APPEND srcs "controller/esp32/hli_api.c" "controller/esp32/hli_vectors.S") list(APPEND ldscripts "linker_rw_bt_controller.lf") - elseif(CONFIG_IDF_TARGET_ESP32C3) - list(APPEND srcs "controller/esp32c3/bt.c") list(APPEND ldscripts "linker_rw_bt_controller.lf") - elseif(CONFIG_IDF_TARGET_ESP32S3) - list(APPEND srcs "controller/esp32c3/bt.c") list(APPEND ldscripts "linker_rw_bt_controller.lf") - elseif(CONFIG_IDF_TARGET_ESP32C2) - list(APPEND srcs "controller/esp32c2/bt.c") + list(APPEND srcs "controller/${target_name}/ble.c") + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + list(APPEND srcs "controller/esp32c2/dummy.c") + endif() set(ldscripts "linker_esp32c2.lf") - - elseif(CONFIG_IDF_TARGET_ESP32C6) - list(APPEND srcs "controller/esp32c6/bt.c") - list(APPEND ldscripts "linker_esp_ble_controller.lf") - - elseif(CONFIG_IDF_TARGET_ESP32H2) - list(APPEND srcs "controller/esp32h2/bt.c") - list(APPEND ldscripts "linker_esp_ble_controller.lf") - - elseif(CONFIG_IDF_TARGET_ESP32C5) - list(APPEND srcs "controller/esp32c5/bt.c") + else() + list(APPEND srcs "controller/${target_name}/ble.c") list(APPEND ldscripts "linker_esp_ble_controller.lf") endif() @@ -117,6 +106,7 @@ if(CONFIG_BT_ENABLED) common/btc/include common/include porting/mem/ + porting/include ) list(APPEND include_dirs ${common_include_dirs}) @@ -143,6 +133,7 @@ if(CONFIG_BT_ENABLED) "common/osi/osi.c" "common/osi/semaphore.c" "porting/mem/bt_osi_mem.c" + "common/ble_log/ble_log_spi_out.c" ) # Host Bluedroid @@ -159,6 +150,7 @@ if(CONFIG_BT_ENABLED) host/bluedroid/bta/hd/include host/bluedroid/bta/hh/include host/bluedroid/bta/jv/include + host/bluedroid/bta/pba/include host/bluedroid/bta/sdp/include host/bluedroid/bta/sys/include host/bluedroid/device/include @@ -182,6 +174,8 @@ if(CONFIG_BT_ENABLED) host/bluedroid/stack/avdt/include host/bluedroid/stack/a2dp/include host/bluedroid/stack/rfcomm/include + host/bluedroid/stack/obex/include + host/bluedroid/stack/goep/include host/bluedroid/stack/include host/bluedroid/common/include host/bluedroid/config/include) @@ -205,10 +199,13 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/api/esp_spp_api.c" "host/bluedroid/api/esp_sdp_api.c" "host/bluedroid/api/esp_l2cap_bt_api.c" + "host/bluedroid/api/esp_pbac_api.c" "host/bluedroid/bta/ar/bta_ar.c" "host/bluedroid/bta/av/bta_av_aact.c" "host/bluedroid/bta/av/bta_av_act.c" "host/bluedroid/bta/av/bta_av_api.c" + "host/bluedroid/bta/av/bta_av_ca_act.c" + "host/bluedroid/bta/av/bta_av_ca_sm.c" "host/bluedroid/bta/av/bta_av_cfg.c" "host/bluedroid/bta/av/bta_av_ci.c" "host/bluedroid/bta/av/bta_av_main.c" @@ -266,6 +263,10 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/bta/hf_client/bta_hf_client_rfc.c" "host/bluedroid/bta/hf_client/bta_hf_client_sco.c" "host/bluedroid/bta/hf_client/bta_hf_client_sdp.c" + "host/bluedroid/bta/pba/bta_pba_client_act.c" + "host/bluedroid/bta/pba/bta_pba_client_api.c" + "host/bluedroid/bta/pba/bta_pba_client_main.c" + "host/bluedroid/bta/pba/bta_pba_client_sdp.c" "host/bluedroid/bta/sdp/bta_sdp.c" "host/bluedroid/bta/sdp/bta_sdp_act.c" "host/bluedroid/bta/sdp/bta_sdp_api.c" @@ -287,7 +288,9 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/btc/profile/std/a2dp/btc_a2dp.c" "host/bluedroid/btc/profile/std/a2dp/btc_a2dp_control.c" "host/bluedroid/btc/profile/std/a2dp/btc_a2dp_sink.c" + "host/bluedroid/btc/profile/std/a2dp/btc_a2dp_sink_ext_coedc.c" "host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c" + "host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source_ext_codec.c" "host/bluedroid/btc/profile/std/a2dp/btc_av.c" "host/bluedroid/btc/profile/std/avrc/btc_avrc.c" "host/bluedroid/btc/profile/std/avrc/bta_avrc_co.c" @@ -308,6 +311,7 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/btc/profile/std/spp/btc_spp.c" "host/bluedroid/btc/profile/std/sdp/btc_sdp.c" "host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c" + "host/bluedroid/btc/profile/std/pba/btc_pba_client.c" "host/bluedroid/device/bdaddr.c" "host/bluedroid/device/controller.c" "host/bluedroid/device/interop.c" @@ -404,6 +408,8 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/stack/gatt/gatt_sr.c" "host/bluedroid/stack/gatt/gatt_sr_hash.c" "host/bluedroid/stack/gatt/gatt_utils.c" + "host/bluedroid/stack/goep/goepc_api.c" + "host/bluedroid/stack/goep/goepc_main.c" "host/bluedroid/stack/hcic/hciblecmds.c" "host/bluedroid/stack/hcic/hcicmds.c" "host/bluedroid/stack/l2cap/l2c_api.c" @@ -415,6 +421,10 @@ if(CONFIG_BT_ENABLED) "host/bluedroid/stack/l2cap/l2c_ucd.c" "host/bluedroid/stack/l2cap/l2c_utils.c" "host/bluedroid/stack/l2cap/l2cap_client.c" + "host/bluedroid/stack/obex/obex_api.c" + "host/bluedroid/stack/obex/obex_main.c" + "host/bluedroid/stack/obex/obex_tl_l2cap.c" + "host/bluedroid/stack/obex/obex_tl_rfcomm.c" "host/bluedroid/stack/rfcomm/port_api.c" "host/bluedroid/stack/rfcomm/port_rfc.c" "host/bluedroid/stack/rfcomm/port_utils.c" @@ -451,6 +461,19 @@ if(CONFIG_BT_ENABLED) list(APPEND srcs "esp_ble_mesh/core/bluedroid_host/adapter.c") endif() + if(CONFIG_BT_BLE_FEAT_ISO_EN) + list(APPEND srcs "host/bluedroid/stack/btm/btm_ble_iso.c" + "host/bluedroid/btc/profile/std/iso/btc_iso_ble.c" + "host/bluedroid/api/esp_ble_iso_api.c" + "host/bluedroid/hci/ble_hci_iso.c") + endif() + + if(CONFIG_BT_BLE_FEAT_CTE_EN) + list(APPEND srcs "host/bluedroid/stack/btm/btm_ble_cte.c" + "host/bluedroid/btc/profile/std/cte/btc_ble_cte.c" + "host/bluedroid/api/esp_ble_cte_api.c") + endif() + endif() if(CONFIG_BLE_MESH) @@ -497,13 +520,15 @@ if(CONFIG_BT_ENABLED) "esp_ble_mesh/common/common.c" "esp_ble_mesh/common/kernel.c" "esp_ble_mesh/common/mutex.c" + "esp_ble_mesh/common/queue.c" "esp_ble_mesh/common/timer.c" "esp_ble_mesh/common/utils.c" "esp_ble_mesh/core/storage/settings_nvs.c" "esp_ble_mesh/core/storage/settings_uid.c" "esp_ble_mesh/core/storage/settings.c" "esp_ble_mesh/core/access.c" - "esp_ble_mesh/core/adv.c" + "esp_ble_mesh/core/adv_common.c" + "esp_ble_mesh/core/ble_adv.c" "esp_ble_mesh/core/beacon.c" "esp_ble_mesh/core/cfg_cli.c" "esp_ble_mesh/core/cfg_srv.c" @@ -539,89 +564,124 @@ if(CONFIG_BT_ENABLED) "esp_ble_mesh/models/server/server_common.c" "esp_ble_mesh/models/server/state_binding.c" "esp_ble_mesh/models/server/state_transition.c" - "esp_ble_mesh/models/server/time_scene_server.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_agg_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_brc_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_cm_data_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_df_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_lcd_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_odp_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_prb_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_rpr_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_sar_model_api.c" - "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_srpl_model_api.c" - "esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_agg_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_brc_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_df_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_lcd_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_mbt_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_odp_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_prb_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_rpr_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_sar_model.c" - "esp_ble_mesh/v1.1/btc/btc_ble_mesh_srpl_model.c" - "esp_ble_mesh/lib/ext.c") - - if(CONFIG_BLE_MESH_SAR_ENHANCEMENT) - list(APPEND srcs "esp_ble_mesh/core/transport.enh.c") + "esp_ble_mesh/models/server/time_scene_server.c") + if(CONFIG_BLE_MESH_V11_SUPPORT) + list(APPEND include_dirs ${ble_mesh_v11_include_dirs}) + + list(APPEND srcs + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_agg_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_brc_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_cm_data_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_df_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_lcd_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_odp_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_prb_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_rpr_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_sar_model_api.c" + "esp_ble_mesh/v1.1/api/core/esp_ble_mesh_srpl_model_api.c" + "esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_agg_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_brc_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_df_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_lcd_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_mbt_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_odp_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_prb_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_rpr_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_sar_model.c" + "esp_ble_mesh/v1.1/btc/btc_ble_mesh_srpl_model.c" + "esp_ble_mesh/lib/ext.c") + if(CONFIG_BLE_MESH_SAR_ENHANCEMENT) + list(APPEND srcs "esp_ble_mesh/core/transport.enh.c") + else() + list(APPEND srcs "esp_ble_mesh/core/transport.c") + endif() else() - list(APPEND srcs "esp_ble_mesh/core/transport.c") + list(APPEND srcs + "esp_ble_mesh/core/transport.c") + endif() + if(CONFIG_BLE_MESH_SUPPORT_MULTI_ADV) + list(APPEND srcs "esp_ble_mesh/core/ext_adv.c") + else() + list(APPEND srcs "esp_ble_mesh/core/adv.c") endif() endif() if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT) + list(APPEND srcs + "porting/npl/freertos/src/npl_os_freertos.c" + "porting/mem/os_msys_init.c" + "porting/transport/src/hci_transport.c" + ) + + if(CONFIG_BT_CONTROLLER_DISABLED) list(APPEND srcs - "porting/npl/freertos/src/npl_os_freertos.c" - "porting/mem/os_msys_init.c" + "host/nimble/nimble/porting/nimble/src/hal_uart.c" ) - - if(CONFIG_BT_CONTROLLER_DISABLED) + elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_RAM) + if(CONFIG_BT_NIMBLE_ENABLED) list(APPEND srcs - "host/nimble/nimble/porting/nimble/src/hal_uart.c" - ) + "porting/transport/driver/vhci/hci_driver_nimble.c" + "host/nimble/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c" + ) + else() + list(APPEND srcs + "porting/transport/driver/vhci/hci_driver_standard.c" + ) endif() - list(APPEND include_dirs - porting/include - porting/npl/freertos/include - porting/transport/include - ) - - if(CONFIG_BT_LE_HCI_INTERFACE_USE_UART) + elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_UART) list(APPEND srcs - "porting/transport/uart/hci_uart.c" - ) + "porting/transport/driver/common/hci_driver_util.c" + "porting/transport/driver/common/hci_driver_h4.c" + "porting/transport/driver/common/hci_driver_mem.c" + "porting/transport/driver/uart/hci_driver_uart_config.c" + ) + if(CONFIG_BT_LE_UART_HCI_DMA_MODE) + list(APPEND srcs + "porting/transport/driver/uart/hci_driver_uart_dma.c" + ) + else() + list(APPEND srcs + "porting/transport/driver/uart/hci_driver_uart.c" + ) endif() - endif() + endif() + list(APPEND include_dirs + porting/include + porting/npl/freertos/include + porting/transport/include + ) + endif() if(NOT (CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS OR CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS)) list(APPEND include_dirs - porting/ext/tinycrypt/include + common/tinycrypt/include + common/tinycrypt/port ) - list(APPEND srcs "porting/ext/tinycrypt/src/utils.c" - "porting/ext/tinycrypt/src/sha256.c" - "porting/ext/tinycrypt/src/ecc.c" - "porting/ext/tinycrypt/src/ctr_prng.c" - "porting/ext/tinycrypt/src/ctr_mode.c" - "porting/ext/tinycrypt/src/aes_decrypt.c" - "porting/ext/tinycrypt/src/aes_encrypt.c" - "porting/ext/tinycrypt/src/ccm_mode.c" - "porting/ext/tinycrypt/src/ecc_dsa.c" - "porting/ext/tinycrypt/src/cmac_mode.c" - "porting/ext/tinycrypt/src/ecc_dh.c" - "porting/ext/tinycrypt/src/hmac_prng.c" - "porting/ext/tinycrypt/src/ecc_platform_specific.c" - "porting/ext/tinycrypt/src/hmac.c" - "porting/ext/tinycrypt/src/cbc_mode.c") + list(APPEND srcs "common/tinycrypt/src/utils.c" + "common/tinycrypt/src/sha256.c" + "common/tinycrypt/src/ecc.c" + "common/tinycrypt/src/ctr_prng.c" + "common/tinycrypt/src/ctr_mode.c" + "common/tinycrypt/src/aes_decrypt.c" + "common/tinycrypt/src/aes_encrypt.c" + "common/tinycrypt/src/ccm_mode.c" + "common/tinycrypt/src/ecc_dsa.c" + "common/tinycrypt/src/cmac_mode.c" + "common/tinycrypt/src/ecc_dh.c" + "common/tinycrypt/src/hmac_prng.c" + "common/tinycrypt/src/ecc_platform_specific.c" + "common/tinycrypt/src/hmac.c" + "common/tinycrypt/src/cbc_mode.c" + "common/tinycrypt/port/esp_tinycrypt_port.c") endif() if(CONFIG_BT_NIMBLE_ENABLED) list(APPEND include_dirs - host/nimble/nimble/nimble/host/include host/nimble/nimble/nimble/include host/nimble/nimble/nimble/host/services/ans/include @@ -639,6 +699,7 @@ if(CONFIG_BT_ENABLED) host/nimble/nimble/nimble/host/services/tps/include host/nimble/nimble/nimble/host/services/hid/include host/nimble/nimble/nimble/host/services/sps/include + host/nimble/nimble/nimble/host/services/cte/include host/nimble/nimble/nimble/host/util/include host/nimble/nimble/nimble/host/store/ram/include host/nimble/nimble/nimble/host/store/config/include @@ -661,6 +722,7 @@ if(CONFIG_BT_ENABLED) "host/nimble/nimble/nimble/host/services/cts/src/ble_svc_cts.c" "host/nimble/nimble/nimble/host/services/hid/src/ble_svc_hid.c" "host/nimble/nimble/nimble/host/services/sps/src/ble_svc_sps.c" + "host/nimble/nimble/nimble/host/services/cte/src/ble_svc_cte.c" "host/nimble/nimble/nimble/host/src/ble_hs_conn.c" "host/nimble/nimble/nimble/host/src/ble_store_util.c" "host/nimble/nimble/nimble/host/src/ble_sm.c" @@ -711,6 +773,7 @@ if(CONFIG_BT_ENABLED) "host/nimble/nimble/nimble/host/store/config/src/ble_store_nvs.c" "host/nimble/nimble/nimble/host/src/ble_gattc_cache.c" "host/nimble/nimble/nimble/host/src/ble_gattc_cache_conn.c" + "host/nimble/nimble/nimble/host/src/ble_eatt.c" ) if(CONFIG_BT_CONTROLLER_DISABLED AND CONFIG_BT_NIMBLE_TRANSPORT_UART) @@ -725,10 +788,12 @@ if(CONFIG_BT_ENABLED) "host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c" "host/nimble/port/src/nvs_port.c" ) + list(APPEND include_dirs host/nimble/nimble/porting/nimble/include host/nimble/port/include host/nimble/nimble/nimble/transport/include + host/nimble/nimble/nimble/include ) if(CONFIG_BT_CONTROLLER_DISABLED) @@ -762,6 +827,7 @@ if(CONFIG_BT_ENABLED) if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE AND CONFIG_BT_CONTROLLER_ENABLED) list(APPEND srcs "host/nimble/esp-hci/src/esp_nimble_hci.c" + "host/nimble/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c" ) list(APPEND include_dirs ${nimble_hci_include_dirs}) endif() @@ -822,11 +888,27 @@ if(CONFIG_BT_ENABLED) endif() + +set(bt_priv_requires + nvs_flash + soc + esp_pm + esp_phy + esp_coex + mbedtls + esp_driver_uart + vfs + esp_ringbuf + esp_driver_spi + esp_driver_gpio + esp_gdbstub +) + idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" PRIV_INCLUDE_DIRS "${priv_include_dirs}" REQUIRES esp_timer esp_wifi - PRIV_REQUIRES nvs_flash soc esp_pm esp_phy esp_coex mbedtls esp_driver_uart vfs esp_ringbuf + PRIV_REQUIRES "${bt_priv_requires}" LDFRAGMENTS "${ldscripts}") if(CONFIG_BT_ENABLED) @@ -839,13 +921,42 @@ if(CONFIG_BT_ENABLED) elseif(CONFIG_IDF_TARGET_ESP32C3) target_link_directories(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32c3") - target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash) + else() + target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app) + endif() elseif(CONFIG_IDF_TARGET_ESP32S3) target_link_directories(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3") - target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash) + else() + target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app) + endif() elseif(CONFIG_BT_CONTROLLER_ENABLED) - add_prebuilt_library(libble_app "controller/lib_${target}/${target}-bt-lib/libble_app.a") + if(CONFIG_BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE) + target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=esp_panic_handler") + endif() + if(CONFIG_IDF_TARGET_ESP32C6) + add_prebuilt_library(libble_app + "${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c6/esp32c6-bt-lib/esp32c6/libble_app.a" + REQUIRES esp_phy) + elseif(CONFIG_IDF_TARGET_ESP32C61) + add_prebuilt_library(libble_app + "${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c6/esp32c6-bt-lib/esp32c61/libble_app.a" + REQUIRES esp_phy) + else() + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND CONFIG_IDF_TARGET_ESP32C2) + add_prebuilt_library(libble_app + "controller/lib_${target_name}/${target_name}-bt-lib/libble_app_flash.a" + REQUIRES esp_phy) + else() + add_prebuilt_library(libble_app + "controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a" + REQUIRES esp_phy) + endif() + endif() target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app) endif() @@ -859,7 +970,7 @@ if(CONFIG_BT_ENABLED) target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") endif() -if(CONFIG_BLE_MESH) +if(CONFIG_BLE_MESH_V11_SUPPORT) if(CONFIG_IDF_TARGET_ESP32) add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32/libble_mesh.a") target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh) @@ -872,11 +983,14 @@ if(CONFIG_BLE_MESH) elseif(CONFIG_IDF_TARGET_ESP32C6) add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32c6/libble_mesh.a") target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh) + elseif(CONFIG_IDF_TARGET_ESP32C61) + add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32c61/libble_mesh.a") + target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh) elseif(CONFIG_IDF_TARGET_ESP32H2) add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32h2/libble_mesh.a") target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh) elseif(CONFIG_IDF_TARGET_ESP32C5) - add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32C5/libble_mesh.a") + add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32c5/libble_mesh.a") target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh) endif() endif() |
