add support for LOG=2
LOGGER=rtt is not tested since jlink doesn't support rp2040 just yet
This commit is contained in:
@@ -31,3 +31,26 @@ target_include_directories(${PROJECT} PUBLIC
|
||||
target_compile_definitions(${PROJECT} PUBLIC
|
||||
CFG_TUSB_MCU=OPT_MCU_RP2040
|
||||
)
|
||||
|
||||
if(DEFINED LOG)
|
||||
target_compile_definitions(${PROJECT} PUBLIC CFG_TUSB_DEBUG=${LOG} )
|
||||
pico_enable_stdio_uart(${PROJECT} 1)
|
||||
endif()
|
||||
|
||||
if(LOGGER STREQUAL "rtt")
|
||||
pico_enable_stdio_uart(${PROJECT} 0)
|
||||
|
||||
target_compile_definitions(${PROJECT} PUBLIC
|
||||
LOGGER_RTT
|
||||
SEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
||||
)
|
||||
|
||||
target_sources(${PROJECT} PUBLIC
|
||||
${TOP}/lib/SEGGER_RTT/RTT/SEGGER_RTT.c
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT} PUBLIC
|
||||
${TOP}/lib/SEGGER_RTT/RTT
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user