Skip to content

stdio_init happens late during boot #10645

@jnohlgard

Description

@jnohlgard

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

#10615 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: sysArea: SystemState: staleState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions