Digistump Forums

The Digispark => Digispark Pro Support => Topic started by: Capra on October 10, 2014, 06:30:45 am

Title: Can't compile any usb-library based sketch
Post by: Capra on October 10, 2014, 06:30:45 am
Hey guys. I've received my digispark like a week ago and I was really happy about it. Just yesterday I soldered the headers to the board and tested if it was working. Everything was fine, even uploaded the blink sketch after installing the libraries on my arduino Ide (I have the nightly). The thing that mostly interested me was the usb capabilities, so I grabbed the usbkeyboard example and tried to upload it. The result wasn't the one that I expected.
The result was the following:
Code: [Select]
Arduino:nightly (Windows 8), Board:"Digispark Pro (16 Mhz)"

In file included from C:\Users\Personal\Documents\Arduino\hardware\digistump\avr\libraries\DigiKeyboard\usbdrvasm_includer.S:23:0:
C:\Users\Personal\Documents\Arduino\hardware\digistump\avr\libraries\DigiKeyboard\usbconfig.h:209:20: fatal error: osccal.h: No such file or directory
 #include "osccal.h"
                    ^
compilation terminated.
Errore durante la compilazione

I tried adding the file and the result was that I was missing another one, so I downloaded it and then compiled again. Same result, but this time I wasn't missing any files:
Code: [Select]
Arduino:nightly (Windows 8), Board:"Digispark Pro (16 Mhz)"

DigiKeyboard\usbdrv_includer.c.o: In function `usbDriverDescriptor':
C:\Users\Personal\Documents\Arduino\hardware\digistump\avr\libraries\DigiKeyboard\usbdrv/usbdrv.c:344: undefined reference to `usbFunctionDescriptor'
DigiKeyboard\usbdrv_includer.c.o: In function `usbHandleResetHook':
C:\Users\Personal\Documents\Arduino\hardware\digistump\avr\libraries\DigiKeyboard\usbdrv/usbdrv.c:558: undefined reference to `calibrateOscillator'
collect2: error: ld returned 1 exit status
Errore durante la compilazione

Any help guys? Is that a problemi with the libraries that I installed or maybe Windows 8?

P.S: Used the official tutorial in how to setup the environment: http://digistump.com/wiki/digispark/tutorials/connectingpro
Title: Re: Can't compile any usb-library based sketch
Post by: whiplash7 on October 12, 2014, 02:02:59 pm
I get the following error when I try to compile the "Echo" sketch.

Arduino: 1.5.8 (Windows 7), Board: "Digispark Pro (16 Mhz)"

