Hello,
I personally like to create a git repository where the apps and nuttx repos are 
added as submodules. Unless you are going to use a pre-existing board which has 
everything you need, you will also eventually need to modify content inside 
nuttx/. An alternative is to configure nuttx to use an out-of-tree custom 
board, which avoids this. For the apps there's a similar mechanism for 
out-of-tree inclusion of application code.

Since I do this very often, I created myself a small framework based on 
Makefile which allows you to easily initialize a project and handle nuttx make 
commands from the top-level directory. Also, you can easily add out-of-tree 
applications and even OS-level code (for example, a driver) without having to 
fork nuttx repo. This framework is here: 
https://gitlab.com/nuttx_projects/nuttx_workspace_manager

In case you want another option, there's is also 
https://gitlab.com/nuttx-upm/upm which is python based and works similarly.

Best,
Matias

On Mon, Jul 13, 2020, at 18:00, Fotis Panagiotopoulos wrote:
> Hi everyone!
> 
> I am new to Nuttx but I would like to use it for my next projects.
> For the moment I am porting one of my big projects to Nuttx (that was
> previously working with another RTOS). However, I am a bit confused on how
> I should set up our development workflow.
> 
> I will have to create my own apps dir, containing the actual firmware. I
> will have to create a new board config for our custom hardware. Of course
> Nuttx shall be configured specifically for the needs of the project. Our
> projects use git for version control.
> 
> But what is the recommended way of integrating Nuttx code to my project?
> I can think of the following cases:
> 
> 1. Copy the whole Nuttx source code in the project.
> This workflow seems to be encouraged, but IMO it's not correct. This way my
> copy of Nuttx becomes "detached" to the original repo. It would be very
> difficult to change versions, update the kernel, or contribute back.
> Everything would have to be merged manually.
> 
> 2. Use the export target, and use Nuttx as a library.
> This seems better, but it is still problematic. Nuttx becomes a "black
> box". It is not easy to debug it, change configuration, or generally tell
> what the library contains. Knowledge on what is built and how is lost in
> our version control and the rest of the developers will not be able to
> follow any changes.
> 
> 3. Add Nuttx as a submodule to our git repository.
> This ticks most of the boxes, but this also means that I will have to also
> fork Nuttx to our git server. I am afraid that this will lead up to having
> lots of forks, each for every one of our projects, and that it will become
> very difficult to manage.
> 
> So what do others do? How do you integrate Nuttx to your projects?
> Or is there anything that I am missing or any other solution?
> 
> --
> Fotis Panagiotopoulos
> 

Reply via email to