j796160836 / vusb-for-arduino

Automatically exported from code.google.com/p/vusb-for-arduino
0 stars 0 forks source link

Error compiling v005 on Linux #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new sketch
2. Include UsbKeyboard.h
3. Try co compile

What is the expected output? What do you see instead?

In file included from 
/usr/share/arduino/libraries/UsbKeyboard/UsbKeyboard.h:13:0,
                 from sketch_nov16a.ino:1:
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:479:26: error: variable 
‘usbDescriptorDevice’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 char usbDescriptorDevice[];
                          ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:485:33: error: variable 
‘usbDescriptorConfiguration’ must be const in order to be put into 
read-only section by means of ‘__attribute__((progmem))’
 char usbDescriptorConfiguration[];
                                 ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:491:29: error: variable 
‘usbDescriptorHidReport’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 char usbDescriptorHidReport[];
                             ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:497:27: error: variable 
‘usbDescriptorString0’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 char usbDescriptorString0[];
                           ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:503:31: error: variable 
‘usbDescriptorStringVendor’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 int usbDescriptorStringVendor[];
                               ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:509:31: error: variable 
‘usbDescriptorStringDevice’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 int usbDescriptorStringDevice[];
                               ^
/usr/share/arduino/libraries/UsbKeyboard/usbdrv.h:515:37: error: variable 
‘usbDescriptorStringSerialNumber’ must be const in order to be put into 
read-only section by means of ‘__attribute__((progmem))’
 int usbDescriptorStringSerialNumber[];
                                     ^
In file included from sketch_nov16a.ino:1:0:
/usr/share/arduino/libraries/UsbKeyboard/UsbKeyboard.h:36:39: error: variable 
‘usbDescriptorHidReport’ must be const in order to be put into read-only 
section by means of ‘__attribute__((progmem))’
 PROGMEM char usbHidReportDescriptor[35] = { /* USB report descriptor */

What version of the product are you using? On what operating system?

# Debian Linux (amd64 architecture)
# Packages:
avr-libc 1:1.8.0-4
avrdude 6.0.1-1
binutils-avr 2.23.1-2
gcc-avr 1:4.8-2
arduino 1:1.0.5+dfsg2-1
arduino-core 1:1.0.5+dfsg2-1

Original issue reported on code.google.com by rodolf...@gmail.com on 16 Nov 2013 at 3:53

GoogleCodeExporter commented 9 years ago
Testing old versions of gcc-avr, and it works:

gcc-avr 1:4.3.5-1+b1
avr-libc 1:1.6.8-2

Original comment by rodolf...@gmail.com on 16 Nov 2013 at 3:57

GoogleCodeExporter commented 9 years ago
I encountered the same problem but found a workaround. I wouldn't call it a 
solution, since I'm still not sure what actually caused the problem. Also, I 
use openSUSE13.1 which may differ from Debian sufficiently to impact this. 
However...

Workaround:
Download Arduino IDE directly from arduino.cc
Install in ~/bin

Using that version the code compiled immediately.

Original comment by solar.gr...@gmail.com on 6 Jul 2014 at 11:18