I am very new with these controllers and I am having some trouble getting things to function.
Specifically, I am having trouble with building “simple-test” for my SV-328
I am very unsure of where the problem lies, so I am going to go through what I have done so far.
I have installed the pololu AVR library V100607. The installation.bat did not work properly, so I followed the “manual install” instructions for windows XP.
When I open the simple-test.aps file with AVR studio, I get this message.
One thing that leaped out at me was that the MCU was specified as atmega32p. I am not sure why the “8” is not there, or how to fix this. Also the “pololu/orangutan.h” file does exist at c:\pololu, I am confused as to why it does not find it. Do I need to redefine where it looks for this file, or is it sufficient to have copied it to c:\pololu?
I know there is most likely something very simple I am missing here. Let me apologize now if I am asking a stupid question.
I went in with a text editor and changed the “32p” to “328p” inside the simple-test.aps file.
Now the output is this
Build started 5.11.2010 at 00:04:56
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT test.o -MF dep/test.o.d -c …/test.c
…/test.c:1:30: error: pololu/orangutan.h: No such file or directory
…/test.c: In function ‘main’:
…/test.c:5: warning: implicit declaration of function ‘print’
…/test.c:7: warning: implicit declaration of function ‘play’
…/test.c:11: warning: implicit declaration of function ‘red_led’
…/test.c:12: warning: implicit declaration of function ‘green_led’
…/test.c:14: warning: implicit declaration of function 'delay_ms’
make: *** [test.o] Error 1
Build failed with 1 errors and 5 warnings…
I have been playing with the orangutan.h file and its location. Just stabbing in the dark really. Any pointers?
It looks like we made a typo (32p instead of 328p) in the most recent release of the Pololu AVR library. Thanks for catching that and letting us know! We’ll be releasing a fixed version very shortly, but you can download and install the previous revision, libpololu-avr-1000607, if you want an immediate fix (the only difference between the 100607 revision and the latest release is support for Orangutan X2s with ATmega1284P processors).
As for your problems after fixing the “atmega32p”, it sounds like you did not install the library in the correct place. Can you please verify that you have followed the instructions here?
I can confirm that I did copy the files [libpololu_atmega48.a, libpololu_atmega168.a, libpololu_atmega328p.a, libpololu_atmega324p.a, libpololu_atmega644p.a, libpololu_atmega1284p.a, and libpololu_atmega1284p_x2.a] into the [C:\WinAVR-20100110\avr\lib] directory. And I have copied the pololu directory into the location [C:\WinAVR-20100110\avr\include]
I am going to give it a try with the prior AVR library release and see if that makes a difference =]
to direct it to the proper location of that file and am now getting this output.
Build started 5.11.2010 at 02:02:19
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT test.o -MF dep/test.o.d -c …/test.c
In file included from …/test.c:1:
c:/pololu/libpololu-avr/pololu/orangutan.h:1:27: error: pololu/analog.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:2:27: error: pololu/buzzer.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:3:25: error: pololu/time.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:4:27: error: pololu/motors.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:5:24: error: pololu/lcd.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:6:25: error: pololu/leds.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:7:32: error: pololu/pushbuttons.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:8:24: error: pololu/qtr.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:9:29: error: pololu/encoders.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:10:30: error: pololu/resources.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:11:28: error: pololu/digital.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:12:27: error: pololu/servos.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:13:28: error: pololu/pulsein.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:14:27: error: pololu/serial.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:15:58: error: pololu/OrangutanSPIMaster/OrangutanSPIMaster.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:16:46: error: pololu/OrangutanSVP/OrangutanSVP.h: No such file or directory
c:/pololu/libpololu-avr/pololu/orangutan.h:17:44: error: pololu/OrangutanX2/OrangutanX2.h: No such file or directory
…/test.c: In function ‘main’:
…/test.c:5: warning: implicit declaration of function ‘print’
…/test.c:7: warning: implicit declaration of function ‘play’
…/test.c:11: warning: implicit declaration of function ‘red_led’
…/test.c:12: warning: implicit declaration of function ‘green_led’
…/test.c:14: warning: implicit declaration of function 'delay_ms’
make: *** [test.o] Error 1
Build failed with 17 errors and 5 warnings…
All the files it is looking for are at that location.
I assume something is wrong with the way I have installed the library, though I cannot determine what I did incorrectly looking at the directions.
Can you post the entire output from install.bat? I do not know why “tools/avr” would be causing you problems.
Also, didn’t you say that you had installed the .h files in C:\WinAVR-20100110\avr\include\pololu ? Why are you changing the #include to some other path?
I just changed the path to see if it might have been looking in the incorrect place. I thought it might be worth a try.
This is the result from install.bat below
The Pololu AVR Library object files (.a) will be installed in c:/program files/a
tmel/avr tools/avr toolchain/bin/…/lib/gcc/avr/4.4.3/…/…/…/…/avr/lib/
The header files (.h) will be installed in c:/program files/atmel/avr tools/avr
toolchain/bin/…/lib/gcc/avr/4.4.3/…/…/…/…/avr/lib//…/include/pololu
(For Windows Vista: make sure to right-click and select “Run as administrator”)
Press any key to continue . . .
install -d c:/program files/atmel/avr tools/avr toolchain/bin/…/lib/gcc/avr/4.4
.3/…/…/…/…/avr/lib/
install -d c:/program files/atmel/avr tools/avr toolchain/bin/…/lib/gcc/avr/4.4
.3/…/…/…/…/avr/lib//…/include/pololu
install libpololu_atmega48.a libpololu_atmega168.a libpololu_atmega328p.a libpol
olu_atmega324p.a libpololu_atmega644p.a libpololu_atmega1284p.a c:/program files
/atmel/avr tools/avr toolchain/bin/…/lib/gcc/avr/4.4.3/…/…/…/…/avr/lib/
install: c:/program' is a directory install:files/atmel/avr’ is a directory
install: `tools/avr’ is a directory
make: *** [install] Error 1
Press any key to continue . . .
It appears that your WinAVR files are installed in “c:/program files/atmel/avr tools/avr toolchain/”, not in “C:\WinAVR-20100110”. Did you move some files to that location? Do you also have something in “C:\WinAVR-20100110”?
Anyway, it appears that our automatic installation is getting tripped up by the spaces in that folder name. Can you try copying the pololu folder to “c:/program files/atmel/avr tools/avr toolchain/avr/include/pololu” and the .a files into “c:/program files/atmel/avr tools/avr toolchain/avr/lib” according to the instructions? The folders should look almost exactly like those in the screenshot below, including the “avr”, “compat”, and other subfolders.
I was copying the .a files into C:\WinAVR-20080610\avr\lib and the “pololu” directory into C:\WinAVR-20080610\avr\include
Putting everything under c:\program files\atmel… as you said, got it working. Sorry I didnt quite pick that up from the installation instruction in the user guide.
Recently i bought a Pololu to do a maze solving project. I started to programme by installing the pWINAVR and AVR Studio4. I faced the same problem as stated above.
0 [main] sh 2664 sync_with_child: child 4804(0x184) died before initialization with status code 0x0
87332 [main] sh 2664 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT test.o -MF dep/test.o.d -c …/test.c
…/test.c:1:30: fatal error: pololu/orangutan.h: No such file or directory
compilation terminated.
make: *** [test.o] ´íÎó 1
Build failed with 1 errors and 0 warnings…
i saved the file to the correct directory but still cant solve.
I’m using Window Vista 64bits, WinAVR-20100110, AVR Studio 4 and libpololu-avr-090605.
Is there any particular reason you want to use WinAVR and AVR Studio 4, and a version of our library from 2009? We recently switched our documentation over to use AVR Studio 5, which is newer and better. You can see the instructions in the Pololu AVR Programming Quick Start Guide.
Unfortunately, WinAVR doesn’t quite work with Windows Vista 64-bit and you have to modify it to make it work. If you want to pursue that instead of AVR Studio 5, this site will help you: