Skip to content

[FEATURE] Multi-Repository NuttX Management and Flexible Application Development #18143

@snikeguo

Description

@snikeguo

Is your feature request related to a problem? Please describe.

Proposal

Implement a multi-repository registration and discovery mechanism for NuttX:

Describe the solution you'd like

1. Registration System

  • Script to register NuttX instances with version identifiers (e.g., nuttx_v1, user_nuttx)
  • Store metadata (path, git commit, branch) in centralized location
  • Example: python register-nuttx.py nuttx_v1 --path /path/to/nuttx --git-commit <hash>

2. CMake Integration

  • Create FindNuttX.cmake module for find_package() support
  • Usage: find_package(nuttx_v1 REQUIRED CONFIG)
  • Support version/branch specification

3. Flexible Board Management

# Official board
board_set(${NUTTX_BASE}/boards/arm/stm32h7/stm32h750xb)

# Custom board
board_set(${CMAKE_CURRENT_SOURCE_DIR}/boards/custom_board)
  1. Decoupled Application Development
    Applications can be anywhere, not confined to apps/ repository
    Clear dependency declaration on NuttX versions

Example
Register:

cd D:\nuttx_workspace\nuttx   
python register-nuttx.py nuttx_v1 --label "main-branch"

User Application (E:/nuttx_app/CMakeLists.txt, the nuttx in D:\nuttx_workspace\nuttx ):

find_package(nuttx_v1 REQUIRED CONFIG)

project(MyApp)

# Use official board
board_set(${NUTTX_BASE}/boards/arm/stm32h7/stm32h750xb)

# Or use custom board
# board_set(${CMAKE_CURRENT_SOURCE_DIR}/boards/custom_board)

add_executable(myapp app/main.c)
target_link_libraries(myapp nuttx_libs)

Describe alternatives you've considered

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions