Hi, Thanks everyone for your suggestions!
I have read the Wikis, and they are very helpful indeed. However as I see there is no officiaL way of having an out-of-tree boards directory, and this is my main problem. If I understand correctly, there is no "proper" way of using NuttX on custom hardware, without touching its source code. Matias, nice work with that framework! In fact it is very close to what I was thinking of finally doing. It seems that a top-level Makefile is needed, that will handle everything else. It will have to "inject" my custom board to the build system, so as not to modify the sources. I may use your framework as an example for setting up my workflow. Another thing that I was thinking is about NuttX configuration. The file .config is included in the .gitignore file. So the actual NuttX configuration is not tracked. How do you usually handle this? Maybe also symlink my actual config to NuttX dir? Also handled by the top-level Makefile? Στις Τρί, 14 Ιουλ 2020 στις 12:39 π.μ., ο/η Gregory Nutt < spudan...@gmail.com> έγραψε: > On 7/13/2020 3:00 PM, 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 > > > Perhaps these Wiki pages would be useful to you: > > > https://cwiki.apache.org/confluence/display/NUTTX/Building+NuttX+with+Applications+Outside+of+the+Source+Tree > > > https://cwiki.apache.org/confluence/display/NUTTX/Custom+Application+Directories > > >