I'm sure that this is somewhere in the forum but

Where do I put “avr/pgmspace.h” & “pololu/3pi.h” on a win 7 64bit machine running AVR Studio 5.0.1163?
This is for the wall follower, and yes I have downloaded the BlinkLED.c successfully.

Any help would be appreciated

Yours Simon M.

The story so far…
Downloaded and did a full install of your files (avr_development_bundle_110624.exe ),
then set the project as per Section 7
(pololu.com/docs/0J20/7)
set the project thus


which produced …

and I wonder if this is due to the path being to long??

SUCCESS, well at least in part…
I noticed that the path was …AVR Studio 4.0, but I didn’t have a …AVR Studio 4.0!
Completely removing Studio 4, and all other s/w added by avr_development_bundle_110624.exe, rebooting then reloading avr_development_bundle_110624.exe, I got an error free build!

Now to convince AVR Studio 5.0 to work, wish me luck

OK today I have worked on Studio 5 and I worked out that the Project Options of Studio 4.0 is in
and set thus…


But I still can’t crack the ‘pgmspace.h’ issue with the wall follower or at least I think so, because I get lots of undefined references eg

------ Build started: Project: WallFollower, Configuration: Debug AVR ------
Build started.
Project "WallFollower.avrgccproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\AVR Studio 5.0\Vs\AvrGCC.targets" from project "C:\WallFollower\WallFollower.avrgccproj" (target "Build" depends on it):
	Task "RunAvrGCC"
		C:\WinAVR-20100110\utils\bin\make.exe all 
		Building target: WallFollower.elf
		Invoking: AVR/GNU C/C++ Linker
		"C:/WinAVR-20100110/bin/avr-gcc.exe"  -mmcu=atmega328p  -Wl,-Map=WallFollower.map -o WallFollower.elf  WallFollower.o  
		WallFollower.o: In function `initialize':
C:\WallFollower\Debug/.././WallFollower.c(39,1): undefined reference to `print_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(40,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(41,1): undefined reference to `print_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(42,1): undefined reference to `play_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(43,1): undefined reference to `delay_ms'
C:\WallFollower\Debug/.././WallFollower.c(44,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(45,1): undefined reference to `print_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(46,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(47,1): undefined reference to `print_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(48,1): undefined reference to `delay_ms'
C:\WallFollower\Debug/.././WallFollower.c(52,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(53,1): undefined reference to `print_long'
C:\WallFollower\Debug/.././WallFollower.c(54,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(55,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(56,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(57,1): undefined reference to `delay_ms'
C:\WallFollower\Debug/.././WallFollower.c(50,1): undefined reference to `button_is_pressed'
C:\WallFollower\Debug/.././WallFollower.c(63,1): undefined reference to `wait_for_button_release'
C:\WallFollower\Debug/.././WallFollower.c(64,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(65,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(67,1): undefined reference to `play_from_program_space'
C:\WallFollower\Debug/.././WallFollower.c(68,1): undefined reference to `is_playing'
		WallFollower.o: In function `read_battery_millivolts':
C:\WinAVR-20100110\avr\include/pololu/analog.h(104,1): undefined reference to `read_battery_millivolts_3pi'
		WallFollower.o: In function `back_up':
C:\WallFollower\Debug/.././WallFollower.c(72,1): undefined reference to `get_ms'
C:\WallFollower\Debug/.././WallFollower.c(74,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(75,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(76,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(77,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(78,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(81,1): undefined reference to `set_motors'
		WallFollower.o: In function `turn_in_place':
C:\WallFollower\Debug/.././WallFollower.c(84,1): undefined reference to `get_ms'
C:\WallFollower\Debug/.././WallFollower.c(85,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(86,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(87,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(88,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(89,1): undefined reference to `print'
C:\WallFollower\Debug/.././WallFollower.c(92,1): undefined reference to `set_motors'
		WallFollower.o: In function `main':
C:\WallFollower\Debug/.././WallFollower.c(105,1): undefined reference to `get_ms'
C:\WallFollower\Debug/.././WallFollower.c(110,1): undefined reference to `analog_read'
C:\WallFollower\Debug/.././WallFollower.c(115,1): undefined reference to `analog_read'
C:\WallFollower\Debug/.././WallFollower.c(122,1): undefined reference to `set_motors'
C:\WallFollower\Debug/.././WallFollower.c(124,1): undefined reference to `get_ms'
C:\WallFollower\Debug/.././WallFollower.c(125,1): undefined reference to `clear'
C:\WallFollower\Debug/.././WallFollower.c(126,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(127,1): undefined reference to `print_long'
C:\WallFollower\Debug/.././WallFollower.c(128,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(129,1): undefined reference to `print_long'
C:\WallFollower\Debug/.././WallFollower.c(130,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(131,1): undefined reference to `print_long'
C:\WallFollower\Debug/.././WallFollower.c(132,1): undefined reference to `lcd_goto_xy'
C:\WallFollower\Debug/.././WallFollower.c(133,1): undefined reference to `print_long'
		make: *** [WallFollower.elf] Error 1
	Done executing task "RunAvrGCC" -- FAILED.
Done building target "CoreBuild" in project "WallFollower.avrgccproj" -- FAILED.
Done building project "WallFollower.avrgccproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

But if I these changes to C linker I get ‘Can’t find’ error although the path is good??

What gives

Yours Simon M.


Having successfully make an LED blink, to test the rest of the function out I have got TEST.c to compile and load with out any complaints. Just need to sort out the wall_follower.

Yours Simon M.

Hello, Simon.

If you can’t get AVR Studio 5 working then I recommend just using AVR Studio 4 for now. We plan to update all our documentation and installers soon to support AVR Studio 5 as the preferred IDE, but until then we can only provide limited support for AVR Studio 5.

In your second to last post, the screenshot you showed makes it look like you are trying to tell AVR Studio 5 to use include files from WinAVR. This is wrong. AVR Studio 5 has its own avr-gcc toolchain built in. It does not depend on WinAVR. The pgmspace.h file that comes with AVR Studio 5 can be found in: “C:\Program Files (x86)\Atmel\AVR Studio 5.0\AVR Toolchain\avr\include\avr” assuming you installed AVR Studio 5 to the “C:\Program Files (x86)\Atmel\AVR Studio 5.0” directory.

You will need to configure the linker in AVR Studio 5 so it can find the .a files for the Pololu AVR C/C++ Library.

–David

Many thanks for that David, I felt I was close, and that it was to do with the .a files, can you remember how to force studio 5 to pick up your .a files?

Yours Simon M.

You should copy them into “C:\Program Files (x86)\Atmel\AVR Studio 5.0\AVR Toolchain\avr\lib” and separately configure your AVR Studio 5 project to use the right .a file for your board.

–David

Hi David,
You got me thinking about the Studio 5 & Studio 4 issues.
I uninstalled my Studio 5 and installed did a fresh install using v5.0.1223. I did this as I spotted an interesting snippet
on AVRfreaks dated 25th Oct 2011,
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=884538#884538
stating

I then successfully built the Wallfollower using Studio 4, and imported it in to Studio 5. It now works! Just have to see what changes it made, but a happy me.

Yours Simon M.