From 3830cebddcc0a6c36a030f0d4d0bfd3781a0def5 Mon Sep 17 00:00:00 2001 From: night-ghost Date: Sun, 13 May 2018 19:50:44 +0500 Subject: [PATCH] AP_HAL_F4Light: board AirbotV2: fixed build scripts --- .../boards/f4light_AirbotV2/support/UPLOAD-DFU.sh | 4 ---- .../boards/f4light_AirbotV2/support/UPLOAD-STLINK.sh | 4 +--- .../f4light_AirbotV2/support/UPLOAD-plane-STLINK.sh | 4 +--- .../f4light_AirbotV2/support/bl/UPLOAD-STLINK.sh | 12 ++++++++++++ .../f4light_AirbotV2/support/bl/UPLOAD-STLINK_res.sh | 10 ++++++++++ .../support/bl/UPLOAD-plane-STLINK.sh | 12 ++++++++++++ libraries/AP_HAL_F4Light/support/PULL_MASTER.sh | 6 +++--- 7 files changed, 39 insertions(+), 13 deletions(-) create mode 100755 libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK.sh create mode 100755 libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK_res.sh create mode 100755 libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-plane-STLINK.sh diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-DFU.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-DFU.sh index 315f68218e..6c237a7041 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-DFU.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-DFU.sh @@ -3,9 +3,5 @@ #production binary for bootloader dfu-util -a 0 --dfuse-address 0x08010000:unprotect:force -D ../../../../../ArduCopter/f4light_AirbotV2.bin -R -# bare metal binary - -#dfu-util -a 0 --dfuse-address 0x08000000:unprotect:force -D /tmp/ArduCopter.build/f4light_Revolution.bin -#dfu-util -a 0 --dfuse-address 0x08000000:leave -D ../../../../../ArduCopter/f4light_Revolution.bin -R diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-STLINK.sh index 3ae04ce8c0..068989818f 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-STLINK.sh @@ -5,7 +5,5 @@ #bare metal binary -/usr/local/stlink/st-flash --reset read eeprom.bin 0x08004000 0xc000 && \ -/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_AirbotV2_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_AirbotV2.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-plane-STLINK.sh index 6ed4597604..cb240fe466 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-plane-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/UPLOAD-plane-STLINK.sh @@ -5,7 +5,5 @@ #bare metal binary -/usr/local/stlink/st-flash --reset read eeprom.bin 0x08004000 0xc000 && \ -/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_AirbotV2_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_AirbotV2.bin 0x08010000 && \ /usr/local/stlink/st-util -m \ No newline at end of file diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK.sh new file mode 100755 index 0000000000..dbeeafbc5b --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# production binary without bootloader +#/usr/local/stlink/st-flash --reset write /tmp/ArduCopter.build/f4light_Revolution.bin 0x08010000 + +#bare metal binary or binary with bootloader +/usr/local/stlink/st-flash --reset read eeprom.bin 0x08004000 0xc000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../../ArduCopter/f4light_AirbotV2_bl.bin 0x08000000 && \ +/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-util -m + + diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK_res.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK_res.sh new file mode 100755 index 0000000000..e5ba9b7545 --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-STLINK_res.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# production binary without bootloader +#/usr/local/stlink/st-flash --reset write /tmp/ArduCopter.build/f4light_Revolution.bin 0x08010000 + +#bare metal binary or binary with bootloader +/usr/local/stlink/st-flash --reset write ../../../../../../ArduCopter/f4light_AirbotV2_bl.bin 0x08000000 && \ +/usr/local/stlink/st-util -m + + diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-plane-STLINK.sh new file mode 100755 index 0000000000..7009d1e61b --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/support/bl/UPLOAD-plane-STLINK.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# production binary with bootloader +#/usr/local/stlink/st-flash --reset write /tmp/ArduCopter.build/f4light_Revolution.bin 0x08010000 + +#bare metal binary +/usr/local/stlink/st-flash --reset read eeprom.bin 0x08004000 0xc000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../../ArduPlane/f4light_AirbotV2_bl.bin 0x08000000 +/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 +/usr/local/stlink/st-util -m + + diff --git a/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh b/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh index 5e7216795b..ab3a8745e5 100755 --- a/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh +++ b/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh @@ -1,8 +1,8 @@ -git checkout master +git checkout master && \ git pull --rebase git://github.com/ArduPilot/ardupilot.git master # Step 2: Merge the changes and update on GitHub. -git checkout Revo -git rebase master && git push origin Revo +git checkout Revo && \ +git rebase master && git push --force origin Revo