[riot-notifications] [RIOT-OS/RIOT] sys: stdio_null: add null driver (#10741)

Bas Stottelaar notifications at github.com
Wed Jan 9 23:46:32 CET 2019


### Contribution description
This PR provides a null driver for STDIO, so that it doesn't depend on UART or RTT. 

I created this to test #10215, where the bootloader easily exceeds the default 4KiB on EFM32 targets, because due to `periph_uart` still being included. With this null driver (which makes sense for the bootloader IMHO), I could save an additional 2KiB. Of course, anything that depends on reading something from UART will break with this driver.

I've added a warning with `DEVELHELP=1`.

It took me five minutes to create, so if this doesn't make any sense, that I don't feel bad ;-)

### Testing procedure
Add `USEMODULE=stdio_null` to any application to see what it saves. Here is an example for `tests/minimal`.

```shell
basilfx:minimal/ (feature/stdio_null) $ BOARD=samr21-xpro make -j8
Building application "tests_minimal" for "samr21-xpro" with MCU "samd21".

"make" -C boards/samr21-xpro
"make" -C core
"make" -C cpu/samd21
"make" -C drivers
"make" -C sys
"make" -C cpu/cortexm_common
"make" -C cpu/sam0_common
"make" -C cpu/samd21/periph
"make" -C sys/isrpipe
"make" -C drivers/periph_common
"make" -C sys/newlib_syscalls_default
"make" -C cpu/sam0_common/periph
"make" -C cpu/cortexm_common/periph
"make" -C sys/pm_layered
"make" -C sys/stdio_uart
"make" -C sys/tsrb
   text	   data	    bss	    dec	    hex	filename
   3260	     36	   2604	   5900	   170c	tests/minimal/bin/samr21-xpro/tests_minimal.elf
```

```shell
basilfx:minimal/ (feature/stdio_null) $ USEMODULE=stdio_null BOARD=samr21-xpro make -j8
Building application "tests_minimal" for "samr21-xpro" with MCU "samd21".

"make" -C boards/samr21-xpro
"make" -C core
"make" -C cpu/samd21
"make" -C drivers
"make" -C sys
"make" -C cpu/cortexm_common
"make" -C drivers/periph_common
"make" -C sys/isrpipe
"make" -C cpu/sam0_common
"make" -C cpu/sam0_common/periph
"make" -C sys/newlib_syscalls_default
"make" -C sys/pm_layered
"make" -C cpu/samd21/periph
"make" -C sys/stdio_null
"make" -C sys/stdio_uart
"make" -C sys/tsrb
"make" -C cpu/cortexm_common/periph
   text	   data	    bss	    dec	    hex	filename
   2232	     16	   2524	   4772	   12a4	tests/minimal/bin/samr21-xpro/tests_minimal.elf
```

### Issues/PRs references

#9503
#10215
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/10741

-- Commit Summary --

  * sys: stdio_null: add null driver

-- File Changes --

    A sys/stdio_null/Makefile (5)
    A sys/stdio_null/stdio_null.c (51)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10741.patch
https://github.com/RIOT-OS/RIOT/pull/10741.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10741
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190109/01c0eff4/attachment.html>


More information about the notifications mailing list