Building in Atmel Sudio 6

1,048 views
Skip to first unread message

mitchjs

unread,
Jun 23, 2012, 2:49:24 PM6/23/12
to lufa-s...@googlegroups.com
HI all, i want to use Atmel Studio as my IDE
 
I bring in a demo, tell AS6 to use an external makefile, i edit the make file, to set lufa's path...
and no go :(
 
content of the base make file
 

MCU = atmega32u2
ARCH = AVR8
BOARD = BOARD_MICROPENDOUS_32U2
F_CPU = 16000000
F_USB = $(F_CPU)
OPTIMIZATION = s
TARGET = Cando
SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
LUFA_PATH = ../../Lufa-Lib/LUFA/
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
LD_FLAGS =

 

the output is:

Task "RunCompilerTask"
        C:\Program Files (x86)\Atmel\Atmel Studio 6.0\make\make.exe -C "C:\Users\mitchjs\Documents\Atmel Studio\Projects\Cando\Cando" -f "makefile" all
        The system cannot find the path specified.
        The system cannot find the path specified.
        make: Entering directory `C:/Users/mitchjs/Documents/Atmel Studio/Projects/Cando/Cando'
        ""
        Begin compilation of project \"Cando\"...
        ""
        f was unexpected at this time.
        make: *** [check-source] Error 255
        make: Leaving directory `C:/Users/mitchjs/Documents/Atmel Studio/Projects/Cando/Cando'
Done executing task "RunCompilerTask" -- FAILED.

 

its like the make system doesnt see my toolchain

 

anyone get this going?

 

thanks!

 

 

Dean Camera

unread,
Jun 24, 2012, 6:49:00 AM6/24/12
to lufa-s...@googlegroups.com
It looks like you're missing some of the build prerequisites; LUFA requires a semi-POSIX environment to compile things correctly. It's not great (ideally I'd like it to just work) but short of complicating things with separate modules for POSIX and Windows Shell environments, it's the best we've got.

You have two choices to get set up:

1) Download and install the last version of the old WinAVR toolchain (http://winavr.sourceforge.net) which contains the requires shell and POSIX utilities. You can remove the old toolchain binaries it installs from your path so that only the GNU utilities that are included with it are used, to compile with the much newer version of avr-gcc included in Atmel Studio.

2) Download and install the MSYS project from http://www.mingw.org and install it. If you also want to compile the bootloaders, you'll need the bc.exe command line calculator, which you can download and install from http://gnuwin32.sourceforge.net/downlinks/bc.php .

Cheers!
- Dean

mitchjs

unread,
Jun 24, 2012, 6:30:05 PM6/24/12
to lufa-s...@googlegroups.com
1st, do we top post in google groups? seems like it
 
yes, i want it just works...
 
so.. i need to figure out what POSIX Utilites are needed
 
at one point i did have WINAVR  installed, and it didnt work, so i uninstalled it, since i havent used it, since atmel took over the toolchain stuff
 
hmm... its hard for me to trace down whats needed, the error messages are just so vague
it not like it says file not found "blabla.exe"
 
mitch

DerEngel

unread,
Jun 24, 2012, 7:11:46 PM6/24/12
to lufa-s...@googlegroups.com
Hi mitchjs,

yes this is very possible! I have a AS5.1 blank project that I copy and use for all new LUFA/AVR projects. My "blank" project already includes LUFA, Descriptors.c/h, USB_requests.c/h, and the Main.c.

So for a new board/project, I just make a copy of this, open it up in AS5, change the VID/PID to a new value, set the AVR part from the AS5 menu, and hit "Run". Its great for me because I like the visual studio IDE for development and debugging.
 
My solution doesn't use WinAVR or makefiles. It only uses AVR Studio 5.1 (which I assume could be upgraded to AS6 without a problem).

The USB requests include a few things; one to return the firmware version, a return echo command, and commands to turn off/on/blink the board LEDs. If you are using your own board, the Buttons.h/LEDs.h can be configured in the Boards folder.

I believe this 'template' is a great start for beginners too.

P.S. Dean, you are welcome to use this project in anyway you see fit. :-)
BlankLufaProject_AS51.zip

mitchjs

unread,
Jun 24, 2012, 8:38:05 PM6/24/12
to lufa-s...@googlegroups.com
Dean, i also noticed i have MSYS installed for another project... what would i need? i need to put the MSYS/BIN folder in my path?
 
 
DerEngel, im checking it out... thanks... i like templates :)

inizen

unread,
Jun 25, 2012, 3:34:34 PM6/25/12
to lufa-s...@googlegroups.com

Dean Camera

unread,
Jun 26, 2012, 11:29:41 AM6/26/12
to lufa-s...@googlegroups.com
Mitch,

Yes, you need to add the MSYS binary folder to your path - on my machine, this is:

C:\MinGW\msys\1.0\bin

You can test this from the command prompt to make sure it's correct; try to run sh, test and grep and make sure all three can be found. If so, the remaining binaries from the Atmel toolchain (make, avr-gcc and other utilities) should complete the prerequisites other than the optional bc.exe utility needed for the bootloader makefile calculations.

Cheers!
- Dean
Reply all
Reply to author
Forward
0 new messages