Pages: [1]   Go Down
Author Topic: 1284P Bobuino conflicting declaration 'digital_pin_to_timer_PGM'  (Read 1125 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
...\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
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18819
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
/*
 * 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"
Logged


Global Moderator
Milano, Italy
Offline Offline
Edison Member
*****
Karma: 19
Posts: 1176
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi tack,

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

Code:
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

... //your pins configuration code

#endif
Logged

F

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

https://github.com/maniacbug/mighty-1284p/issues/5
Logged

Pages: [1]   Go Up
Jump to: