Author Topic: Can't compile any usb-library based sketch  (Read 13430 times)

Capra

  • Newbie
  • *
  • Posts: 3
Can't compile any usb-library based sketch
« 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

whiplash7

  • Newbie
  • *
  • Posts: 2
Re: Can't compile any usb-library based sketch
« Reply #1 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

Capra

  • Newbie
  • *
  • Posts: 3
Re: Can't compile any usb-library based sketch
« Reply #2 on: October 13, 2014, 07:10:39 am »
We're both receiving the same usb error.  :-\

whiplash7

  • Newbie
  • *
  • Posts: 2
Re: Can't compile any usb-library based sketch
« Reply #3 on: October 22, 2014, 11:47:45 am »
Posting to keep the thread alive hoping somebody might have a solution for this problem

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Can't compile any usb-library based sketch
« Reply #4 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

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465

Capra

  • Newbie
  • *
  • Posts: 3
Re: Can't compile any usb-library based sketch
« Reply #6 on: November 09, 2014, 02:30:01 am »
same error, same missing files :T

flax2000

  • Newbie
  • *
  • Posts: 5
Re: Can't compile any usb-library based sketch
« Reply #7 on: November 28, 2014, 11:57:37 pm »
Hello i have the same error, any luck getting it to work?

jlauer

  • Newbie
  • *
  • Posts: 1
Re: Can't compile any usb-library based sketch
« Reply #8 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.

jspencer87

  • Newbie
  • *
  • Posts: 1
Re: Can't compile any usb-library based sketch
« Reply #9 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

digi_guy

  • Jr. Member
  • **
  • Posts: 87
Re: Can't compile any usb-library based sketch
« Reply #10 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.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Can't compile any usb-library based sketch
« Reply #11 on: December 19, 2014, 12:29:02 am »
New IDE and toolset today - pending completion of uploads.  Please update with your findings.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Can't compile any usb-library based sketch
« Reply #12 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.