mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-23 05:08:45 +00:00
[refactor][board] refactor board directory structure
This commit is contained in:
parent
411776be3f
commit
8dca249d77
92 changed files with 803 additions and 20490 deletions
|
@ -88,6 +88,7 @@ function(generate_bin)
|
|||
|
||||
# Add common options
|
||||
add_compile_options(${GLOBAL_C_FLAGS})
|
||||
add_compile_options(-D${BOARD})
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C>:-std=c99>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdlib>)
|
||||
|
@ -132,7 +133,12 @@ function(generate_bin)
|
|||
|
||||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/bsp/bsp_common/platform/bflb_platform.c)
|
||||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/bsp/bsp_common/platform/syscalls.c)
|
||||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/bsp/board/${BOARD}/board.c)
|
||||
|
||||
if(${CHIP} STREQUAL "bl702")
|
||||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/bsp/board/bl70x/board.c)
|
||||
else()
|
||||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/bsp/board/${CHIP}/board.c)
|
||||
endif()
|
||||
|
||||
add_executable(${target_name}.elf ${mainfile} ${SRCS})
|
||||
target_link_options(${target_name}.elf PRIVATE ${GLOBAL_LD_FLAGS})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue