Skip to content

Commit

Permalink
doc: drivers: add a paragraph mentioning the initlevels target
Browse files Browse the repository at this point in the history
Add a paragraph mentioning the initlevels target for inspecting the
DEVICE_DEFINE and SYS_INIT sequence.

Signed-off-by: Fabio Baltieri <[email protected]>
  • Loading branch information
fabiobaltieri committed Oct 27, 2023
1 parent 96c5052 commit 9e4b5cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/kernel/drivers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,18 @@ In some cases you may just need to run a function at boot. For such cases, the
data structures and there isn't a way to later get a device pointer by name. The
same device policies for initialization level and priority apply.

Inspecting the initialization sequence
**************************************

Device drivers declared with :c:macro:`DEVICE_DEFINE` (or any variations of it)
and :c:macro:`SYS_INIT` are processed at boot time and the corresponding
initialization functions are called sequentially according to their specified
level and priority.

Sometimes it's useful to inspect the final sequence of initialization function
call as produced by the linker. To do that, use the ``initlevels`` CMake
target, for example ``west build -t initlevels``.

Error handling
**************

Expand Down

0 comments on commit 9e4b5cb

Please sign in to comment.