Error compiling BootloaderDFU for atmega8u2

92 views
Skip to first unread message

Juan Edmundo Pozo Fortunić

unread,
Dec 15, 2015, 11:06:47 PM12/15/15
to LUFA Library Support List

Hi.

Im trying to compile the BootloaderDFU LUFA project for the atmega8u2 in Atmel Studio 7 after installing the LUFA extension but i get this error from the compiler:

#error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again.

defined on BootloaderDFU.h :

/* Preprocessor Checks: */
#if !defined(__OPTIMIZE_SIZE__)
#error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again.
#endif

Im new using LUFA.

thanks

Dean Camera

unread,
Dec 19, 2015, 10:42:52 PM12/19/15
to lufa-s...@googlegroups.com
Hi Juan,

As the error message says, you need to change the project settings to compile for size, rather than speed. You can do this via Project->Properties menu, Toolchain tab, then AVR/GNU Compiler->Optimization. Change the optimisation level to "Optimize for Size".

The ASF integration system I use to integrate LUFA into Atmel Studio allows me to set all sorts of project defaults and settings, but the optimisation level is specifically locked out from being adjusted grammatically (hence the direction for the user to manually change this setting).

- 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 https://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