summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-03-02 23:18:44 +0700
committerhathach <[email protected]>2021-03-02 23:18:44 +0700
commitd91979cfef477e43a19e43b7f56847f207feb385 (patch)
treebf0a1195dfce6b9b8d7579f5a012747f737c70fe
parentce942baad2b5601984662b428140e3cb9acdabbc (diff)
rp2040 able to get log with rtt
add note for segger rtt block search range
-rw-r--r--hw/bsp/rp2040/family.c3
-rw-r--r--hw/bsp/rp2040/family.cmake4
2 files changed, 4 insertions, 3 deletions
diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c
index e42941483..ec4088ea1 100644
--- a/hw/bsp/rp2040/family.c
+++ b/hw/bsp/rp2040/family.c
@@ -78,7 +78,10 @@ bool __no_inline_not_in_flash_func(get_bootsel_button)() {
//------------- Segger RTT retarget -------------//
#if defined(LOGGER_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 "SEGGER_RTT.h"
diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake
index e779e4cbb..af23c2368 100644
--- a/hw/bsp/rp2040/family.cmake
+++ b/hw/bsp/rp2040/family.cmake
@@ -5,6 +5,7 @@ target_link_libraries(${PROJECT}
)
pico_add_extra_outputs(${PROJECT})
+pico_enable_stdio_uart(${PROJECT} 1)
# TinyUSB Stack source
set(SRC_TINYUSB
@@ -50,12 +51,9 @@ target_compile_definitions(${PROJECT} PUBLIC
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