mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-10 14:58:27 +00:00
[chore][cmake] add HAL API definition for using or not
This commit is contained in:
parent
fa7c811b2a
commit
bc1b8dffac
3 changed files with 12 additions and 4 deletions
4
Makefile
4
Makefile
|
@ -27,6 +27,7 @@ endif
|
||||||
#option config to use
|
#option config to use
|
||||||
SUPPORT_FLOAT?=n
|
SUPPORT_FLOAT?=n
|
||||||
SUPPORT_ROMAPI?=y
|
SUPPORT_ROMAPI?=y
|
||||||
|
SUPPORT_HALAPI?=y
|
||||||
SUPPORT_USB_HS?=n
|
SUPPORT_USB_HS?=n
|
||||||
SUPPORT_HW_SEC_ENG_DISABLE?=n
|
SUPPORT_HW_SEC_ENG_DISABLE?=n
|
||||||
SUPPORT_BLECONTROLLER_LIB?=
|
SUPPORT_BLECONTROLLER_LIB?=
|
||||||
|
@ -41,7 +42,8 @@ cmake_definition+= -DBOARD=$(BOARD)
|
||||||
cmake_definition+= -DAPP_DIR=$(APP_DIR)
|
cmake_definition+= -DAPP_DIR=$(APP_DIR)
|
||||||
cmake_definition+= -DAPP=$(APP)
|
cmake_definition+= -DAPP=$(APP)
|
||||||
cmake_definition+= -DBOOTROM=$(BOOTROM)
|
cmake_definition+= -DBOOTROM=$(BOOTROM)
|
||||||
cmake_definition+= -DSUPPORT_ROMAPI=$(SUPPORT_ROMAPI)
|
cmake_definition+= -DCONFIG_ROMAPI=$(SUPPORT_ROMAPI)
|
||||||
|
cmake_definition+= -DCONFIG_HALAPI=$(SUPPORT_HALAPI)
|
||||||
cmake_definition+= -DCONFIG_PRINT_FLOAT=$(SUPPORT_FLOAT)
|
cmake_definition+= -DCONFIG_PRINT_FLOAT=$(SUPPORT_FLOAT)
|
||||||
cmake_definition+= -DCONFIG_USB_HS=$(SUPPORT_USB_HS)
|
cmake_definition+= -DCONFIG_USB_HS=$(SUPPORT_USB_HS)
|
||||||
cmake_definition+= -DCONFIG_HW_SEC_ENG_DISABLE=$(SUPPORT_HW_SEC_ENG_DISABLE)
|
cmake_definition+= -DCONFIG_HW_SEC_ENG_DISABLE=$(SUPPORT_HW_SEC_ENG_DISABLE)
|
||||||
|
|
|
@ -49,9 +49,12 @@ list(APPEND ADD_REQUIREMENTS common)
|
||||||
|
|
||||||
############ Add global compile option ################
|
############ Add global compile option ################
|
||||||
#add components denpend on this component
|
#add components denpend on this component
|
||||||
if("${SUPPORT_ROMAPI}" STREQUAL "y")
|
if(CONFIG_ROMAPI)
|
||||||
list(APPEND ADD_DEFINITIONS -DBFLB_USE_ROM_DRIVER)
|
list(APPEND ADD_DEFINITIONS -DBFLB_USE_ROM_DRIVER)
|
||||||
endif()
|
endif()
|
||||||
|
if(CONFIG_HALAPI)
|
||||||
|
list(APPEND ADD_DEFINITIONS -DBFLB_USE_HAL_DRIVER)
|
||||||
|
endif()
|
||||||
list(APPEND ADD_DEFINITIONS -DARCH_RISCV)
|
list(APPEND ADD_DEFINITIONS -DARCH_RISCV)
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,13 @@ list(APPEND ADD_REQUIREMENTS common)
|
||||||
|
|
||||||
############ Add global compile option ################
|
############ Add global compile option ################
|
||||||
#add components denpend on this component
|
#add components denpend on this component
|
||||||
if("${SUPPORT_ROMAPI}" STREQUAL "y")
|
if(CONFIG_ROMAPI)
|
||||||
list(APPEND ADD_DEFINITIONS -DBFLB_USE_ROM_DRIVER)
|
list(APPEND ADD_DEFINITIONS -DBFLB_USE_ROM_DRIVER)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND ADD_DEFINITIONS -DARCH_RISCV -DBFLB_USE_HAL_DRIVER)
|
if(CONFIG_HALAPI)
|
||||||
|
list(APPEND ADD_DEFINITIONS -DBFLB_USE_HAL_DRIVER)
|
||||||
|
endif()
|
||||||
|
list(APPEND ADD_DEFINITIONS -DARCH_RISCV)
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
############ Add private compile option ################
|
############ Add private compile option ################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue