Author Topic: [SOLVED] Issues Encountered with Arduino 1.5.8B and the DigiUSB Library  (Read 4771 times)

padawan

  • Newbie
  • *
  • Posts: 2
Hi all.

This is my first post please be kind with a padawan.

I met the same compilation problem than mybook4 (http://digistump.com/board/index.php/topic,1630.msg7521.html#msg7521) but with the OneWire->Digispark_Example from 1.5.8B

1) I replaced the original hardware\digistump\avr\libraries\DigiUSB\usbdrv.c with the modified file by mybook4. (ref: http://digistump.com/board/index.php/topic,1630.msg7521.html#msg7521)
2) I tried to modify the hardware\digistump\avr\libraries\DigiUSB\DigiUSB.cpp in the same way... on line 166
I replaced: PROGMEM char usbHidReportDescriptor[22] = {    /* USB report descriptor */
by: char const usbHidReportDescriptor[22] PROGMEM = {    /* USB report descriptor */

I'm just a padawan, so I didn't understand neither the reason why it didn't work, nor why it works, but now, it compiles.

I hope it could be usefull  ::)
« Last Edit: January 22, 2015, 10:20:35 am by padawan »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Issues Encountered with Arduino 1.5.8B and the DigiUSB Library
« Reply #1 on: January 04, 2015, 05:03:08 pm »
When you install 1.5.8B you need to delete the Documents/Arduino/hardware/digistump folder or it will take precedent over the new files located in the install.

So likely you installed 1.5.8B but you were still using old files in documents for the libraries - which is why you had to apply the fix.

All USB libraries compile and work under a clean install of 1.5.8B

padawan

  • Newbie
  • *
  • Posts: 2
Re: Issues Encountered with Arduino 1.5.8B and the DigiUSB Library
« Reply #2 on: January 05, 2015, 09:32:52 am »
Hello and thank you for your answer.

I checked and how strange, I only have a readme.txt file at this place.
I never installed any IDE distrib because I usually prefer to download a full portable ZIP file that I unzip (usually onto my desktop). I thought this way of doing would be easier for me to update my IDE distrib.

My way of proceeding is
1) to download this file : https://github.com/digistump/DigistumpArduino/releases/download/v1.5.8B/DigistumpIDE1.5.8B.zip
2) to unzip onto my desktop
3) to go to the directory
4) to run arduino.exe
5) to load the example
6) to click on Verify button.
7) Then, the detailed error log is here:

Code: [Select]
Arduino : 1.5.8 (Windows 8), Carte : "Digispark (Default - 16.5mhz)"

Utilisation de la bibliothèque OneWire prise dans le dossier : C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire (legacy)

Utilisation de la bibliothèque DigiUSB prise dans le dossier : C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB (legacy)



C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\Digispark_Example.cpp -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\Digispark_Example.cpp.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire\utility C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire\OneWire.cpp -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\OneWire\OneWire.cpp.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-gcc -c -g -x assembler-with-cpp -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\utility C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrvasm.S -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\DigiUSB\usbdrvasm.S.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\utility C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\oddebug.c -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\DigiUSB\oddebug.c.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\utility C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\osccal.c -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\DigiUSB\osccal.c.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=158 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\cores\tiny -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\variants\digispark -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\OneWire -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB -IC:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\utility C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c -o C:\Users\Padawan\AppData\Local\Temp\build1161291681959543057.tmp\DigiUSB\usbdrv.c.o

C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\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\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:70:14: error: conflicting types for 'usbDescriptorString0'
In file included from C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:515:6: note: previous declaration of 'usbDescriptorString0' was here
 char usbDescriptorString0[];
      ^
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\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\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:80:14: error: conflicting types for 'usbDescriptorStringVendor'
In file included from C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:521:5: note: previous declaration of 'usbDescriptorStringVendor' was here
 int usbDescriptorStringVendor[];
     ^
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\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\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:89:14: error: conflicting types for 'usbDescriptorStringDevice'
In file included from C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:527:5: note: previous declaration of 'usbDescriptorStringDevice' was here
 int usbDescriptorStringDevice[];
     ^
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\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\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:111:14: error: conflicting types for 'usbDescriptorDevice'
In file included from C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:491:6: note: previous declaration of 'usbDescriptorDevice' was here
 char usbDescriptorDevice[];
      ^
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\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\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:142:14: error: conflicting types for 'usbDescriptorConfiguration'
In file included from C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.c:12:0:
C:\Users\Padawan\Desktop\DigistumpIDE1.5.8B\hardware\digistump\avr\libraries\DigiUSB\usbdrv.h:497:6: note: previous declaration of 'usbDescriptorConfiguration' was here
 char usbDescriptorConfiguration[];
      ^
Erreur lors de la compilation.

Do you think I could have missed an old file hidden somewhere or an option in a Roaming\preference file or may be in the RegDatabase ?
Sorry for disturbing  :-[ and many (many, many) thanks for your help

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Issues Encountered with Arduino 1.5.8B and the DigiUSB Library
« Reply #3 on: January 05, 2015, 06:55:44 pm »
I apologize I've misled you - the changes I made to make this work won't be in the package until the next release! If you grab the latest copy here: https://github.com/digistump/DigistumpArduino/tree/master/hardware/digistump/avr/libraries

It should work - the next release will have all the fixes for this in it.