pololu / libpololu-avr Goto Github PK
View Code? Open in Web Editor NEWThe Pololu AVR C/C++ Library makes it easier to get started programming your Orangutan Robot Controller or 3pi Robot.
Home Page: http://www.pololu.com/docs/0J20
License: Other
The Pololu AVR C/C++ Library makes it easier to get started programming your Orangutan Robot Controller or 3pi Robot.
Home Page: http://www.pololu.com/docs/0J20
License: Other
I'm trying to build libpololu-avr for Ubuntu 16.04 x86_64. While I can successfully compile it on 14.04, on 16.04 I'm getting the compilation errors below.
Prerequisites / Reproduce the issue:
After compiling a few files, I get:
avr-g++ -g -Wall -mcall-prologues -mmcu=atmega324p -DLIB_POLOLU -ffunction-sections -Os -I../../src/include -I../../ ../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp -c -o OrangutanSPIMaster.o
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp: In static member function ‘static void OrangutanSPIMaster::init(unsigned char, unsigned char)’:
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:154:2: error: ‘SPCR’ was not declared in this scope
SPCR = (1<<SPE) | (1<<MSTR) | (options & ~3) | (speed_divider & 3);
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:154:13: error: ‘SPE’ was not declared in this scope
SPCR = (1<<SPE) | (1<<MSTR) | (options & ~3) | (speed_divider & 3);
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:154:24: error: ‘MSTR’ was not declared in this scope
SPCR = (1<<SPE) | (1<<MSTR) | (options & ~3) | (speed_divider & 3);
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:155:2: error: ‘SPSR’ was not declared in this scope
SPSR = (speed_divider & 4) ? 1 : 0;
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp: In static member function ‘static unsigned char OrangutanSPIMaster::transmitAndDelay(unsigned char, unsigned char)’:
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:192:9: error: ‘SPCR’ was not declared in this scope
if ( !(SPCR & (1<<SPE)) )
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:192:20: error: ‘SPE’ was not declared in this scope
if ( !(SPCR & (1<<SPE)) )
^
In file included from ../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:33:0:
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.h:29:31: error: ‘CPHA’ was not declared in this scope
#define SPI_EDGE_TRAILING (1<<CPHA)
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:49:35: note: in expansion of macro ‘SPI_EDGE_TRAILING’
#define SPI_DEFAULT_OPTIONS SPI_EDGE_TRAILING
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:194:35: note: in expansion of macro ‘SPI_DEFAULT_OPTIONS’
init(SPI_DEFAULT_SPEED_DIVIDER, SPI_DEFAULT_OPTIONS);
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:197:8: error: ‘SPCR’ was not declared in this scope
if (!(SPCR&(1<<MSTR)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:197:17: error: ‘MSTR’ was not declared in this scope
if (!(SPCR&(1<<MSTR)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:208:2: error: ‘SPDR’ was not declared in this scope
SPDR = data;
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:211:10: error: ‘SPSR’ was not declared in this scope
while(!(SPSR & (1<<SPIF)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:211:21: error: ‘SPIF’ was not declared in this scope
while(!(SPSR & (1<<SPIF)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:213:9: error: ‘SPCR’ was not declared in this scope
if (!(SPCR & (1<<MSTR)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:213:20: error: ‘MSTR’ was not declared in this scope
if (!(SPCR & (1<<MSTR)))
^
../../src/OrangutanSPIMaster/../../src/OrangutanSPIMaster/OrangutanSPIMaster.cpp:231:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
../template.mk:35: recipe for target 'OrangutanSPIMaster.o' failed
make[1]: *** [OrangutanSPIMaster.o] Error 1
make[1]: Leaving directory '/home/chris/software-builds/libpololu-avr/devices/atmega324p'
Makefile:39: recipe for target 'library_files' failed
make: *** [library_files] Error 2
I noticed that there is a difference in packages for Ubuntu 16.04 from 14.04; the dpkg listing is below:
Ubuntu 14.04: (dpkg --list | grep avr)
ii avr-libc 1:1.8.0-4.1 all Standard C library for Atmel AVR development
ii avrdude 6.0.1-1 amd64 software for programming Atmel AVR microcontrollers
ii binutils-avr 2.23.1-2.1 amd64 Binary utilities supporting Atmel's AVR targets
ii gcc-avr 1:4.8-2.1 amd64 The GNU C compiler (cross compiler for avr)
Ubuntu 16.04: (dpkg --list | grep avr)
ii avr-libc 1:1.8.0+Atmel3.5.0-1 all Standard C library for Atmel AVR development
ii avrdude 6.2-5 amd64 software for programming Atmel AVR microcontrollers
ii binutils-avr 2.25+Atmel3.5.0-2 amd64 Binary utilities supporting Atmel's AVR targets
ii gcc-avr 1:4.9.2+Atmel3.5.0-1 amd64 GNU C compiler (cross compiler for avr)
Any help would be appreciated.
PololuWheelEncoders does not work properly, causing it to miss half of all the encoder counts, as reported here:
http://forum.pololu.com/viewtopic.php?p=43553#p43553
The problem was introduced in commit 70f85f0.
We should be able to fix it by adding ? 1 : 0
after any call to isInputHigh. Also, it might be good to use "bool" for all variables that are supposed to represent booleans.
calling: "sudo make install"
causes: "make: *** No rule to make target 'libpololu_atmega48.a', needed by 'install'. Stop."
I have run the same command using the latest .zip file from the webiste "libpololu-avr-151002.zip"
and this problem isn't present in that release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.