From: AndrzejB <an...@bo...> - 2008-11-20 21:18:07
|
Hi Brian, To use AVR Studio (or other IDEs like Code::Blocks) you will have to have WinAVR installed, I assume that you already have that installed. In AVR Studio start a new project and choose AVR GCC. 2. Select project directory, in my case c:\AVR\robostix\Flash-LED\ 3. Choose processor, Atmega128 4. Add all .c and .h files - right click on the project tree, in my case Flash-LED(default) and choose and choose "Add Existing File(s)". - make sure to add all the files that appear in the Makefile At this point if you try to compile you will likely get errors like ../Flash-LED.c:39: error: 'UART0_GetCharStdio' undeclared (first use in this function) etc 5. Under project tree, right click on Other Files and select "Edit configuration options". This will bring up pretty busy dialog box 6. Click on to the Include Directories icon on the left side of the screen and add Common and Shared directories (the add icon is located on the upper right corner). Note you will also have to add the directory where your project is stored or you will get this error: D:\AVR\robostix\Flash-LED\..\Common/a2d.h:29:20: error: Config.h: No such file or directory This should compile your AVR code. Hope this helps. Andrzej Dave Hylands wrote: > > Hi Brian, > > On Mon, Nov 17, 2008 at 10:37 PM, Stucker, Brian M > <bri...@uk...> wrote: >> I see what you mean in the makefile for the included simple-flasher >> folder, but within avrstudio the makefile is automatically created. So >> are you saying that avrstudio might not be making the makefile correctly? >> I don't want to have to use gcc to manually compile every time I code, >> that's what I thought the benefit was to use avrstudio. Below is the >> contents of the makefile that avrstudio generated. > > To build, I just cd into the directory Flash-LED and type > > make > > The Makefile that you created for avrstudio only has a single file in > it. To build the Flash-LED sample, you'll need all of the following > files: > > robostix/Common/a2d_8.c > robostix/Common/Delay.c > robostix/Common/Timer.c > robostix/Common/UART.c > robostix/Flash-LED/Hardware.c > robostix/Flash-LED/Flash-LED.c > > I've never built anything using avr studio, so I'm not sure if that's > enough or not. The Makefile system that's included in the robostix > tree is already complete and works, so you may want to try that first. > Sometimes, files will need particular options. > > make v=1 > > will cause the complete command line for each program which is > executed (ie compiler, linker) to be displayed. > > make clean > > is normally not required, but it will remove all generated files. > > -- > Dave Hylands > Shuswap, BC, Canada > http://www.DaveHylands.com/ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- View this message in context: http://www.nabble.com/Programing-Robostix-tp20546864p20565227.html Sent from the Gumstix mailing list archive at Nabble.com. |