Implement a new module stdio_nimble, which uses nimble
for stdio. The characteristic for stdin is writable and
the characteristic for stdout uses the indicate mechanism
to publish the system's output to a connected device.
Data will be sent out asynchronously via callout functions.
The module can be enabled with "USEMODULE += stdio_nimble"
Co-authored-by: Francisco Molina <femolina@uc.cl>
RISC-V support semihosting in very similar way as the cortex-m
microcontrollers. The code calls a breakpoint instruction and the
attached debugger reads/writes registers and memory for stdio.
The RISC-V architecture doesn't support a call number with the EBREAK
instruction, to allow the debugger to detect a semihosting break point,
the EBREAK instruction is wrapped in a SLLI and SRAI instruction. These
use x0 as output register, making them NOP instructions.
One caveat when using this is that the RISC-V core traps the EBREAK
instruction with trap code 3 when no debugger is attached. Restarting
the application with the debugger attached avoids this.
This feature is only used to blacklist stdio via CDC ACM.
Introduce the `highlevel_stdio` feature instead to indicate
that stdio functionality requires a running thread to print
anything
CDC ACM, ethos, Semihosting and SLIP all benefit from sending data out
in larger chunks and will benefit from stdout buffering.
`stdio_rtt` does have an internal TX buffer, so we don't need to do any
buffering on top.
With plain UART there was a slight advantage *without* buffering when
testing with `tests/periph_uart_nonblocking` (with the non-blocking feature
disabled).
Since the removal of the buffering saves us some RAM and ROM, disable it by
default there.
This will be different with DMA enabled UARTs.
Support for picolibc as alternative libc implementation is added with
this commit. For now only cortex-m CPU's are supported.
Enable via PICOLIBC=1
---
v2:
squash fixes in
v3:
Remove picolibc integer printf/scanf stuff from sys/Makefile.include,
it gets set in makefiles/libc/picolibc.mk
fixup for dependency