move lpc18 and rp2040 to cmake workflow since rp2040 often failed randomly with make
This commit is contained in:
@@ -34,8 +34,6 @@ endif()
|
||||
set(BOARD_TARGET board_${BOARD})
|
||||
if (NOT TARGET ${BOARD_TARGET})
|
||||
add_library(${BOARD_TARGET} STATIC
|
||||
# external driver
|
||||
#lib/sct_neopixel/sct_neopixel.c
|
||||
# driver
|
||||
${SDK_DIR}/drivers/lpc_gpio/fsl_gpio.c
|
||||
${SDK_DIR}/drivers/common/fsl_common_arm.c
|
||||
@@ -48,15 +46,17 @@ if (NOT TARGET ${BOARD_TARGET})
|
||||
${SDK_DIR}/devices/${MCU_VARIANT}/drivers/fsl_reset.c
|
||||
)
|
||||
target_compile_definitions(${BOARD_TARGET} PUBLIC
|
||||
CFG_TUSB_MCU=OPT_MCU_LPC55XX
|
||||
CFG_TUSB_MEM_ALIGN=TU_ATTR_ALIGNED\(64\)
|
||||
)
|
||||
target_include_directories(${BOARD_TARGET} PUBLIC
|
||||
${TOP}/lib/sct_neopixel
|
||||
# driver
|
||||
${SDK_DIR}/drivers/common
|
||||
${SDK_DIR}/drivers/flexcomm
|
||||
${SDK_DIR}/drivers/lpc_iocon
|
||||
${SDK_DIR}/drivers/lpc_gpio
|
||||
${SDK_DIR}/drivers/lpuart
|
||||
${SDK_DIR}/drivers/sctimer
|
||||
# mcu
|
||||
${CMSIS_DIR}/CMSIS/Core/Include
|
||||
${SDK_DIR}/devices/${MCU_VARIANT}
|
||||
@@ -64,13 +64,17 @@ if (NOT TARGET ${BOARD_TARGET})
|
||||
)
|
||||
update_board(${BOARD_TARGET})
|
||||
|
||||
if (NOT DEFINED LD_FILE_${TOOLCHAIN})
|
||||
set(LD_FILE_gcc ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_CORE}_flash.ld)
|
||||
endif ()
|
||||
|
||||
if (TOOLCHAIN STREQUAL "gcc")
|
||||
target_sources(${BOARD_TARGET} PUBLIC
|
||||
${SDK_DIR}/devices/${MCU_VARIANT}/gcc/startup_${MCU_CORE}.S
|
||||
)
|
||||
target_link_options(${BOARD_TARGET} PUBLIC
|
||||
# linker file
|
||||
"LINKER:--script=${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_CORE}_flash.ld"
|
||||
"LINKER:--script=${LD_FILE_gcc}"
|
||||
# nanolib
|
||||
--specs=nosys.specs
|
||||
--specs=nano.specs
|
||||
@@ -95,6 +99,8 @@ function(family_configure_example TARGET)
|
||||
# BSP
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
|
||||
# external driver
|
||||
${TOP}/lib/sct_neopixel/sct_neopixel.c
|
||||
)
|
||||
target_include_directories(${TARGET} PUBLIC
|
||||
# family, hw, board
|
||||
|
Reference in New Issue
Block a user