mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-24 09:02:37 +00:00
rp2040 able to get log with rtt
add note for segger rtt block search range
This commit is contained in:
parent
ce942baad2
commit
d91979cfef
@ -78,7 +78,10 @@ bool __no_inline_not_in_flash_func(get_bootsel_button)() {
|
|||||||
|
|
||||||
//------------- Segger RTT retarget -------------//
|
//------------- Segger RTT retarget -------------//
|
||||||
#if defined(LOGGER_RTT)
|
#if defined(LOGGER_RTT)
|
||||||
|
|
||||||
// Logging with RTT
|
// Logging with RTT
|
||||||
|
// If RTT Control Block is not found by 'Auto Detection`
|
||||||
|
// try to use 'Search Range` with '0x20000000 0x10000'
|
||||||
|
|
||||||
#include "pico/stdio/driver.h"
|
#include "pico/stdio/driver.h"
|
||||||
#include "SEGGER_RTT.h"
|
#include "SEGGER_RTT.h"
|
||||||
|
@ -5,6 +5,7 @@ target_link_libraries(${PROJECT}
|
|||||||
)
|
)
|
||||||
|
|
||||||
pico_add_extra_outputs(${PROJECT})
|
pico_add_extra_outputs(${PROJECT})
|
||||||
|
pico_enable_stdio_uart(${PROJECT} 1)
|
||||||
|
|
||||||
# TinyUSB Stack source
|
# TinyUSB Stack source
|
||||||
set(SRC_TINYUSB
|
set(SRC_TINYUSB
|
||||||
@ -50,12 +51,9 @@ target_compile_definitions(${PROJECT} PUBLIC
|
|||||||
|
|
||||||
if(DEFINED LOG)
|
if(DEFINED LOG)
|
||||||
target_compile_definitions(${PROJECT} PUBLIC CFG_TUSB_DEBUG=${LOG} )
|
target_compile_definitions(${PROJECT} PUBLIC CFG_TUSB_DEBUG=${LOG} )
|
||||||
pico_enable_stdio_uart(${PROJECT} 1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOGGER STREQUAL "rtt")
|
if(LOGGER STREQUAL "rtt")
|
||||||
pico_enable_stdio_uart(${PROJECT} 0)
|
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT} PUBLIC
|
target_compile_definitions(${PROJECT} PUBLIC
|
||||||
LOGGER_RTT
|
LOGGER_RTT
|
||||||
SEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
SEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user