Go Down

Topic: 1284P Bobuino conflicting declaration 'digital_pin_to_timer_PGM' (Read 1 time) previous topic - next topic


I've spent the last 45 minutes hunting the forum and Google on this one. I can find some references to it but nothing clearly saying how to fix it.

I'm using IDE1.01 with the 1284P, optiboot 4.5 bootloader, and maniacbuig cores. I have some 1.0.1 core files for Arduino.h, wiring_analog.h and wiring_private.h, which was suggested as fixing this.

The error I am getting is this:

Code: [Select]
...\ATMega1284\variants\bobuino/pins_arduino.h:38: error: previous declaration of 'const uint8_t digital_pin_to_timer_PGM [32]' with 'C++' linkage
...\ATMega1284\cores\standard/Arduino.h:134: error: conflicts with new declaration with 'C' linkage

As a result of including SPI.h

Anyone got any ideas?

Many thanks

Nick Gammon

Locate SPI.cpp in your distribution. Comment out or remove the line "#include "pins_arduino.h" as below. Then it compiled for me.

Code: [Select]

* Copyright (c) 2010 by Cristian Maglie <c.maglie@bug.st>
* SPI Master library for arduino.
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation.

//#include "pins_arduino.h"   <--- get rid of this
#include "SPI.h"
Please post technical questions on the forum, not by personal message. Thanks!

More info:

Federico Vanzati

Hi tack,

Are you using include guards inside your pins_arduino.h file?

Code: [Select]

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

... //your pins configuration code



This was discussed in one of those humungously long threads about 1284 chips a couple of
months ago, but is probably just about impossible to track down. And 2 months ago, I posted
a comment to maniacbug's github page in regards fixing it, as well as other problems [see
especially the ADC callout error]. I also sent him emails, but he's unresponsive. You're on your
own when using that library.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131