[riot-users] Platform with no UART stdio
michael at steelcode.com
Sat Jan 30 08:31:02 CET 2016
Thank you for your advice, that worked quite well.
I have submitted a pull request in case anyone else would find an RTT-based
stdio useful (it is much lower overhead than UART).
On Mon, Jan 25, 2016 at 1:47 AM, Kaspar Schleiser <kaspar at schleiser.de>
> Hey Michael,
> On 01/25/2016 03:39 AM, Michael Andersen wrote:
> > I am very new to RIOT, and I don't yet know my way around the code, so
> > sorry if this is an easy question.
> There are no stupid questions, only stupid answers.
> > I am trying to create a platform based on the samd21 that has no UART
> > for stdio. Unfortunately its seems a uart stdio is pretty much assumed
> > through a lot of the code. What is the cleanest way to prevent things
> > like uart_stdio_init from being invoked by newlib/syscalls.c::_init() ?
> This depends a little on which platform you are using. For arm,
> uart_stdio_init is called in newlibs _syscalls.
> Currently there is no really clean way to change that.
> The least-intrusive way that comes to mind:
> You could create a module with the same function signatures as
> "sys/uart_stdio", and change newlibs dependency to that.
> Implementing these:
> void uart_stdio_init(void);
> int uart_stdio_read(char* buffer, int count);
> int uart_stdio_write(const char* buffer, int len);
> Should be enough.
> In the mid-to-long term we'll need to do this pluggable.
> > There must be some kind of mechanism because I don't think the native
> > platform takes that code path.
> That's because native uses the system's native C library.
> uart_stdio is pulled in as dependency of newlib on ARM.
> users mailing list
> users at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users