-
Notifications
You must be signed in to change notification settings - Fork 2.1k
stdio_init happens late during boot #10645
Copy link
Copy link
Closed
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Area: sysArea: SystemArea: SystemState: staleState: The issue / PR has no activity for >185 daysState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Description
This applies to newlib platforms at least, possibly others.
Actual behavior
stdio_init is called from _init which is run after board_init. This has the downside that it is not possible to use printf or DEBUG from board_init or from the init function of periph drivers which are initialized by periph_init, e.g. SPI, since those run before _init.
Desired behavior
stdio_init should be called as early as possible, for stdio_uart this would likely be immediately after clocking has been set up, (which is a prerequisite for generating the proper baud rate)
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Area: sysArea: SystemArea: SystemState: staleState: The issue / PR has no activity for >185 daysState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation