Problem getting started

Running on Vista
AVR Studio 4.18

Installed AVR Studio 4.18 on Vista as Administrator.
Installed WinAVR
Downloaded pololu.com/file/download/lib … e_id=0J200 and extracted the files
RUN install.bat as Administrator, but I get the following error shown at screencast.com/t/ZDM1ZDVjMjg

Navigating to C:\Pololu\libpololu-avr-090605\libpololu-avr\examples\atmega328p\3pi-demo-program and opening 3pi-demo-program, I get the following error shown at
screencast.com/t/NDIyYmE3Z
How can I fix this?

Navigating to C:\WinAVR\libpololu-avr-090605\libpololu-avr\examples\atmega328p\3pi-demo-program and running the 3pi-demo program, I get the following message shown at
screencast.com/t/YzNjYTZjNjMt

What am I missing?

Chuck

Hello Chuck,

Sorry for the trouble. It looks like our 3pi page linked directly to an old version of the library, so you were trying to install something that was a bit out-of-date. Can you go to the AVR Library Download Page to get the latest version, then tell us if you still have problems installing it? I think that the newest version will work for you.

The -2147467259 error code is something that appears in some versions of AVR Studio, and it is annoying, but it probably will not affect anything. Here is a short discussion of the error.

-Paul

Are you using the 64-bit version of Windows Vista? The “child state waiting for longjmp” error is a known issue with WinAVR and 64-bit Vista. The solution that usually works is to rebase WinAVR’s msys-1.0.dll to a different address. For more information, see:

madwizard.org/electronics/ar … inavrvista

avrfreaks.net/index.php?name … ic&t=83927

–David

Hi Paul,

Thanks for the suggestions. I am running on an X64 Vista machine.

I have installed 4.18 a couple of times and I still get the -2147467259 error code. If try to push on and attempt to compile and downlaod the code, I get the errors shown below.

Do I need to install WinAVR before I install AVRStudio? I am afraid that the discussion that you pointed me to about the error didn’t help much because it seemed no one said that had solved the problem. They were all using earlier versions than the 4.18 I am using and different versions of Windows. Should I drop back to an earlier version and if so, which one would you recommend?

Build started 17.12.2009 at 09:14:21
      0 [main] sh 8680 sync_with_child: child 2904(0x11C) died before initialization with status code 0x0
   9367 [main] sh 8680 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:13:24: error: pololu/3pi.h: No such file or directory
../test.c: In function 'load_custom_characters':
../test.c:122: warning: implicit declaration of function 'lcd_load_custom_character'
../test.c:130: warning: implicit declaration of function 'clear'
../test.c: In function 'bat_test':
../test.c:139: warning: implicit declaration of function 'read_battery_millivolts'
../test.c:141: warning: implicit declaration of function 'print_long'
../test.c:142: warning: implicit declaration of function 'print'
../test.c:144: warning: implicit declaration of function 'delay_ms'
../test.c: In function 'wait_for_250_ms_or_button_b':
../test.c:153: warning: implicit declaration of function 'button_is_pressed'
../test.c:153: error: 'BUTTON_B' undeclared (first use in this function)
../test.c:153: error: (Each undeclared identifier is reported only once
../test.c:153: error: for each function it appears in.)
../test.c: In function 'led_test':
../test.c:162: warning: implicit declaration of function 'play'
../test.c:165: warning: implicit declaration of function 'red_led'
../test.c:173: warning: implicit declaration of function 'lcd_goto_xy'
../test.c:176: warning: implicit declaration of function 'green_led'
../test.c: In function 'ir_test':
../test.c:188: error: 'BUTTON_C' undeclared (first use in this function)
../test.c:189: warning: implicit declaration of function 'read_line_sensors'
../test.c:189: error: 'IR_EMITTERS_OFF' undeclared (first use in this function)
../test.c:191: error: 'IR_EMITTERS_ON' undeclared (first use in this function)
../test.c:207: warning: implicit declaration of function 'print_character'
../test.c: In function 'motor_test':
../test.c:228: error: 'BUTTON_A' undeclared (first use in this function)
../test.c:245: error: 'BUTTON_C' undeclared (first use in this function)
../test.c:285: warning: implicit declaration of function 'set_motors'
../test.c: In function 'music_test':
../test.c:308: warning: implicit declaration of function 'get_ms'
../test.c:322: warning: implicit declaration of function 'is_playing'
../test.c:324: warning: implicit declaration of function 'play_from_program_space'
../test.c: In function 'pot_test':
../test.c:336: warning: implicit declaration of function 'set_analog_mode'
../test.c:336: error: 'MODE_10_BIT' undeclared (first use in this function)
../test.c:337: warning: implicit declaration of function 'read_trimpot'
../test.c:343: warning: implicit declaration of function 'play_frequency'
../test.c: In function 'time_test':
../test.c:373: error: 'BUTTON_A' undeclared (first use in this function)
../test.c:387: error: 'BUTTON_C' undeclared (first use in this function)
../test.c: In function 'print_two_lines_delay_1s':
../test.c:419: warning: implicit declaration of function 'print_from_program_space'
../test.c: In function 'wait_for_button_and_beep':
../test.c:429: warning: implicit declaration of function 'wait_for_button_press'
../test.c:429: error: 'ALL_BUTTONS' undeclared (first use in this function)
../test.c:431: error: 'BUTTON_A' undeclared (first use in this function)
../test.c:433: error: 'BUTTON_B' undeclared (first use in this function)
../test.c:438: warning: implicit declaration of function 'wait_for_button_release'
../test.c: In function 'initialize':
../test.c:449: warning: implicit declaration of function 'pololu_3pi_init'
../test.c:462: error: 'BUTTON_B' undeclared (first use in this function)
../test.c: In function 'menu_select':
../test.c:482: warning: implicit declaration of function 'lcd_show_cursor'
../test.c:482: error: 'CURSOR_BLINKING' undeclared (first use in this function)
../test.c:486: error: 'ALL_BUTTONS' undeclared (first use in this function)
../test.c:489: error: 'BUTTON_A' undeclared (first use in this function)
../test.c:494: error: 'BUTTON_B' undeclared (first use in this function)
../test.c:496: warning: implicit declaration of function 'lcd_hide_cursor'
../test.c:511: warning: implicit declaration of function 'stop_playing'
../test.c:520: error: 'BUTTON_C' undeclared (first use in this function)
../test.c: At top level:
../test.c:545: fatal error: opening dependency file dep/test.o.d: No such file or directory
compilation terminated.
make: *** [test.o] Error 1
Build failed with 22 errors and 27 warnings...

