diff --git a/Changelog.txt b/Changelog.txt index 7c28b0d..83d055e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,6 @@ +--- v1.4.3 (August 23, 2041) +- Fix compilation with modern GCC + --- v1.4.2 (July 14, 2013) - Corrected the USB Vendor ID diff --git a/main.c b/main.c index f5089ae..0dfaffa 100644 --- a/main.c +++ b/main.c @@ -37,7 +37,7 @@ static uchar rt_usbDeviceDescriptorSize=0; /* The maximum number of independent reports that are supported. */ #define MAX_REPORTS 8 -PROGMEM int usbDescriptorStringSerialNumber[] = { +const PROGMEM int usbDescriptorStringSerialNumber[] = { USB_STRING_DESCRIPTOR_HEADER(4), '1','0','0','0' }; diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index ba859d6..43a2d02 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -5,7 +5,7 @@ * Tabsize: 4 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbdrv.c,v 1.2 2009-05-02 12:41:41 cvs Exp $ + * This Revision: $Id: usbdrv.c,v 1.3 2014-08-23 23:58:32 cvs Exp $ */ #include "iarcompat.h" @@ -80,7 +80,7 @@ optimizing hints: #if USB_CFG_DESCR_PROPS_STRING_0 == 0 #undef USB_CFG_DESCR_PROPS_STRING_0 #define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0) -PROGMEM char usbDescriptorString0[] = { /* language descriptor */ +const PROGMEM char usbDescriptorString0[] = { /* language descriptor */ 4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */ 3, /* descriptor type */ 0x09, 0x04, /* language index (0x0409 = US-English) */ @@ -90,7 +90,7 @@ PROGMEM char usbDescriptorString0[] = { /* language descriptor */ #if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN #undef USB_CFG_DESCR_PROPS_STRING_VENDOR #define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor) -PROGMEM int usbDescriptorStringVendor[] = { +const PROGMEM int usbDescriptorStringVendor[] = { USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN), USB_CFG_VENDOR_NAME }; @@ -99,7 +99,7 @@ PROGMEM int usbDescriptorStringVendor[] = { #if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN #undef USB_CFG_DESCR_PROPS_STRING_PRODUCT #define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice) -PROGMEM int usbDescriptorStringDevice[] = { +const PROGMEM int usbDescriptorStringDevice[] = { USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN), USB_CFG_DEVICE_NAME }; @@ -108,7 +108,7 @@ PROGMEM int usbDescriptorStringDevice[] = { #if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN #undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER #define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber) -PROGMEM int usbDescriptorStringSerialNumber[] = { +const PROGMEM int usbDescriptorStringSerialNumber[] = { USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN), USB_CFG_SERIAL_NUMBER }; diff --git a/usbdrv/usbdrv.h b/usbdrv/usbdrv.h index fc4141b..43ca4e5 100644 --- a/usbdrv/usbdrv.h +++ b/usbdrv/usbdrv.h @@ -5,7 +5,7 @@ * Tabsize: 4 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbdrv.h,v 1.2 2009-05-02 12:41:41 cvs Exp $ + * This Revision: $Id: usbdrv.h,v 1.3 2014-08-23 23:58:32 cvs Exp $ */ #ifndef __usbdrv_h_included__ @@ -394,43 +394,43 @@ extern volatile schar usbRxLen; #ifndef __ASSEMBLER__ extern #if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif char usbDescriptorDevice[]; extern #if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif char usbDescriptorConfiguration[]; extern #if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif char usbDescriptorHidReport[]; extern #if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif char usbDescriptorString0[]; extern #if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif int usbDescriptorStringVendor[]; extern #if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif int usbDescriptorStringDevice[]; extern #if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM) -PROGMEM +const PROGMEM #endif int usbDescriptorStringSerialNumber[]; diff --git a/usbdrv/usbdrvasm.S b/usbdrv/usbdrvasm.S index 84d13a4..6788b64 100644 --- a/usbdrv/usbdrvasm.S +++ b/usbdrv/usbdrvasm.S @@ -5,7 +5,7 @@ * Tabsize: 4 * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) - * Revision: $Id: usbdrvasm.S,v 1.2 2009-05-02 12:41:41 cvs Exp $ + * Revision: $Id: usbdrvasm.S,v 1.3 2014-08-23 23:58:32 cvs Exp $ */ /* @@ -74,7 +74,7 @@ the file appropriate for the given clock rate. # define nop2 rjmp .+0 /* jump to next instruction */ # ifndef USB_INTR_VECTOR /* default to hardware interrupt INT0 */ -# define USB_INTR_VECTOR SIG_INTERRUPT0 +# define USB_INTR_VECTOR INT0_vect # endif .text .global USB_INTR_VECTOR