Error compiling USB CDC example from AVR272 (AT90USB162)

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

I'm using Atmel Studio 5 (5.1.208) to build the CDC
example from AVR272 for a AT90USB162.

I get the following error:
expected '=', ',', ';', 'asm' or '__attribute__' before 'S_usb_device_descriptor'

for the line in usb_descriptors.c
code S_usb_device_descriptor usb_dev_desc =

with cursor on word 'code' the window shows:
typedef uint64_t prog_uint64_t PROGMEM

in file compiler.h under GCC Compiler (#ifdef AVRGCC)
#define code PROGMEM

when cursor is on word 'PROGMEM' window shows:
typedef uint64_t prog_uint64_t PROGMEM

from file pgmspace.h (for not DOXYGEN and not mint8)
typedef uint64_t prog_uint64_t PROGMEM;

Not sure what is causing this. Since the source code
is from AVR272, I'm guessing I'm missing a #define
or other compiler switch.

Any help or ideas will be appreciated.

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

Quote:

expected '=', ',', ';', 'asm' or '__attribute__' before


99 times out of 100 that says "I do not know the type being used in this line". Usually because the .h file where it is #define'd or typedef has not been parsed yet. Chances are you missed a required #include. Possibly in this case?

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

clawson wrote:
99 times out of 100 that says "I do not know the type being used in this line".

Thanks for your response.
The #includes are there, but the #define code ...
isn't necessarily being implemented. Not sure why.

I'm new to Studio 5 and not sure I have it set up
properly. Imported the files from AVR272 as Studio 4
project and not sure that worked properly ... I had
to add other files into the project that weren't
copied by the import.

I'm going to create a new project and try it again.

If anyone has had any experience working with the
files in AVR272 (USB CDC) I'd appreciate hearing
about your experience.