builder errors on avr studio 6.1

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have been using 6.0 for a while now and upgraded to 6.1 sp2. I' getting all kinds of errors I have not had before.

Warning	1	"/*" within comment [-Wcomment]	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\main.c	118	1	main
Warning	2	"__CODEVISIONAVR__" is not defined [-Wundef]	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbportability.h	85	7	main
Warning	3	"USB_CFG_DRIVER_FLASH_PAGE" is not defined [-Wundef]	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbportability.h	128	5	main
Warning	4	"USB_CFG_HAVE_MEASURE_FRAME_LENGTH" is not defined [-Wundef]	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	323	5	main
Warning	5	"USB_CFG_CHECK_DATA_TOGGLING" is not defined [-Wundef]	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	346	5	main
Error	6	variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	455	6	main
Error	7	variable 'usbDescriptorHidReport' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	467	6	main
Error	8	variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	473	6	main
Error	9	variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	479	5	main
Error	10	variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	485	5	main
Error	11	variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\usbdrv\usbdrv.h	491	5	main
Error	12	variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of '__attribute__((progmem))'	S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\main.c	197	34	main

Any reason for this?

Strange if I grab the latest build from v-usb I get this one error

Error 6 opening dependency file .dep/main.o.d: No such file or directory S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\main.c 173 0 main

ok I found a tip about a m sys 1.0 dll file and now I get two more errors
Error 6 variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of '__attribute__((progmem))' S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\main.c 197 34 main
Error 7 conflicting types for 'usbDescriptorStringSerialNumber' S:\blissbox\SOURCE_FILES\blissbox\bliss-box 328 version 2.0\main.c 197 34 main

This is so fun.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, I see what is going on here. newer avr-gcc versions demand that everything put in progmem is defined const [1]. So I had to add a cost in front of the first error line.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You may want to explore __flash as an alternative to PROGMEM. It's been in since avr-gcc 4.7 so is also in 6.1SP2 and now AS6.2Beta which uses avr-gcc 4.8.1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you have a link to the advantages disadvantages? I'm not finding much on it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A post I made yesterday illustrates the advantages:

https://www.avrfreaks.net/index.p...

No need for any #include and most importantly no need for any pgm_read*() nonsense any more.

__flash is a new qualifier added to the language, it turns GCC support from explicit to implicit.