[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: Moved atmega_stdio_init() to cpu_init() (#11366)

Marian Buschsieweke notifications at github.com
Mon Sep 9 09:44:59 CEST 2019


maribu commented on this pull request.



> @@ -58,10 +58,6 @@ void board_init(void)
 #endif
 #endif
 
-#ifdef MODULE_AVR_LIBC_EXTRA
-    atmega_stdio_init();
-#endif
-
     cpu_init();

On some architectures it was initialized after `periph_init()`. I added a bunch of PRs to consistently initialize it just before `periph_init()`. As `periph_init()` is hardware independent (as it is in `drivers`), we can only rely on using `DEBUG()` there if independent of hardware `stdio` is available there.

So there were to goals:
1. Move the point where `stdio` is guaranteed to be working to a point before `periph_init()` (Does not apply to AVR, was already the case)
2. Have `stdio` available at a consistent point during boot up to avoid confusion.

For the ATmegas only point 2 applied, but it also resulted in less code duplication :-)

-- 
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/11366#discussion_r322102668
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190909/33702689/attachment.htm>


More information about the notifications mailing list