alzabo
March 29, 2012, 12:07pm
1
I am unable to get the 3pi-demo-program to compile. I think it may have something to do with the avr/pgmspace.h library.
When I try to compile I get the error below. It looks like the prog_char type is not being recognized correctly. Any ideas on how to fix this?
alzabo
March 29, 2012, 1:53pm
2
Here is the code for reference.
test.c (13.4 KB)
Hello, alzabo.
Thank you for letting us know about this problem. In recent versions of avr-libc, prog_char and similar typedefs have been deprecated. The relevant documentation is here:
nongnu.org/avr-libc/user-man … space.html
I think you might be able to fix the problem by writing the following line at the very top of the program:
#define __PROG_TYPES_COMPAT__
Let me know if that works. I think it will not work for the latest version of avr-gcc, but it might work for you.
The next release of the Pololu AVR C/C++ Library should be fixed to not use those types.
–David
alzabo
March 29, 2012, 5:57pm
4
The compiler gives warnings for use of deprecated typedef; however, the code compiles and everything appears to function normally. Thanks!