C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:70:14: error: variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorString0[] = { /* language descriptor */
              ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:70:14: error: conflicting types for 'usbDescriptorString0'
In file included from C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:515:6: note: previous declaration of 'usbDescriptorString0' was here
 char usbDescriptorString0[];
      ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:80:14: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM int  usbDescriptorStringVendor[] = {
              ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:80:14: error: conflicting types for 'usbDescriptorStringVendor'
In file included from C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:521:5: note: previous declaration of 'usbDescriptorStringVendor' was here
 int usbDescriptorStringVendor[];
     ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:89:14: error: variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM int  usbDescriptorStringDevice[] = {
              ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:89:14: error: conflicting types for 'usbDescriptorStringDevice'
In file included from C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:527:5: note: previous declaration of 'usbDescriptorStringDevice' was here
 int usbDescriptorStringDevice[];
     ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:111:14: error: variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorDevice[] = {    /* USB device descriptor */
              ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:111:14: error: conflicting types for 'usbDescriptorDevice'
In file included from C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:491:6: note: previous declaration of 'usbDescriptorDevice' was here
 char usbDescriptorDevice[];
      ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:142:14: error: variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorConfiguration[] = {    /* USB configuration descriptor */
              ^
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:142:14: error: conflicting types for 'usbDescriptorConfiguration'
In file included from C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\radhakanth\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:497:6: note: previous declaration of 'usbDescriptorConfiguration' was here
 char usbDescriptorConfiguration[];
      ^
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.


I'm using 64bit Win 7, arduino IDE V1.5.8, Digistump1.5Addons-v092
Title: Re: Can't compile any usb-library based sketch
Post by: Capra on October 13, 2014, 07:10:39 am
We're both receiving the same usb error.  :-\
Title: Re: Can't compile any usb-library based sketch
Post by: whiplash7 on October 22, 2014, 11:47:45 am
Posting to keep the thread alive hoping somebody might have a solution for this problem
Title: Re: Can't compile any usb-library based sketch
Post by: defragster on October 23, 2014, 12:24:06 pm
I recall Digistump posting something about the state of Pro USB debugging that may relate to general USB usage . . . I don't find the post or details in Forum or Wiki or KStart Updates though
Title: Re: Can't compile any usb-library based sketch
Post by: digistump on November 08, 2014, 02:06:13 pm
Please try the latest downloads - this should be fixed:

http://sourceforge.net/projects/digistump/files/Digistump1.5Addons-v092Mac.zip/download

http://sourceforge.net/projects/digistump/files/Digistump1.5Addons-v092.zip/download
Title: Re: Can't compile any usb-library based sketch
Post by: Capra on November 09, 2014, 02:30:01 am
same error, same missing files :T
Title: Re: Can't compile any usb-library based sketch
Post by: flax2000 on November 28, 2014, 11:57:37 pm
Hello i have the same error, any luck getting it to work?
Title: Re: Can't compile any usb-library based sketch
Post by: jlauer on December 08, 2014, 08:04:14 pm
I am having same problem. Just got my Digispark Pro's today and want to use the Serial Port capabilities so I can use this via ChiliPeppr.com for doing some laser soldering. When I try to compile the DigiUSB Echo example (or anything that uses DigiUSB) I get:

Arduino: 1.5.8 (Windows 8), Board: "Digispark Pro (16 Mhz)"

C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:70:14: error: variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorString0[] = { /* language descriptor */
              ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:70:14: error: conflicting types for 'usbDescriptorString0'
In file included from C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:515:6: note: previous declaration of 'usbDescriptorString0' was here
 char usbDescriptorString0[];
      ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:80:14: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM int  usbDescriptorStringVendor[] = {
              ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:80:14: error: conflicting types for 'usbDescriptorStringVendor'
In file included from C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:521:5: note: previous declaration of 'usbDescriptorStringVendor' was here
 int usbDescriptorStringVendor[];
     ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:89:14: error: variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM int  usbDescriptorStringDevice[] = {
              ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:89:14: error: conflicting types for 'usbDescriptorStringDevice'
In file included from C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:527:5: note: previous declaration of 'usbDescriptorStringDevice' was here
 int usbDescriptorStringDevice[];
     ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:111:14: error: variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorDevice[] = {    /* USB device descriptor */
              ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:111:14: error: conflicting types for 'usbDescriptorDevice'
In file included from C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:491:6: note: previous declaration of 'usbDescriptorDevice' was here
 char usbDescriptorDevice[];
      ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:142:14: error: variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM char usbDescriptorConfiguration[] = {    /* USB configuration descriptor */
              ^
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:142:14: error: conflicting types for 'usbDescriptorConfiguration'
In file included from C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\john\Documents\Arduino\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:497:6: note: previous declaration of 'usbDescriptorConfiguration' was here
 char usbDescriptorConfiguration[];
      ^
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Title: Re: Can't compile any usb-library based sketch
Post by: jspencer87 on December 12, 2014, 09:35:37 pm
I am having the same problem with the same files missing.
I am using arduino 1.5.8 with the v092mac addon files.
I am also on osx 10.9.5
Title: Re: Can't compile any usb-library based sketch
Post by: digi_guy on December 13, 2014, 12:58:44 pm
I'm getting the same error on my Windows 8.1 computer after trying a couple of different arduino builds.
Title: Re: Can't compile any usb-library based sketch
Post by: defragster on December 19, 2014, 12:29:02 am
New IDE and toolset today - pending completion of uploads.  Please update with your findings.
Title: Re: Can't compile any usb-library based sketch
Post by: defragster on December 25, 2014, 12:38:45 am
I got the USBKeyboard example to compile and run to work sending the string to the open app as if by keyboard.