Skip to content
Alden Hart edited this page Dec 16, 2013 · 7 revisions

###Setting up Winavr in AVRStudio4 http://www.societyofrobots.com/member_tutorials/node/380

###Set up Floating Point Printfs You will need to set up the project configs like so. Of particular importance is including the floating point libs so the numeric displays will function properly.

In the Custom Options section, the custom compilation [All files] tab should read:
-gdwarf-2 
-std=gnu99
-Wall
-DF_CPU=32000000UL
-Os
-funsigned-char
-funsigned-bitfields
-fpack-struct
-fshort-enums

In the [Linker options] section if must read:   (Note: may need to scroll left window to the end)
-Wl,-u,vfprintf
-lprintf_flt
-lm

That's -W "ell" (not "one") and all other leading 'l's are also "ell"

Here's a useful link: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=117023

###Mappings

I'm not sure these are right but this is what I used

Z:\home\tools\hudson\workspace\avr8-gnu-toolchain\src\avr-lib\libc\stdlib\ --> C:\Program Files\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\source\avr\avr-libc
Z:\home\tools\hudson\workspace\avr8-gnu-toolchain\src\avr-lib\libc\include\ --> C:\Program Files\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\source\avr\avr-libc
Z:\home\tools\hudson\workspace\avr8-gnu-toolchain\src\avr-lib\libc\stdio\ --> C:\Program Files\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\source\avr\avr-libc
Z:\home\tools\hudson\workspace\avr8-gnu-toolchain\avr8-gnu-toolchain-linux_x86_64\libc\gcc\avr\4.5.1\include --> C:\Program Files\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\i686-pc-mingw32\avr\include
Clone this wiki locally