diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/board.h b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/board.h index 19d13e5b12..c7757213e2 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/board.h +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/board.h @@ -133,16 +133,13 @@ #define BOARD_DATAFLASH_PAGES 0x10000 #define BOARD_DATAFLASH_ERASE_SIZE (4096)// in bytes -#if 1// if board's dataflash supports 4k erases then we can use it as FAT and share it via USB +// if board's dataflash supports 4k erases then we can use it as FAT and share it via USB #define BOARD_DATAFLASH_FATFS #define BOARD_HAS_SDIO #define USB_MASSSTORAGE #define HAL_BOARD_LOG_DIRECTORY "0:" #define HAL_BOARD_TERRAIN_DIRECTORY "0:/TERRAIN" //#define HAL_PARAM_DEFAULTS_PATH "0:/defaults.parm" -#else -// old dataflash logs -#endif #define BOARD_UARTS_LAYOUT 2 diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-STLINK.sh index c789f6c63e..e3d3f0a262 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-STLINK.sh @@ -4,9 +4,7 @@ #/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 ../../../../../ArduCopter/f4light_Airbot_bl.bin 0x08000000 -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 +/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_Airbot.bin 0x08010000 /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-plane-STLINK.sh index 4b32d9d6c1..19f9cbd7e0 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-plane-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/UPLOAD-plane-STLINK.sh @@ -4,9 +4,7 @@ #/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_Airbot_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_Airbot.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-DFU.sh b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-DFU.sh new file mode 100755 index 0000000000..33ca58f8ab --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-DFU.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +#production binary for bootloader +dfu-util -a 0 --dfuse-address 0x08010000:leave -D ../../../../../ArduCopter/f4light_Airbot.bin + +# bare metal binary +#dfu-util -a 0 --dfuse-address 0x08000000:unprotect:force -D ../../../../../ArduCopter/f4light_Airbot.bin + diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-STLINK.sh new file mode 100755 index 0000000000..c789f6c63e --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-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 ../../../../../ArduCopter/f4light_Airbot_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_Airbot/support/bl/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/support/bl/UPLOAD-plane-STLINK.sh new file mode 100755 index 0000000000..4b32d9d6c1 --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Airbot/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_Airbot_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_Revolution/board.h b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/board.h index 6309f48c08..dd38ddd640 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/board.h +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/board.h @@ -148,17 +148,7 @@ #define BOARD_DATAFLASH_NAME "dataflash" #define BOARD_DATAFLASH_PAGES 0x2000 #define BOARD_DATAFLASH_ERASE_SIZE (65536)// in bytes - -#if 0// use it as FAT and share it via USB -#define BOARD_DATAFLASH_FATFS -#define USB_MASSSTORAGE -#define HAL_BOARD_LOG_DIRECTORY "0:/" -#define HAL_BOARD_TERRAIN_DIRECTORY "0:/TERRAIN" -//#define HAL_PARAM_DEFAULTS_PATH "0:/APM/defaults.parm" -#else -// old dataflash logs -#endif - +#define HAL_BOARD_LOG_DIRECTORY "" // should be defined to logs works #define BOARD_UARTS_LAYOUT 1 #define USE_SOFTSERIAL 1 @@ -186,10 +176,10 @@ #define USE_SERIAL_4WAY_BLHELI_INTERFACE -//#define HAL_CONSOLE USB_Driver // console on USB -//#define HAL_CONSOLE_PORT 0 // USB -#define HAL_CONSOLE uart1Driver // console on radio -#define HAL_CONSOLE_PORT 1 // console on radio +#define HAL_CONSOLE USB_Driver // console on USB +#define HAL_CONSOLE_PORT 0 // USB +//#define HAL_CONSOLE uart1Driver // console on radio +//#define HAL_CONSOLE_PORT 1 // console on radio /* // @Param: FLEXI_I2C @@ -198,9 +188,8 @@ // @Values: 0:USART, 1:I2C // @User: Advanced AP_GROUPINFO("FLEXI_I2C", 6, AP_Param_Helper, _flexi_i2c, 0) \ - - */ + #define BOARD_HAL_VARINFO \ AP_GROUPINFO("FLEXI_I2C", 30, AP_Param_Helper, _flexi_i2c, 0), diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-STLINK.sh index f30ec497dc..374429b245 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-STLINK.sh @@ -4,9 +4,7 @@ #/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_Revolution_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_Revolution.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-plane-STLINK.sh index 672d4182ba..49a55c8722 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-plane-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/UPLOAD-plane-STLINK.sh @@ -4,9 +4,7 @@ #/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_Revolution_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_Revolution.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/bl/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/bl/UPLOAD-STLINK.sh new file mode 100755 index 0000000000..bba2dda0da --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/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_Revolution_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_Revolution/support/bl/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/support/bl/UPLOAD-plane-STLINK.sh new file mode 100755 index 0000000000..672d4182ba --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution/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_Revolution_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_Revolution_EE128/board.h b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_EE128/board.h index 21a9898a6c..35d8d5e923 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_EE128/board.h +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_EE128/board.h @@ -149,15 +149,11 @@ #define BOARD_DATAFLASH_PAGES 0x10000 #define BOARD_DATAFLASH_ERASE_SIZE (4096)// in bytes -#if 1// use it as FAT and share it via USB #define BOARD_DATAFLASH_FATFS #define USB_MASSSTORAGE #define HAL_BOARD_LOG_DIRECTORY "0:/" #define HAL_BOARD_TERRAIN_DIRECTORY "0:/TERRAIN" //#define HAL_PARAM_DEFAULTS_PATH "0:/APM/defaults.parm" -#else -// old dataflash logs -#endif #define BOARD_UARTS_LAYOUT 1 diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/rules.mk b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/rules.mk index 6721cf8045..e5714ea9ae 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/rules.mk +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/rules.mk @@ -49,3 +49,4 @@ TGT_BIN += $(OBJS_$(d)) d := $(dirstack_$(sp)) sp := $(basename $(sp)) +include $(HARDWARE_PATH)/massstorage/rules.mk diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-STLINK.sh index 7840d9bcaf..313ddae093 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-STLINK.sh @@ -4,9 +4,7 @@ #/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_Revolution_SD_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_Revolution_SD.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-plane-STLINK.sh index 09de967380..4c76770e3a 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-plane-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/UPLOAD-plane-STLINK.sh @@ -4,9 +4,7 @@ #/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_Revolution_SD_bl.bin 0x08000000 -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 +/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_Revolution_SD.bin 0x08010000 /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/bl/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/bl/UPLOAD-STLINK.sh new file mode 100755 index 0000000000..c8ab70888b --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/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_Revolution_SD_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_Revolution_SD/support/bl/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/support/bl/UPLOAD-plane-STLINK.sh new file mode 100755 index 0000000000..27ef6c0774 --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/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_Revolution_SD_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_cl_racing/board.cpp b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp index 059eac6ac2..875c197dc6 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp @@ -178,10 +178,14 @@ void boardInit(void) { #endif #ifdef BOARD_MPU6000_DRDY_PIN - // Init MPU6000 DRDY pin - but it not used by driver gpio_set_mode(PIN_MAP[BOARD_MPU6000_DRDY_PIN].gpio_device, PIN_MAP[BOARD_MPU6000_DRDY_PIN].gpio_bit, GPIO_INPUT_PU); #endif +#ifdef BOARD_BUZZER_PIN + gpio_set_mode(PIN_MAP[BOARD_BUZZER_PIN].gpio_device, PIN_MAP[BOARD_BUZZER_PIN].gpio_bit, GPIO_OUTPUT_PP); + gpio_write_bit(PIN_MAP[BOARD_BUZZER_PIN].gpio_device, PIN_MAP[BOARD_BUZZER_PIN].gpio_bit, HAL_BUZZER_OFF); +#endif + #ifdef BOARD_SBUS_INVERTER // it is not necessary because of 10K resistor to ground gpio_set_mode( PIN_MAP[BOARD_SBUS_INVERTER].gpio_device, PIN_MAP[BOARD_SBUS_INVERTER].gpio_bit, GPIO_OUTPUT_PP); diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.h b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.h index ee8bbbb135..27fd0ece2c 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.h +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.h @@ -61,8 +61,6 @@ - - #define BOARD_USB_SENSE 11 // PC5 @@ -75,17 +73,16 @@ //#define BOARD_SOFTSERIAL_RX 15 -# define BOARD_BLUE_LED_PIN 36 // BLUE -# define BOARD_GREEN_LED_PIN 6 // NC - PC0 pin 8 +# define BOARD_BLUE_LED_PIN 36 // BLUE +# define BOARD_GREEN_LED_PIN 105 // NC - PC0 pin 8 # define HAL_GPIO_A_LED_PIN BOARD_BLUE_LED_PIN # define HAL_GPIO_B_LED_PIN BOARD_GREEN_LED_PIN -# define HAL_GPIO_LED_ON LOW -# define HAL_GPIO_LED_OFF HIGH +# define HAL_GPIO_LED_ON LOW +# define HAL_GPIO_LED_OFF HIGH - -#define BOARD_NR_GPIO_PINS 109 +#define BOARD_NR_GPIO_PINS 109 //TODO add #define BOARD_HAS_UART3 ? @@ -118,16 +115,12 @@ #define BOARD_INS_DEFAULT HAL_INS_MPU60XX_SPI #define BOARD_INS_ROTATION ROTATION_NONE -#define BOARD_INS_MPU60x0_NAME "mpu6000" - -#define BOARD_MPU6000_CS_PIN 51 // PA4 -#define BOARD_MPU6000_DRDY_PIN 10 // PC4 - - +#define BOARD_INS_MPU60x0_NAME "mpu6000" +#define BOARD_MPU6000_CS_PIN 51 // PA4 +#define BOARD_MPU6000_DRDY_PIN 10 // PC4 #define BOARD_STORAGE_SIZE 8192 // 4096 // EEPROM size - #define BOARD_SDCARD_NAME "sdcard" #define BOARD_SDCARD_CS_PIN 2 // PB12 //#define BOARD_SDCARD_DET_PIN 38 // PB7 @@ -172,13 +165,8 @@ #define SERVO_PIN_5 105 // PB4 - buzzer //#define SERVO_PIN_6 22 // PA8 -#if 1 #define HAL_CONSOLE USB_Driver // console on USB #define HAL_CONSOLE_PORT 0 -#else - #define HAL_CONSOLE uart1Driver // console on radio - #define HAL_CONSOLE_PORT 1 -#endif /* // @Param: USB_STORAGE diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-STLINK.sh index 2184b4418a..b65a0b7b14 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-STLINK.sh @@ -4,9 +4,7 @@ #/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 ../../../../../ArduCopter/f4light_cl_racing_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduCopter/f4light_cl_racing.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-plane-STLINK.sh index 0fb68943b7..ee97066f9a 100755 --- a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-plane-STLINK.sh +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/UPLOAD-plane-STLINK.sh @@ -4,9 +4,7 @@ #/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_cl_racing_bl.bin 0x08000000 && \ -/usr/local/stlink/st-flash --reset write eeprom.bin 0x08004000 && \ +/usr/local/stlink/st-flash --reset write ../../../../../ArduPlane/f4light_cl_racing.bin 0x08010000 && \ /usr/local/stlink/st-util -m diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-DFU.sh b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-DFU.sh new file mode 100755 index 0000000000..55b92a8469 --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-DFU.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +#production binary for bootloader +#dfu-util -a 0 --dfuse-address 0x08010000 -D /tmp/ArduCopter.build/f4light_AirbotV2.bin + +# 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 + +dfu-util -a 0 --dfuse-address 0x08010000:leave -D ../../../../../ArduCopter/f4light_cl_racing.bin -R + diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-STLINK.sh new file mode 100755 index 0000000000..2184b4418a --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-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 ../../../../../ArduCopter/f4light_cl_racing_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_cl_racing/support/bl/UPLOAD-plane-STLINK.sh b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/support/bl/UPLOAD-plane-STLINK.sh new file mode 100755 index 0000000000..0fb68943b7 --- /dev/null +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/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_cl_racing_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/EEPROM_Read_DFU.sh b/libraries/AP_HAL_F4Light/support/EEPROM_Read_DFU.sh new file mode 100755 index 0000000000..7f10fabe9d --- /dev/null +++ b/libraries/AP_HAL_F4Light/support/EEPROM_Read_DFU.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +dfu-util -a 0 --dfuse-address 0x08004000:leave -Z 0xc000 -U $1.bin -R diff --git a/libraries/AP_HAL_F4Light/support/EEPROM_Write.sh b/libraries/AP_HAL_F4Light/support/EEPROM_Write.sh index f967ac43e4..1fd5a8cc89 100755 --- a/libraries/AP_HAL_F4Light/support/EEPROM_Write.sh +++ b/libraries/AP_HAL_F4Light/support/EEPROM_Write.sh @@ -1,4 +1,4 @@ #!/bin/sh -/usr/local/stlink/st-flash --reset write $1.bin 0x08004000 +/usr/local/stlink/st-flash --reset write $1 0x08004000 diff --git a/libraries/AP_HAL_F4Light/support/EEPROM_Write_DFU.sh b/libraries/AP_HAL_F4Light/support/EEPROM_Write_DFU.sh index fa4850f6cb..f5e801038f 100755 --- a/libraries/AP_HAL_F4Light/support/EEPROM_Write_DFU.sh +++ b/libraries/AP_HAL_F4Light/support/EEPROM_Write_DFU.sh @@ -1,3 +1,3 @@ #!/bin/sh -dfu-util -a 0 --dfuse-address 0x08004000:leave -D $1.bin -R +dfu-util -a 0 --dfuse-address 0x08004000:leave -D $1 -R diff --git a/libraries/AP_HAL_F4Light/support/MMM.sh b/libraries/AP_HAL_F4Light/support/MMM.sh index 45fe46349a..f1ba3bd588 100755 --- a/libraries/AP_HAL_F4Light/support/MMM.sh +++ b/libraries/AP_HAL_F4Light/support/MMM.sh @@ -86,12 +86,10 @@ mkdir -p $ROOT/Release/Plane cp $ROOT/ArduPlane/f4light_cl_racing_bl.bin $ROOT/Release/Plane cp $ROOT/ArduPlane/f4light_cl_racing_bl.dfu $ROOT/Release/Plane - make f4light-clean - ) ) && ( # AirBotF4 board cd $ROOT/ArduCopter -# make f4light-clean + make f4light-clean make f4light VERBOSE=1 BOARD=f4light_AirbotV2 && ( cp $ROOT/ArduCopter/f4light_AirbotV2.bin $ROOT/Release/Copter diff --git a/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh b/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh index f3c1d317af..5e7216795b 100755 --- a/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh +++ b/libraries/AP_HAL_F4Light/support/PULL_MASTER.sh @@ -3,6 +3,6 @@ git pull --rebase git://github.com/ArduPilot/ardupilot.git master # Step 2: Merge the changes and update on GitHub. -git checkout RevoMini -git rebase master && git push origin RevoMini +git checkout Revo +git rebase master && git push origin Revo diff --git a/libraries/AP_HAL_F4Light/support/UPDATE_OSD.sh b/libraries/AP_HAL_F4Light/support/UPDATE_OSD.sh index 7eac6019b1..6fb2be4d2e 100755 --- a/libraries/AP_HAL_F4Light/support/UPDATE_OSD.sh +++ b/libraries/AP_HAL_F4Light/support/UPDATE_OSD.sh @@ -7,8 +7,6 @@ git checkout -f master git fetch origin git reset --hard origin/master popd - # git diff # this should show a change to git hash of OSD git add minimosd-extra git commit -m 'HAL_F4Light: updated OSD submodule' -