I seem to have found another problem with the Bobuino variant pins_arduino.h
file created by maniacbug. I tried to use the Bobuino board selection as an
ArduinoISP, but got the following compile-time errors:
In file included from ArduinoISP.ino:66:
C:...\Arduino\hardware\mighty-1284p-master\variants\bobuino/pins_arduino.h:38:
error: previous declaration of 'const uint8_t digital_pin_to_timer_PGM [32]' with
'C++' linkage
C:...\Arduino\hardware\mighty-1284p-master\cores\standard/Arduino.h:133:
error: conflicts with new declaration with 'C' linkage ArduinoISP.ino:
In function 'void universal()':
ArduinoISP.ino:279: warning: unused variable 'w' ArduinoISP.ino:
In function 'int avrisp()':
ArduinoISP.ino:551: warning: no return statement in function returning non-void
I traced the first error to the following lines that were added to the
Bobuino\pins_arduino.h file, but which do "not" exist in the original maniacbug
standard\pins_arduino.h file. I don't know how to fix this myself, without possibly
mucking up something else.
Note that, since the same 1284P optibootloader is burned into both standard and
Bobuino version chips, I can compile the ArduinoISP sketch without errors when
using the "Mighty 1284P 16Mhz using Optiboot" board selection, and then I can
successfully use the 1284P to burn the bootloader into another chip [eg, UNO],
since the SPI port is on fixed pins.
So, the problem seems to be only in the Bobuino\pins_arduino.h file [I think].
I can verify the same error if trying to compile (verify only) arduinoISP sketch while Bobuino board selected but no error if mighty 1284P selected. I'll keep an eye out for comments on your findings.
Note: If I comment out those three lines in Bobuino variant pins_arduino.h you called out then there is no error and verify completes. Maybe just a case of being double declared?
Note: If I comment out those three lines in Bobuino variant pins_arduino.h you called out then there is no error and verify completes. Maybe just a case of being double declared?
Yeah, but I don't know why the lines are in there, and what effect removing them
will have. Only maniacbug knows for sure why he included them, I imagine.
The other thing I noticed is, the following line near the end of Bobuino/pins_arduino.h
has PROGMEM in it, but the extern callout earlier in the file does not, but
I don't know enough about all this to be sure of fixing anything myself.
Note: If I comment out those three lines in Bobuino variant pins_arduino.h you called out then there is no error and verify completes. Maybe just a case of being double declared?
Yeah, but I don't know why the lines are in there, and what effect removing them
will have. Only maniacbug knows for sure why he included them, I imagine.
The other thing I noticed is, the following line near the end of Bobuino/pins_arduino.h
has PROGMEM in it, but the extern callout earlier in the file does not, but
I don't know enough about all this to be sure of fixing anything myself.
Can't comment on those questions, they are just beyond my software pay grade.
However just for grins I commented out those three lines, uploaded arduinoISP to my bobuino board and then used the board to burn a bootloader onto a 328p board, all worked fine.
Again that's beyond my software pay grade. I'll just read along if anyone else has any further input on the topic. I just want the 1284P to be a viable board choice for people that want to continue to utilize DIP packaged chips and through hole components in their projects.
I still find this whole thing bizarre. I got to wondering why the ArduinoISP sketch
would not compile using the Bobuino variant, while other sketches would. On
looking at the ArduinoISP sketch source code, the only statement that seemed
to explain anything was
#include "pins_arduino.h"
and I've never ever seen that used in another sketch, and assumed it was accessed
automatically [why the heck is it even in here?]. On commenting it out, the sketch
compiles with no problems.
So, that leaves 5 bizarrities.
why is the following statement even in the Bobuino variant pins_arduino.h file?
I tried this simple sketch using consecutive pairs of pins all around the board with attached Bobuino pins_arduino.h & IDE 1.0.3
I didn't get any compile errors, and the LED blinks away.
I need to put some leads on a pot so I can check out the analog pin ID thing that was previously discussed.
I don't know what's going on with the PROGMEM stuff.
The standard pins_arduino.h also uses similar statements.
I found it compiled ok with all sketches except for the ArduinoISP sketch, and then
that would compile ok if I commented out the line that says #include "pins_arduino.h",
which seems to be completely superfluous, from what I can tell. IE, you never
need to include that line in any regular sketches.
Other than that, I didn't understand all the inconsistencies with PROGMEM, so ????
Also, I did leave a note in github summarizing all the errors so far,