Installing software


I have been assigned a project using the Pololu 3pi.
I have downloaded the librarys.
When I try to complie the test project I get the following error

Can’t include the file <avr/pgmspace.h>

Any ideas


Justin Dameron


Can you tell us what operating system you are using, what version of the AVR C compiler you installed, and how you tried to compile the test program? This problem could be caused by trying to use the wrong compiler.


I am using Code vision V 2.04.1 with windows xp home edition

OrangutanLCD.h - Library for using the LCD on the Orangutan LV-168
Originally written by Tom Benedict as part of Orangutan-Lib.
Modified by Ben Schmidel, May 14, 2008.
#ifndef OrangutanLCD_h
#define OrangutanLCD_h

#include <avr/pgmspace.h> The Compiler says it cant open this file
#define LCD_LEFT 0
#define LCD_RIGHT 1
#define CURSOR_SOLID 0

void lcd_init_printf();
void clear();
void print(const char *str);
void print_from_program_space(const char *str);
void print_character(char c);
void print_long(long value);
void print_unsigned_long(long value);
void print_binary(unsigned char value);
void print_hex(unsigned int value);
void print_hex_byte(unsigned char value);
void lcd_goto_xy(int col, int row);
void lcd_show_cursor(unsigned char cursorType);
void lcd_hide_cursor();
void lcd_move_cursor(unsigned char direction, unsigned char num);
void lcd_scroll(unsigned char direction, unsigned char num,
unsigned int delay_time);
void lcd_load_custom_character(const PROGMEM char *picture, unsigned char number);


Okay, so you are trying to get Orangutan-Lib to work on your 3pi. Is there a reason that you are not using the Pololu AVR Library?

I’m not familiar with Code Vision, but it sounds like you have not correctly set up the project file, or else Code Vision is not properly installed on your computer. Have you used it to compile other AVR programs?


Regardless of which library of Orangutan code you intend to use, the particular file that you are unsuccessfully trying to include is part of the WinAVR package. You will have to install WinAVR in order to have access to such files. WinAVR, especially in combination with AVR Studio 4, is a complete development system and there is no need for CodeVision.

There are guaranteed to be incompatibilities between programs written for WinAVR and those for CodeVision.

Ahh, I had not realized that Code Vision used a totally different C Compiler from WinAVR/GCC - I thought it was just another IDE for some reason.

Anyway, Justin, I definitely recommend going with WinAVR unless you are ready to do a lot of work on your own to make our files compatible with Code Vision. If you really like Code Vision, you could also write new code from scratch, using our files only as examples.


I changed to using AVR studio 4. This seem to be the software the examples on the website are using. I opened and complied the demo program. I download it and it worked. I then tried loading the line following example.
I got the following error when I compiled it.

make: *** No rule to make target ../../../../Documents', needed bytest.o’. Stop.

What should I be looking for for this type of error?


First of all, you need to be more clear about what you installed. Did you get AVR Studio and WinAVR? Which demo program did you compile? Which line following example did you try to load? (Was it from Orangutan-Lib or somewhere else?)