[riot-notifications] [RIOT-OS/RIOT] boot: Moved stdio_init() into periph_init() (#10806)

Hauke Petersen notifications at github.com
Tue Mar 26 16:46:56 CET 2019

> OK, so the bottom line is that stdio initialization should be moved into cpu_init() just before the call to periph_init(), right?

yes from my side.

> How about in addition to that we add a test to periph_init() to verify that stdio is initialized and working during automated tests? That way it could be kind of enforced that DEBUG() is safe to call at least at that point in time during boot.

Personally, I think this is overkill. Of course we need to make sure, that `DEBUG` does not trigger any harmful behavior (as in hardfaults etc). So IMHO DEBUG, or more precise the STDIO, should just do nothing in case STDIO is not (yet) initialized or even selected for a build. 

What we might want to think about in parallel, is to add some specific, general documentation on the boot order and the 'special cases' like `stdio init` and similar. Also a general rule about where it is save to use DEBUG and STDIO in the boot sequence could be added.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190326/b9f41590/attachment-0001.html>

More information about the notifications mailing list