mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
BREAKING: In an effort to simplify NuttX initialization, NSH_ARCHINIT is removed. board_app_initialize is also removed. BOARD_LATE_INITIALIZE now performs all board initialization logic, and is by default enabled. All references to these symbols are removed. BOARDIOC_INIT remains, but will result in -ENOTTY when called. It is to be removed in a later commit. Quick fix: Boards relying on NSH_ARCHINIT should now enable CONFIG_BOARD_LATE_INITIALIZE instead. If the application needs fine-grained control over board initialization from userspace, the logic performed by BOARDIOC_INIT may be copied to the board_finalinitialize function and used instead via BOARDIOC_FINALINIT. All board_app_initialize logic provided by NuttX is now moved to board_late_initialize, and the same should be done for out-of-tree boards. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
24 lines
1.2 KiB
ReStructuredText
24 lines
1.2 KiB
ReStructuredText
==============================
|
|
Customizing NSH Initialization
|
|
==============================
|
|
|
|
**Ways to Customize NSH Initialization**. There are three ways to
|
|
customize the NSH start-up behavior. Here they are presented in order of
|
|
increasing difficulty:
|
|
|
|
#. You replace the sample code at ``apps/examples/nsh/nsh_main.c`` with
|
|
whatever start-up logic that you want. NSH is a library at
|
|
``apps/nshlib``. ``apps.examples/nsh`` is just a tiny, example
|
|
start-up function (``CONFIG_INIT_ENTRYPOINT``\ ()) that runs
|
|
immediately and illustrates how to start NSH If you want something
|
|
else to run immediately then you can write your write your own custom
|
|
``CONFIG_INIT_ENTRYPOINT``\ () function and then start other tasks
|
|
from your custom ``CONFIG_INIT_ENTRYPOINT``\ ().
|
|
|
|
#. NSH also supports a start-up script that executed when NSH first
|
|
runs. This mechanism has the advantage that the start-up script can
|
|
contain any NSH commands and so can do a lot of work with very little
|
|
coding. The disadvantage is that it is considerably more complex to
|
|
create the start-up script. It is sufficiently complex that it
|
|
deserves its own paragraph
|
|
|