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

Hauke Petersen notifications at github.com
Tue Mar 26 12:18:34 CET 2019


haukepetersen commented on this pull request.



>  void periph_init(void)
 {
+    /* initialize stdio first to allow DEBUG() during later stages */
+#ifdef CPU_NATIVE

> One general remark: It is very rarely seen that someone jumps in at the very end of a process

I am aware I and I honestly don't feel good about my behavior. I simply havn't seen this PR before (as I am not spending too much time on tracking PRs lately), and I stumbled upon this today - but when I see something like this I would simply feel bad about staying quit. So please accept my apologies.

On the topic at hand: I still disagree with putting this initialization into `periph_common`. `periph_common` is about peripheral, and STDIO is clearly not part of this. So just using `periph_common/init.c` as init trigger for some (critical, yes)) system module breaks with a global concept and is ergo always a bad idea!

So what would be needed is some generic 'pre-init' function reliably called by all platforms before `periph_common/init`, that can be used to bootstrap this kind of system modules. I don't see a large issue with doing such a thing, right?

Process wise I would be ok with merging this PR first (as it is already nicely tested), if someone promises to address this issue right afterwards.

-- 
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/10806#discussion_r269052015
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190326/ccd834fc/attachment.html>


More information about the notifications mailing list