summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-03-03 15:12:28 +0700
committerGitHub <[email protected]>2021-03-03 15:12:28 +0700
commit7b162ec93f57426a26b351512f2f05156b8fa8b1 (patch)
tree75dc4432c2494aff690b610a35b883dc86176228 /hw
parentd56fad5f38ae77d4d83c3a7e0e4919147a8ab5fc (diff)
parenta298045f6c57ed3bad23ce44a1944016a882e08c (diff)
Merge pull request #692 from hathach/improve-rp2040
Improve rp2040
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/rp2040/family.c3
-rw-r--r--hw/bsp/rp2040/family.cmake12
-rw-r--r--hw/bsp/rp2040/family.mk2
m---------hw/mcu/raspberrypi/pico-sdk0
4 files changed, 14 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 699ad174d..af23c2368 100644
--- a/hw/bsp/rp2040/family.cmake
+++ b/hw/bsp/rp2040/family.cmake
@@ -1,3 +1,12 @@
+target_link_libraries(${PROJECT}
+ pico_stdlib
+ pico_bootsel_via_double_reset
+ pico_fix_rp2040_usb_device_enumeration
+)
+
+pico_add_extra_outputs(${PROJECT})
+pico_enable_stdio_uart(${PROJECT} 1)
+
# TinyUSB Stack source
set(SRC_TINYUSB
${TOP}/src/tusb.c
@@ -42,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
diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk
index 8e30e7eb6..9aacae37d 100644
--- a/hw/bsp/rp2040/family.mk
+++ b/hw/bsp/rp2040/family.mk
@@ -1 +1,3 @@
FAMILY_SUBMODULES = hw/mcu/raspberrypi/pico-sdk
+
+JLINK_DEVICE = rp2040_m0_0
diff --git a/hw/mcu/raspberrypi/pico-sdk b/hw/mcu/raspberrypi/pico-sdk
-Subproject 2d5789eca89658a7f0a01e2d6010c0f254605d7
+Subproject 61978dc707c7f2026efa4c3300bbb94baa89c78