lupyuen commented on PR #18408:
URL: https://github.com/apache/nuttx/pull/18408#issuecomment-4341804836

   FYI I'm trying to understand the Init Sequence before and after the PR. 
Here's what the LLM drew, not sure if it's correct 🤔 
https://docs.google.com/document/d/1o8z4JIUp88NhCPftAZ28GOHpy9ERGaxfLRgEXHd5mUo/edit?tab=t.0
   
   ```mermaid
   sequenceDiagram
       participant Hardware as MCU/Hardware
       participant Kernel as nx_start (Kernel)
       participant Board as Board Logic (*_boot.c)
       participant AppInit as Board App Init (*_appinit.c)
       participant NSH as Application (NSH)
   
       Note over Hardware, NSH: BEFORE PR #18408 (Legacy Flow)
       Hardware->>Kernel: Reset / Entry Point
       Kernel->>Board: board_initialize() (Early)
       Kernel->>NSH: task_create("nsh_main")
       activate NSH
       NSH->>Kernel: boardctl(BOARDIOC_INIT)
       Kernel->>AppInit: board_app_initialize()
       AppInit->>Kernel: Register Drivers (/dev/sensor0, etc.)
       deactivate NSH
       Note over NSH: Shell becomes ready with drivers
   ```
   
   ```mermaid
   sequenceDiagram
       participant Hardware as MCU/Hardware
       participant Kernel as nx_start (Kernel)
       participant Board as Board Logic (*_boot.c)
       participant AppInit as Board App Init (*_appinit.c)
       participant NSH as Application (NSH)
   
       Note over Hardware, NSH: AFTER PR #18408 (Simplified Flow)
       Hardware->>Kernel: Reset / Entry Point
       Kernel->>Board: board_initialize() (Early)
       Kernel->>Board: board_late_initialize() (New Unified Hook)
       Board->>Kernel: Register Drivers (/dev/sensor0, etc.)
       Kernel->>NSH: task_create("nsh_main")
       activate NSH
       Note over NSH: Shell starts. Drivers already registered
       deactivate NSH
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to