Ok, I would start fresh like this:
cd Firmware
git checkout master
git pull
git submodule update --init --recursive
All is clean now:
git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Then I would go into the Nuttx directory and get the latest master there:
cd platforms/nuttx/NuttX/nuttx
git checkout master
git pull
NuttX is now at 5da7dba like you.
Then I go back and the status looks like this:
cd ../../../..
git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: platforms/nuttx/NuttX/nuttx (new commits)
So, this tells me the NuttX submodule has now new commits, so is different from what the reference is by default.
Now itâs probably a good idea to do a clean builld:
export GIT_SUBMODULES_ARE_EVIL=1
make clean
make px4fmu-v2_default
The build fails, presumably there were some changes that need some work for the Firmware:
[ 3%] Copying NuttX/nuttx to /home/julianoes/src/Firmware-master/build/px4_fmu-v2_default/NuttX
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32butterfly2/include': File exists
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32f334-disco/include': File exists
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32f334-disco/nsh': File exists
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32f334-disco/scripts': File exists
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32f3discovery/include': File exists
cp: cannot create directory 'build/px4_fmu-v2_default/NuttX/nuttx/configs/stm32f3discovery/nsh': File exists
...
Now itâs probably a good idea to wait for @david_s5 to create a branch to try this, as he wrote above:
I will be working on a branch over the next few weeks that will build PX4 on the most recent NuttX master.