Hello.

As far as I know, you can completely ignore error -2147467259. As Paul said, it’s annoying, but doesn’t really affect anything. The problems you’re having aren’t related to this error.

It looks like your issue is related to what David posted about; did you look at the links David linked and try what he suggested?

- Ben

Hi Ben,

Are WinAvr and AVRStudio independent or are they required to be loaded in a particular order? Is AVRStudio dependent on WinAVR?

I did look at the notes, but I am still a bit confused. The message implied that later versions of WinAvr should solve this problem and I have installed the latest version 20090313.

I did try rename the msys file and then pasted the msys-1.0.dll with the version that Davd pointed me at. I then tried running AVRStudio again and now I get the output below. I renamed the origianl msys back. That directory as installed had two versions of of the file msys-1.0.dll and msys-1.0.dll.old.

Build started 18.12.2009 at 15:19:02
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:13:24: error: pololu/3pi.h: No such file or directory
…/test.c: In function ‘load_custom_characters’:
…/test.c:122: warning: implicit declaration of function ‘lcd_load_custom_character’
…/test.c:130: warning: implicit declaration of function ‘clear’
…/test.c: In function ‘bat_test’:
…/test.c:139: warning: implicit declaration of function ‘read_battery_millivolts’
…/test.c:141: warning: implicit declaration of function ‘print_long’
…/test.c:142: warning: implicit declaration of function ‘print’
…/test.c:144: warning: implicit declaration of function ‘delay_ms’
…/test.c: In function ‘wait_for_250_ms_or_button_b’:
…/test.c:153: warning: implicit declaration of function ‘button_is_pressed’
…/test.c:153: error: ‘BUTTON_B’ undeclared (first use in this function)
…/test.c:153: error: (Each undeclared identifier is reported only once
…/test.c:153: error: for each function it appears in.)
…/test.c: In function ‘led_test’:
…/test.c:162: warning: implicit declaration of function ‘play’
…/test.c:165: warning: implicit declaration of function ‘red_led’
…/test.c:173: warning: implicit declaration of function ‘lcd_goto_xy’
…/test.c:176: warning: implicit declaration of function ‘green_led’
…/test.c: In function ‘ir_test’:
…/test.c:188: error: ‘BUTTON_C’ undeclared (first use in this function)
…/test.c:189: warning: implicit declaration of function ‘read_line_sensors’
…/test.c:189: error: ‘IR_EMITTERS_OFF’ undeclared (first use in this function)
…/test.c:191: error: ‘IR_EMITTERS_ON’ undeclared (first use in this function)
…/test.c:207: warning: implicit declaration of function ‘print_character’
…/test.c: In function ‘motor_test’:
…/test.c:228: error: ‘BUTTON_A’ undeclared (first use in this function)
…/test.c:245: error: ‘BUTTON_C’ undeclared (first use in this function)
…/test.c:285: warning: implicit declaration of function ‘set_motors’
…/test.c: In function ‘music_test’:
…/test.c:308: warning: implicit declaration of function ‘get_ms’
…/test.c:322: warning: implicit declaration of function ‘is_playing’
…/test.c:324: warning: implicit declaration of function ‘play_from_program_space’
…/test.c: In function ‘pot_test’:
…/test.c:336: warning: implicit declaration of function ‘set_analog_mode’
…/test.c:336: error: ‘MODE_10_BIT’ undeclared (first use in this function)
…/test.c:337: warning: implicit declaration of function ‘read_trimpot’
…/test.c:343: warning: implicit declaration of function ‘play_frequency’
…/test.c: In function ‘time_test’:
…/test.c:373: error: ‘BUTTON_A’ undeclared (first use in this function)
…/test.c:387: error: ‘BUTTON_C’ undeclared (first use in this function)
…/test.c: In function ‘print_two_lines_delay_1s’:
…/test.c:419: warning: implicit declaration of function ‘print_from_program_space’
…/test.c: In function ‘wait_for_button_and_beep’:
…/test.c:429: warning: implicit declaration of function ‘wait_for_button_press’
…/test.c:429: error: ‘ALL_BUTTONS’ undeclared (first use in this function)
…/test.c:431: error: ‘BUTTON_A’ undeclared (first use in this function)
…/test.c:433: error: ‘BUTTON_B’ undeclared (first use in this function)
…/test.c:438: warning: implicit declaration of function ‘wait_for_button_release’
…/test.c: In function ‘initialize’:
…/test.c:449: warning: implicit declaration of function ‘pololu_3pi_init’
…/test.c:462: error: ‘BUTTON_B’ undeclared (first use in this function)
…/test.c: In function ‘menu_select’:
…/test.c:482: warning: implicit declaration of function ‘lcd_show_cursor’
…/test.c:482: error: ‘CURSOR_BLINKING’ undeclared (first use in this function)
…/test.c:486: error: ‘ALL_BUTTONS’ undeclared (first use in this function)
…/test.c:489: error: ‘BUTTON_A’ undeclared (first use in this function)
…/test.c:494: error: ‘BUTTON_B’ undeclared (first use in this function)
…/test.c:496: warning: implicit declaration of function ‘lcd_hide_cursor’
…/test.c:511: warning: implicit declaration of function ‘stop_playing’
…/test.c:520: error: ‘BUTTON_C’ undeclared (first use in this function)
make: *** [test.o] Error 1
Build failed with 21 errors and 27 warnings…

