Error When Using Intel Galileo as an ISP

Hello everyone. I must admit this is my first post and I hope that I am placing it in the correct forum. I'm not a complete noob when it comes to programming as I've done it for sometimes in C# and Python but I keep running into issues that I can't figure out. So I am turning to the geniuses here as I have read the forms in the past and did not even need to ask a question because it had already been answered. :)

I just recently started using the Arduino IDE (Ver 1.6.0) along with the Intel Galileo Gen1. The firmware is 1.0.4. I have been able to program the blink sketch to the board with and without the SD card running the linux image. I have purchased a ATmega328P-PU IC Chip w/ Arduino UNO BOOTLOADER (ebay) on a breadboard. I have not verified that it has a bootloader as I do not know how to but was just going to flash it with a new one anyways using the galileo.

I am receiving the following error when I compel the ArduinoISP from the examples list.

Arduino: 1.6.0 (Windows 8), Board: "Intel® Galileo"



In file included from ArduinoISP.ino:46:0:

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:39:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:40:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:41:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:42:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:44:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:45:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:46:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:48:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:49:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:50:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:51:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:52:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:53:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:54:14: error: 'uint8_t' does not name a type

C:\arduino-1.6.0+Intel\hardware\intel\i586-uclibc\variants\galileo_fab_d/pins_arduino.h:55:14: error: 'uint8_t' does not name a type

ArduinoISP.ino: In function 'void spi_init()':

ArduinoISP.ino:159:3: error: 'SPCR' was not declared in this scope

ArduinoISP.ino:160:7: error: 'SPSR' was not declared in this scope

ArduinoISP.ino:161:7: error: 'SPDR' was not declared in this scope

ArduinoISP.ino: In function 'void spi_wait()':

ArduinoISP.ino:167:12: error: 'SPSR' was not declared in this scope

ArduinoISP.ino:167:25: error: 'SPIF' was not declared in this scope

ArduinoISP.ino: In function 'uint8_t spi_send(uint8_t)':

ArduinoISP.ino:172:3: error: 'SPDR' was not declared in this scope

ArduinoISP.ino: In function 'void start_pmode()':

ArduinoISP.ino:257:11: error: 'SS' was not declared in this scope

ArduinoISP.ino:259:11: error: 'SCK' was not declared in this scope

ArduinoISP.ino:264:11: error: 'MISO' was not declared in this scope

ArduinoISP.ino:265:11: error: 'MOSI' was not declared in this scope

ArduinoISP.ino: In function 'void end_pmode()':

ArduinoISP.ino:271:11: error: 'MISO' was not declared in this scope

ArduinoISP.ino:272:11: error: 'MOSI' was not declared in this scope

ArduinoISP.ino:273:11: error: 'SCK' was not declared in this scope

ArduinoISP.ino:274:11: error: 'SS' was not declared in this scope

Error compiling.

If anyone has any suggestions on how to resolve this issue I would greatly appreciate the help. I'm sure this can be done I'm just missing something.

Are you able to compile / verify an empty sketch?

void setup( void ) { }
void loop( void ) { }

Yes, I have loaded the blink sketch and verified that the onboard LED tied to pin 13 blinks, then compelled a empty sketch and verified that the LED stopped blinking. No errors are given when doing this…
I get the above error when checking the code and when it’s uploaded.

Have you tried other versions of the ArduinoISP sketch such as this one... https://github.com/SeanXP/Intel-Galileo/blob/master/Arduino/ArduinoISP/ArduinoISP.ino

First I would like to say think you for replying. I just tried the sketch you suggested and receive the same error. I think used the same one the other day when trouble shooting but gave it a chance. At this rate Ill be bald by the end of the week, lol (^_^) I have looked at other people having a similar issues with other codes but no luck with it. I thinking the issue is with the code as the board is not having issues taking other librarys. I have moved to another computer with the same ver of the IDE and get the same error. so I used an older version 1.5.3 and no luck.

I have compel the ArduinoISP sketch without selecting the board in the tools menu. The code check has verified that there are no errors but after I select the board type and recheck the code the stated error appear. Is the Galileo even able to be used as an ISP?

Is the Galileo even able to be used as an ISP?

Oh yes. The protocol is actually very simple. Anything that can control three I/O pins can be used to program AVR processors.

There are two problems with the ArduinoISP sketch. The first is trivial to fix. Arduino.h needs to be included at the top…

...
// - More information at http://code.google.com/p/mega-isp

#include <Arduino.h>  // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#include <pins_arduino.h>

#define RESET     SS
...

The second problem is a little more intricate. The ArduinoISP sketch directly manipulates AVR registers. That is obviously not going to work with the Galileo. But the code of interest can be replaced by a “bit bang” version. I will try to get you something later today.

Please try this version. Please follow-up with the results.

ArduinoISP-Galileo.ino (13.6 KB)

You are the man, this seems to be working. There are a few issues after setting the galileo with the ISP programmer code given but I was able to resolve the issue with a uno. It did not like the chip selection on the IDE but nonetheless I have it working now. You rock. Sorry it was a long wait school and homework + a kid = No me time. lol (^_^)

Glad to know you have it working.

There are a few issues…

Did you modify the sketch?