From 2581c7acef0b0c9695bdf75ba4708fa9bf25fcd5 Mon Sep 17 00:00:00 2001 From: "Alan C. Assis" Date: Sun, 8 Aug 2021 10:27:57 -0300 Subject: [PATCH] Doc/FAQ: Add more entries about board initialization --- Documentation/faq/index.rst | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Documentation/faq/index.rst b/Documentation/faq/index.rst index cb4c7d3f48..93a0c04781 100644 --- a/Documentation/faq/index.rst +++ b/Documentation/faq/index.rst @@ -82,8 +82,43 @@ You need to enable these options in the menuconfig: [*] Support SIGINT (0x03) Serial parse SIGINT characters +Board Initialization +==================== + +How to start directly my application instead starting NSH? +---------------------------------------------------------- + +You can start you application directly instead of starting the default +NSH terminal. Lets support your application is called "hello", then you +will modify the ENTRYPOINT to call "hello_main" instead of "nsh_main": + + RTOS Features ---> + Tasks and Scheduling ---> + (hello_main) Application entry point + +Why after putting my application on ENTRYPOINT it stops to work? +---------------------------------------------------------------- + +When you replace the ENTRYPOINT from "nsh_main" to your application some +initialization flow are changed, for instace the NSH_ARCHINIT is not +executed anymore and so some drivers initialiation that are called from +it also stops to work. + +You can fix it enabling the Board Late Initialization that will replace the +NSH_ARCHINIT to call those drivers initialization. Just enable it: + + RTOS Features ---> + RTOS hooks ---> + [*] Custom board late initialization + +Also you need to disable the architecture-specific initialization: + + Application Configuration ---> + NSH Library ---> + [ ] Have architecture-specific initialization + Why isn't /dev/ttySx created when using USB Console even when UART is enabled? -============================================================================== +------------------------------------------------------------------------------ If you don't use serial console then /dev/ttyS0 will not be created, even if you enable the UART peripheral at "System Type".