I am sure that I am missing something really simple.

Thanks

Chuck

AVR Studio uses WinAVR, but it doesn’t matter what order you install the two packages. It looks like you fixed your longjump error, and now the problem is that AVR Studio can’t find the Pololu AVR library files. You must install the Pololu AVR library after you install WinAVR since the library adds the directory “pololu” to C:\WinAVR-20090313\avr\include and puts all of the necessary library header files (like “3pi.h”) there. Try installing the Pololu AVR library again, and keep an eye out for any errors that might be preventing proper installation.

If you check right now, I expect you won’t find the directory C:\WinAVR-20090313\avr\include\pololu. After you reinstall the library, you should be able to navigate to C:\WinAVR-20090313\avr\include\pololu.

- Ben

I reinstalled WinAVR and installed the msys file in the util/bin directory. I do not get the error anymore.

My next issue is that I must something installed in the wrong place or I have done an incomplete installation. When I try to build the simple-test code (by the way the documentation of 3Pi does not match the actual naming structure of the directories), I get the error

…/test.c:1:30: error: pololu/orangutan.h: No such file or directory
and a bunch of subsequent errors.

The code is looking for the .h file - #include <pololu/orangutan.h>
It is actually in C:\Pololu\libpololu-avr-090605\libpololu-avr\pololu
while the test program is located in
C:\Pololu\libpololu-avr-090605\libpololu-avr\examples\atmega328p\simple-test

Should I modify the # include to be

#include <../../../pololu/orangutan.h>

or is there a better way to tell AVRStudio to look in the directory where the orangutan file is located?

What is the recommended practice to modify one of the examples - copy it into a new parallel directory or…

Thanks

Chuck

Hi Ben, David and Paul,

I extracted the the files into C:\WinAVR-20090313\libpololu-avr-090605\libpololu-avr and then ran the Install.bat as Administrator and all the files seem to be in the right place.

I then did a build of the test example and I have a successful build.

Thanks for all your help. I am still trying to wrap my mind around this new development paradigm and software so I may have a few more questions as I go along.

Chuck