mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-10 14:58:27 +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 #################
|
################# Add global include #################
|
||||||
list(APPEND ADD_INCLUDE
|
list(APPEND ADD_INCLUDE
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}"
|
"${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}"
|
||||||
)
|
)
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
################# Add private include #################
|
################# Add private include #################
|
||||||
# list(APPEND ADD_PRIVATE_INCLUDE
|
# list(APPEND ADD_PRIVATE_INCLUDE
|
||||||
# )
|
# )
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
############## Add current dir source files ###########
|
############## Add current dir source files ###########
|
||||||
file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/croutine.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/event_groups.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/event_groups.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/list.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/list.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/queue.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/queue.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/tasks.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/tasks.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/timers.c"
|
"${CMAKE_CURRENT_SOURCE_DIR}/timers.c"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/portable/MemMang/heap_5.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})
|
||||||
)
|
if(CPU_ID)
|
||||||
list(APPEND ADD_SRCS ${sources})
|
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/${CPU_ID}/port.c)
|
||||||
# aux_source_directory(src ADD_SRCS)
|
list(APPEND ADD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/portable/gcc/risc-v/${CHIP}/${CPU_ID}/portASM.S)
|
||||||
# list(REMOVE_ITEM ADD_SRCS "${CMAKE_CURRENT_SOURCE_DIR}")
|
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)
|
||||||
########### Add required/dependent components #########
|
endif()
|
||||||
#list(APPEND ADD_REQUIREMENTS xxx)
|
# aux_source_directory(src ADD_SRCS)
|
||||||
#######################################################
|
# list(REMOVE_ITEM ADD_SRCS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
#######################################################
|
||||||
############ Add static libs ##########################
|
|
||||||
#list(APPEND ADD_STATIC_LIB "libxxx.a")
|
########### Add required/dependent components #########
|
||||||
#######################################################
|
#list(APPEND ADD_REQUIREMENTS xxx)
|
||||||
|
#######################################################
|
||||||
############ Add dynamic libs #########################
|
|
||||||
# list(APPEND ADD_DYNAMIC_LIB "libxxx.so"
|
############ Add static libs ##########################
|
||||||
# )
|
#list(APPEND ADD_STATIC_LIB "libxxx.a")
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
############ Add global compile option ################
|
############ Add dynamic libs #########################
|
||||||
#add components denpend on this component
|
# list(APPEND ADD_DYNAMIC_LIB "libxxx.so"
|
||||||
list(APPEND ADD_DEFINITIONS -DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler)
|
# )
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
############ Add private compile option ################
|
############ Add global compile option ################
|
||||||
#add compile option for this component that won't affect other modules
|
#add components denpend on this component
|
||||||
# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx)
|
list(APPEND ADD_DEFINITIONS -DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler)
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
generate_library()
|
############ 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