mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-06 04:48:44 +00:00
[chore][freertos] fix cmakelist add_srcs for port and portASM.S
This commit is contained in:
parent
6a018326fb
commit
26d11a0174
1 changed files with 59 additions and 54 deletions
|
@ -1,54 +1,59 @@
|
|||
################# Add global include #################
|
||||
list(APPEND ADD_INCLUDE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}"
|
||||
)
|
||||
#######################################################
|
||||
|
||||
################# Add private include #################
|
||||
# list(APPEND ADD_PRIVATE_INCLUDE
|
||||
# )
|
||||
#######################################################
|
||||
|
||||
############## Add current dir source files ###########
|
||||
file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/event_groups.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/list.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/queue.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tasks.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/timers.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/MemMang/heap_5.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/port.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/portASM.S"
|
||||
)
|
||||
list(APPEND ADD_SRCS ${sources})
|
||||
# aux_source_directory(src ADD_SRCS)
|
||||
# list(REMOVE_ITEM ADD_SRCS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
#######################################################
|
||||
|
||||
########### Add required/dependent components #########
|
||||
#list(APPEND ADD_REQUIREMENTS xxx)
|
||||
#######################################################
|
||||
|
||||
############ Add static libs ##########################
|
||||
#list(APPEND ADD_STATIC_LIB "libxxx.a")
|
||||
#######################################################
|
||||
|
||||
############ Add dynamic libs #########################
|
||||
# list(APPEND ADD_DYNAMIC_LIB "libxxx.so"
|
||||
# )
|
||||
#######################################################
|
||||
|
||||
############ Add global compile option ################
|
||||
#add components denpend on this component
|
||||
list(APPEND ADD_DEFINITIONS -DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler)
|
||||
#######################################################
|
||||
|
||||
############ Add private compile option ################
|
||||
#add compile option for this component that won't affect other modules
|
||||
# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx)
|
||||
#######################################################
|
||||
|
||||
generate_library()
|
||||
################# Add global include #################
|
||||
list(APPEND ADD_INCLUDE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}"
|
||||
)
|
||||
#######################################################
|
||||
|
||||
################# Add private include #################
|
||||
# list(APPEND ADD_PRIVATE_INCLUDE
|
||||
# )
|
||||
#######################################################
|
||||
|
||||
############## Add current dir source files ###########
|
||||
file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/event_groups.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/list.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/queue.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tasks.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/timers.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/MemMang/heap_5.c"
|
||||
)
|
||||
list(APPEND ADD_SRCS ${sources})
|
||||
if(CPU_ID)
|
||||
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/${CPU_ID}/port.c)
|
||||
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/${CPU_ID}/portASM.S)
|
||||
else()
|
||||
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/port.c)
|
||||
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/portASM.S)
|
||||
endif()
|
||||
# aux_source_directory(src ADD_SRCS)
|
||||
# list(REMOVE_ITEM ADD_SRCS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
#######################################################
|
||||
|
||||
########### Add required/dependent components #########
|
||||
#list(APPEND ADD_REQUIREMENTS xxx)
|
||||
#######################################################
|
||||
|
||||
############ Add static libs ##########################
|
||||
#list(APPEND ADD_STATIC_LIB "libxxx.a")
|
||||
#######################################################
|
||||
|
||||
############ Add dynamic libs #########################
|
||||
# list(APPEND ADD_DYNAMIC_LIB "libxxx.so"
|
||||
# )
|
||||
#######################################################
|
||||
|
||||
############ Add global compile option ################
|
||||
#add components denpend on this component
|
||||
list(APPEND ADD_DEFINITIONS -DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler)
|
||||
#######################################################
|
||||
|
||||
############ Add private compile option ################
|
||||
#add compile option for this component that won't affect other modules
|
||||
# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx)
|
||||
#######################################################
|
||||
|
||||
generate_library()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue