USB CDC on XMega128A3U

110 views
Skip to first unread message

0xPIT

unread,
Sep 14, 2014, 11:51:45 AM9/14/14
to lufa-s...@googlegroups.com
Hi,

I have a board with a 128A3U on it. 
Up to now, it was easy to get several avr-gcc examples (blink, adc, dac, timer) are working nicely, but all without lufa.

Now, I'd like to be able to printf() to a Serial USB Port using the on chip USB.
As a start, I failed trying to compile any of the Demos (GeneriaHID or VirtualSerial).

Is there some howto or quick walk through on how to get the examples running on said MCU? 
I was unable to find something about this in the doxygen-docs or by googling (highly unusual...)

I'm on Mac, using avr-gcc (GCC) 4.7.2 and avr-libc 1.8.0.
Is a 128A3U even supported? Judging from the headers, it is not. I tried to -D__AVR_ATxmega128A3U__ without success.


tia,

  -pit

Dean Camera

unread,
Sep 21, 2014, 3:07:52 AM9/21/14
to lufa-s...@googlegroups.com
Hi Pit,

I've been thinking of ways to make a introduction video for a while, but can't find any good screen recording software. I also thought about writing a "quick start guide" at some point, depending on how many people are interested. Right now the easiest way to get going is for users to install the LUFA Atmel Studio extension, then read the "Getting Started" information from the page that will automatically open on first run (expand out the sections, they have pictures and text). If they've closed that page, look in the Help menu of Atmel Studio to get it back.


That said, you're on a Mac, so (probably) no Atmel Studio unless you're got a virtual/native Windows installation. The ATXMEGA128A3U is supported by LUFA but may not be supported by your version of the AVR-GCC toolchain. Try these makefile settings for the Demos\ClassDriver\VirtualSerial demo:

MCU          = atxmega128a1u
ARCH         = XMEGA
BOARD        = NONE
F_CPU        = 32000000
F_USB        = 48000000
OPTIMIZATION = s
TARGET       = VirtualSerial
SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
LUFA_PATH    = ../../../../LUFA
CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
LD_FLAGS     =

That should compile and run after a "make all" on the command line to build the code. If you get an error about the device name, update your avr-gcc installation.


- Dean
--
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lufa-support...@googlegroups.com.
To post to this group, send email to lufa-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/lufa-support.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages