Add support for SEGGER RTT STDIO (updated) #1411
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!1411
Loading…
Reference in a new issue
No description provided.
Delete branch "rtt-stdio-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Supersedes #775, fixes #774 (ping @kilograham, @anaoum)
Segger's RTT is now included as a submodule
RTT is enabled via
pico_enable_stdio_rtt(${TARGET_NAME} 1)cr/lfconversion is supported viaPICO_STDIO_RTT_DEFAULT_CRLFpico_stdio_test_rtttarget was added to the test suiteNote the strange
#include "../../../lib/rtt/RTT/SEGGER_RTT.c"insegger_rtt.c.I did this because, as documented in the source file, cmake will not let us change the
COMPILE_OPTIONSfor a single source file if the target has one source file in the current directory tree and another source file in a directory outside the current directory tree.Sadly,
SEGGER_RTT.cproduces warnings that are treated as errors, and without this fanciness, RTT will not compile witharm-gnu-toolchain-12.2.mpacbti-rel1.This is probably going to annoy you, but perhaps I'm leaning back towards not using a sub module. I think my main objection before was that we had copied an entire repo, however I think that you are only using
SEGGER_RTT.candSEGGER_RTT.h(and possibly a config header)... it is probably simpler to just copy these files into the same directory.Actually, I agree with you about getting rid of the submodule! 😆
Normally, with RTT, you need to include the
libcintercepts and overrides forprintfandputsand all that.But the pico has it's own layered
stdioimplementation, so it just might be thatSEGGER_RTT.cis all we need...Let me check and test.
If it's just the source and few includes, I'll copy them in with a note of the revision.
That will allow me to get rid of the
#include "...c"ugliness because I will be able to properly set the compile options.Let me look into it tonight / tomorrow.