diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 9ea4ae1ec0..cd9cf2cd1d 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -73,7 +73,7 @@ endif() if (TARGET parameters_xml AND TARGET airframes_xml) add_custom_command(OUTPUT ${fw_file} COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_mkfw.py - --prototype ${PX4_SOURCE_DIR}/Images/${FW_PROTOTYPE}.prototype + --prototype ${PX4_SOURCE_DIR}/platforms/nuttx/Images/${FW_PROTOTYPE}.prototype --git_identity ${PX4_SOURCE_DIR} --parameter_xml ${PX4_BINARY_DIR}/parameters.xml --airframe_xml ${PX4_BINARY_DIR}/airframes.xml diff --git a/Images/aerocore2.prototype b/platforms/nuttx/Images/aerocore2.prototype similarity index 100% rename from Images/aerocore2.prototype rename to platforms/nuttx/Images/aerocore2.prototype diff --git a/Images/aerofc-v1.prototype b/platforms/nuttx/Images/aerofc-v1.prototype similarity index 100% rename from Images/aerofc-v1.prototype rename to platforms/nuttx/Images/aerofc-v1.prototype diff --git a/Images/auav-x21.prototype b/platforms/nuttx/Images/auav-x21.prototype similarity index 100% rename from Images/auav-x21.prototype rename to platforms/nuttx/Images/auav-x21.prototype diff --git a/Images/crazyflie.prototype b/platforms/nuttx/Images/crazyflie.prototype similarity index 100% rename from Images/crazyflie.prototype rename to platforms/nuttx/Images/crazyflie.prototype diff --git a/Images/esc35-v1.prototype b/platforms/nuttx/Images/esc35-v1.prototype similarity index 100% rename from Images/esc35-v1.prototype rename to platforms/nuttx/Images/esc35-v1.prototype diff --git a/Images/mindpx-v2.prototype b/platforms/nuttx/Images/mindpx-v2.prototype similarity index 100% rename from Images/mindpx-v2.prototype rename to platforms/nuttx/Images/mindpx-v2.prototype diff --git a/Images/nxphlite-v3.prototype b/platforms/nuttx/Images/nxphlite-v3.prototype similarity index 100% rename from Images/nxphlite-v3.prototype rename to platforms/nuttx/Images/nxphlite-v3.prototype diff --git a/Images/px4-same70xplained-v1.prototype b/platforms/nuttx/Images/px4-same70xplained-v1.prototype similarity index 100% rename from Images/px4-same70xplained-v1.prototype rename to platforms/nuttx/Images/px4-same70xplained-v1.prototype diff --git a/Images/px4-stm32f4discovery.prototype b/platforms/nuttx/Images/px4-stm32f4discovery.prototype similarity index 100% rename from Images/px4-stm32f4discovery.prototype rename to platforms/nuttx/Images/px4-stm32f4discovery.prototype diff --git a/Images/px4cannode-v1.prototype b/platforms/nuttx/Images/px4cannode-v1.prototype similarity index 100% rename from Images/px4cannode-v1.prototype rename to platforms/nuttx/Images/px4cannode-v1.prototype diff --git a/Images/px4esc-v1.prototype b/platforms/nuttx/Images/px4esc-v1.prototype similarity index 100% rename from Images/px4esc-v1.prototype rename to platforms/nuttx/Images/px4esc-v1.prototype diff --git a/Images/px4flow-v2.prototype b/platforms/nuttx/Images/px4flow-v2.prototype similarity index 100% rename from Images/px4flow-v2.prototype rename to platforms/nuttx/Images/px4flow-v2.prototype diff --git a/Images/px4fmu-v2.prototype b/platforms/nuttx/Images/px4fmu-v2.prototype similarity index 100% rename from Images/px4fmu-v2.prototype rename to platforms/nuttx/Images/px4fmu-v2.prototype diff --git a/Images/px4fmu-v3.prototype b/platforms/nuttx/Images/px4fmu-v3.prototype similarity index 100% rename from Images/px4fmu-v3.prototype rename to platforms/nuttx/Images/px4fmu-v3.prototype diff --git a/Images/px4fmu-v4.prototype b/platforms/nuttx/Images/px4fmu-v4.prototype similarity index 100% rename from Images/px4fmu-v4.prototype rename to platforms/nuttx/Images/px4fmu-v4.prototype diff --git a/Images/px4fmu-v4pro.prototype b/platforms/nuttx/Images/px4fmu-v4pro.prototype similarity index 100% rename from Images/px4fmu-v4pro.prototype rename to platforms/nuttx/Images/px4fmu-v4pro.prototype diff --git a/Images/px4fmu-v5.prototype b/platforms/nuttx/Images/px4fmu-v5.prototype similarity index 100% rename from Images/px4fmu-v5.prototype rename to platforms/nuttx/Images/px4fmu-v5.prototype diff --git a/Images/px4io-v2.prototype b/platforms/nuttx/Images/px4io-v2.prototype similarity index 100% rename from Images/px4io-v2.prototype rename to platforms/nuttx/Images/px4io-v2.prototype diff --git a/Images/px4nucleoF767ZI-v1.prototype b/platforms/nuttx/Images/px4nucleoF767ZI-v1.prototype similarity index 100% rename from Images/px4nucleoF767ZI-v1.prototype rename to platforms/nuttx/Images/px4nucleoF767ZI-v1.prototype diff --git a/Images/s2740vc-v1.prototype b/platforms/nuttx/Images/s2740vc-v1.prototype similarity index 100% rename from Images/s2740vc-v1.prototype rename to platforms/nuttx/Images/s2740vc-v1.prototype diff --git a/Images/tap-v1.prototype b/platforms/nuttx/Images/tap-v1.prototype similarity index 100% rename from Images/tap-v1.prototype rename to platforms/nuttx/Images/tap-v1.prototype diff --git a/Images/zubaxgnss-v1.prototype b/platforms/nuttx/Images/zubaxgnss-v1.prototype similarity index 100% rename from Images/zubaxgnss-v1.prototype rename to platforms/nuttx/Images/zubaxgnss-v1.prototype diff --git a/platforms/nuttx/NuttX/tools/new_nuttx_px_config.sh b/platforms/nuttx/NuttX/tools/new_nuttx_px_config.sh index d382714601..8205823b26 100755 --- a/platforms/nuttx/NuttX/tools/new_nuttx_px_config.sh +++ b/platforms/nuttx/NuttX/tools/new_nuttx_px_config.sh @@ -51,8 +51,8 @@ done echo "PROTOTYPE = \"$oldname\"" # Does that look like an existing old name? -if [ ! -f $BASEDIR/Images/$oldname.prototype ]; then - fatal "\"$oldname\" doesn't look like an existing board name (there is no $BASEDIR/Images/$oldname.prototype)" +if [ ! -f $BASEDIR/platforms/nuttx/Images/$oldname.prototype ]; then + fatal "\"$oldname\" doesn't look like an existing board name (there is no $BASEDIR/platforms/nuttx/Images/$oldname.prototype)" fi if [ ! -d $BASEDIR/src/drivers/boards/$oldname ]; then fatal "\"$oldname\" doesn't look like an existing board name (no such directory $BASEDIR/src/drivers/boards/$oldname)" @@ -75,13 +75,13 @@ fi cd "$BASEDIR" || fatal "Could not change directory to $BASEDIR" # Make sure we don't accidently overwrite stuff. -if [ -f Images/$newname.prototype -o \ +if [ -f platforms/nuttx/Images/$newname.prototype -o \ -f cmake/configs/nuttx_"$newname"_default.cmake -o \ -f cmake/configs/nuttx_"$newname"_bootloader.cmake -o \ -d src/drivers/boards/$newname -o \ -d nuttx-configs/$newname ]; then echo "\"$newname\" already exists! Please first delete it with the following command (in $BASEDIR):" - echo "rm -rf Images/$newname.prototype cmake/configs/nuttx_"$newname"_default.cmake cmake/configs/nuttx_"$newname"_bootloader.cmake src/drivers/boards/$newname nuttx-configs/$newname" + echo "rm -rf platforms/nuttx/Images/$newname.prototype cmake/configs/nuttx_"$newname"_default.cmake cmake/configs/nuttx_"$newname"_bootloader.cmake src/drivers/boards/$newname nuttx-configs/$newname" exit 1 fi @@ -115,8 +115,8 @@ for k in default bootloader; do done # Copy remaining files. -cp Images/${oldname}.prototype Images/${newname}.prototype -git add Images/${newname}.prototype +cp platforms/nuttx/Images/${oldname}.prototype platforms/nuttx/Images/${newname}.prototype +git add platforms/nuttx/Images/${newname}.prototype cp -r nuttx-configs/${oldname} nuttx-configs/${newname} git add nuttx-configs/${newname} cp -r src/drivers/boards/${oldname} src/drivers/boards/${newname} @@ -164,8 +164,8 @@ if ! grep 'defined('"${newconfig}"')' 'src/modules/gpio_led/gpio_led.c' >/dev/nu sed -i -e 's/\(defined('"${oldconfig}"')$\)/\1 || \\'$'\\n\\t'"defined(${newconfig})/" 'src/modules/gpio_led/gpio_led.c' fi -# Make some changes to Images/$(newname).prototype -sed -i -r -e 's%("(magic|description|summary)": ")([^"]*)(",).*%\1FIXME (was: \3)\4%' "Images/${newname}.prototype" +# Make some changes to platforms/nuttx/Images/$(newname).prototype +sed -i -r -e 's%("(magic|description|summary)": ")([^"]*)(",).*%\1FIXME (was: \3)\4%' "platforms/nuttx/Images/${newname}.prototype" echo "*** The following files contain a reference to $oldconfig (this might take a while):" find . -path './build/*' -o -path './.git' -o -name 'defconfig' -prune -o -type f -exec grep -l -- "$oldconfig" {} \;