On 01/10/2012 03:06, Ben Dooks wrote:
> How much code space does it use?
About 4k of flash and 240 bytes of sram. Most of the code space is
taken up with the printf implementation from avr-libc, you can cut that
back if you just use puts/gets etc. Most of the sram is the 160 bytes
used to hold the input and output line buffers, you can tune that back
as well.
If you are getting short of space there are a load of #defines you can
use to crank back the space the LUFA library uses by reducing menory
requirements and not compiling unneeded code (e.g. host-mode bits), see
http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__to...
Also, when I looked at the link Kimball sent out I noticed the USB
descriptors were being allocated in sram, I think you can move them into
flash using the PROGMEM attribute and setting the USE_FLASH_DESCRIPTORS
#define, I think I've seen that in some of the LUFA demos.
--
Alan Burlison
--