General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
-
Eisvogel
Post
by Eisvogel » Sun Jul 01, 2012 8:03 pm
Hey there,
I tried V-USB in the development environment to use AtmelStudio6. I've made everything as described in this
tutorial. But unfortunately I keep getting errors like this:
Code: Select all
Error 1 variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 455 6 USB-Input
Code: Select all
Error 2 variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 461 6 USB-Input
Code: Select all
Error 3 variable 'usbDescriptorHidReport' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 467 6 USB-Input
Code: Select all
Error 4 variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 473 6 USB-Input
Code: Select all
Error 5 variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 479 5 USB-Input
Code: Select all
Error 6 variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 485 5 USB-Input
Code: Select all
Error 7 variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 491 5 USB-Input
-
Eisvogel
Post
by Eisvogel » Mon Jul 02, 2012 9:33 am
Yea i done the same like you but than came this error:
Code: Select all
E r r o r 1 u n d e f i n e d r e f e r e n c e t o ` u s b I n i t ' C : \ P r o g r a mm i e r e n \ U S B - I n p u t \ U S B - I n p u t
-
Eisvogel
Post
by Eisvogel » Mon Jul 02, 2012 6:41 pm
I think the problem is that the funcion is deklared but nothing is in there:
Why is there no code like this?
Code: Select all
USB_PUBLIC void usbInit(void){
my programm
}
-
asd123zxc
- Posts: 5
- Joined: Sun Jul 08, 2012 10:15 pm
Post
by asd123zxc » Tue Jul 10, 2012 11:42 pm
simply add a const before variables
for example:
to
-
simpak
- Posts: 1
- Joined: Sat Jun 22, 2013 9:05 pm
Post
by simpak » Sat Jun 22, 2013 9:06 pm
Eisvogel wrote:Hey there,
I tried V-USB in the development environment to use AtmelStudio6. I've made everything as described in this
tutorial. But unfortunately I keep getting errors like this:
Code: Select all
Error 1 variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 455 6 USB-Input
Code: Select all
Error 2 variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 461 6 USB-Input
Code: Select all
Error 3 variable 'usbDescriptorHidReport' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 467 6 USB-Input
Code: Select all
Error 4 variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 473 6 USB-Input
Code: Select all
Error 5 variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 479 5 USB-Input
Code: Select all
Error 6 variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 485 5 USB-Input
Code: Select all
Error 7 variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of '__attribute__((progmem))' C:\Programmieren\USB-Input\USB-Input\USB-Input\V-USB\usbdrv.h 491 5 USB-Input
Please update all your drivers..
-
vouvoume
Post
by vouvoume » Sun Jun 23, 2013 1:46 am
To everybody facing this issue: Please use a recent version of V-USB.
For example you can get one from :
1)
https://github.com/obdev/v-usb or
2)
https://github.com/baerwolf/USBaspLoaderThe problem in old versin: PROGMEMs aren't declared as const, as they should be since data in the flash is read-only.
Older gccs ignored this (this actually was a bug). Todays compiler will raise an error.
Best regards