snikeguo opened a new issue, #18143:
URL: https://github.com/apache/nuttx/issues/18143
### 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
```cmake
# Official board
board_set(${NUTTX_BASE}/boards/arm/stm32h7/stm32h750xb)
# Custom board
board_set(${CMAKE_CURRENT_SOURCE_DIR}/boards/custom_board)
```
4. Decoupled Application Development
Applications can be anywhere, not confined to apps/ repository
Clear dependency declaration on NuttX versions
Example
Register:
```
python register-nuttx.py nuttx_v1 --label "main-branch"
```
User App CMakeLists.txt:
```
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
- [x] I have verified before submitting the report.
--
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]