mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 05:13:33 +08:00
Resync new repository with old repo r5166
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5153 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
|
||||
# This script must be executed in the NuttX top-level directory. We'll check..
|
||||
# the .config file should be located there.
|
||||
|
||||
TOPDIR=`pwd`
|
||||
if [ ! -f .config ]; then
|
||||
echo "There is no configured version of NuttX in this directory."
|
||||
echo " Is '$TOPDIR' the NuttX top level directory?"
|
||||
echo " Has NuttX been configured?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The NuttX build system creates a nuttx ELF file, but the batchisp tools
|
||||
# expects the file to have a .elf extension
|
||||
|
||||
if [ ! -f nuttx.elf ]; then
|
||||
if [ ! -f nuttx ]; then
|
||||
echo "The NuttX ELF file (nuttx or nuttx.elf) does not exist in this directory."
|
||||
echo " Has the NuttX binary been built?"
|
||||
exit 1
|
||||
fi
|
||||
echo "Re-naming nuttx to nuttx.elf"
|
||||
mv nuttx nuttx.elf || { echo "mv failed"; exit 1; }
|
||||
else
|
||||
if [ -f nuttx ]; then
|
||||
echo "Replacing the old nuttx.elf with the new nuttx file."
|
||||
mv nuttx nuttx.elf || { echo "mv failed"; exit 1; }
|
||||
fi
|
||||
fi
|
||||
|
||||
DEVICE=at32uc3b0256
|
||||
HARDWARE=usb
|
||||
OPERATION="erase f memory flash blankcheck loadbuffer nuttx.elf program verify start reset 0"
|
||||
|
||||
batchisp -device $DEVICE -hardware $HARDWARE -operation $OPERATION
|
||||
Reference in New Issue
Block a user