diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index a6ff62c70..5c9342dfe 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -30,6 +30,8 @@ include $(TOP)/make/firmware-defs.mk # Set to YES to compile for debugging DEBUG ?= NO +# Set to YES to build a FW version that will erase all flash memory +ERASE_FLASH ?= NO # Set to YES to use the Servo output pins for debugging via scope or logic analyser ENABLE_DEBUG_PINS ?= NO @@ -144,6 +146,7 @@ SRC += $(OPUAVTALK)/uavtalk.c SRC += $(OPUAVOBJ)/uavobjectmanager.c SRC += $(OPUAVOBJ)/eventdispatcher.c SRC += $(OPUAVOBJ)/uavobjectsinit_linker.c +SRC += $(OPSYSTEM)/pios_usb_hid_desc.c else ## TESTCODE SRC += $(OPTESTS)/test_common.c @@ -205,7 +208,7 @@ SRC += $(PIOSSTM32F10X)/pios_wdg.c # PIOS USB related files (seperated to make code maintenance more easy) SRC += $(PIOSSTM32F10X)/pios_usb_hid.c -SRC += $(PIOSSTM32F10X)/pios_usb_hid_desc.c +#SRC += $(PIOSSTM32F10X)/pios_usb_hid_desc.c SRC += $(PIOSSTM32F10X)/pios_usb_hid_istr.c SRC += $(PIOSSTM32F10X)/pios_usb_hid_prop.c SRC += $(PIOSSTM32F10X)/pios_usb_hid_pwr.c diff --git a/flight/CopterControl/System/coptercontrol.c b/flight/CopterControl/System/coptercontrol.c index 303d257dd..53077ddcd 100644 --- a/flight/CopterControl/System/coptercontrol.c +++ b/flight/CopterControl/System/coptercontrol.c @@ -85,6 +85,10 @@ int main() /* Brings up System using CMSIS functions, enables the LEDs. */ PIOS_SYS_Init(); +#if ERASE_FLASH + PIOS_Flash_W25X_EraseChip(); +#endif + /* Initialize the system thread */ SystemModInitialize(); diff --git a/flight/CopterControl/System/inc/pios_usb_hid_desc.h b/flight/CopterControl/System/inc/pios_usb_hid_desc.h index 9a551a8fb..ae72ebfb8 100644 --- a/flight/CopterControl/System/inc/pios_usb_hid_desc.h +++ b/flight/CopterControl/System/inc/pios_usb_hid_desc.h @@ -37,7 +37,7 @@ #define PIOS_HID_SIZ_REPORT_DESC 36 #define PIOS_HID_SIZ_STRING_LANGID 4 #define PIOS_HID_SIZ_STRING_VENDOR 28 -#define PIOS_HID_SIZ_STRING_PRODUCT 20 +#define PIOS_HID_SIZ_STRING_PRODUCT 28 #define PIOS_HID_SIZ_STRING_SERIAL 52 /* 96 bits, 12 bytes, 24 characters, 48 in unicode */ #define STANDARD_ENDPOINT_DESC_SIZE 0x09