Go Down

Topic: Arduino as ISP, Mininial Circuit Error- pins_arduino.h No such file.. (Read 5799 times) previous topic - next topic

kermit

Hi
I'm wanting to program an atmega 328 using ArduinoISP and the minimal circuit setup.
this is what I have done
1) uploaded the arduinoISP to my Duemilanove board, I'm working in arduino 1.0 IDE. followed instructions http://arduino.cc/en/Tutorial/ArduinoISP
2) Setup that i have used see http://arduino.cc/en/Tutorial/ArduinoToBreadboard, refer bottom of the page for miminal setup


also tried a 120ohm resistor between reset and 5V.

The error that I get in both cases is:
"C:\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory"

looks like I have missed something. Can anyone point me in the right direction.

johnwasser

That looks like a compiler error.  Were you trying to verify or upload a sketch?  My first guess wold be that your Arduino installation is not complete.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

kermit

I was trying to upload a sketch to a blank atmega328. I'll reinstall and have another go. I have been able to upload other sketches but just not via arduino as ISP. I was thinking it was something, maybe to do with the "atmega on breadboard (8Mhx internal clock)" board file that was installed i.e. the breadboard.zip. When I looked at it I didn't see anything that referenced arduinoISP, this is what it is:
##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)

atmega328bb.upload.protocol=stk500
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino

should be be "atmega328bb.upload.protocol=stk500"?
anyway I will reinstall and see if that makes a difference.

kermit

Hi John
thanks for your last comment. Still learning this environment and now see what you mean. I've reinstalled everything and makes not different but it is a verify/compile issue not upload.

This time tried with blink example code (no changes and just used everything as described). Here is the error
C:\Arduino\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=100 -IC:\Arduino\arduino-1.0\hardware\arduino\cores\arduino C:\DOCUME~1\User\LOCALS~1\Temp\build3115065296870135004.tmp\Blink.cpp -oC:\DOCUME~1\User\LOCALS~1\Temp\build3115065296870135004.tmp\Blink.cpp.o
In file included from Blink.cpp:8:
C:\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory


can anyone point me in the right direction to fix this issue?


kermit

OK take another go at this and it definitely the board selection. choosing the uno instead of the Atmega328 on breadboard verifies/compiles so there is something happening with the setting of this board (Atmega328 on breadboard ).


Erni


Obviously you are missing the file pins_arduino.h, it should be in
hardware\arduino\cores\arduino



New in Arduino 1.0 is the hardware/arduino/variants, you need to add a variant to your boards.txt like this:

atmega328bb.build.variant=standard
http://www.akafugu.jp/blog/

kermit

Hi Erni
looks like the pins_arduino.h files are there but not in the location you are talking about. In ...arduino-1.0\hardware\arduino\variants there are several folders (eightanaloginputs, leonardo, mega, micro and standard) each of these has a pins_arduino.h
This looks right to me, but I am not expert.

kermit

Hi Karl_b
thanks for that, tried what you said and added that line to boards but made not difference :(
Deleted the boards from from my sketchbook location and appended the boards information to the boards.txt file in ...arduino-1.0\hardware\arduino (not sure that its good practice but ...)
This compiled :) so that was good news. But still was not uploading properly. So I compared the information with Attiny code that uses the arduino as ISP and noticed that "Atmega328 on breadboard" that this line "atmega328bb.upload.protocol=stk500" seemed strange to me so I replaced it with "atmega328bb.upload.using=arduino:arduinoisp", which is what we are doing.
This worked :) so I'm very happy with. So here is my boards information for AtMega328 on breadboard(8Mhz internal clock), thanks for you help Karl_b great to get jigwas together.
If anyone can see any problems with this let me know.
Quote

##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)

atmega328bb.upload.using=arduino:arduinoisp
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=standard


osbock

hah! I just posted about the same problem. Apparently the boards.txt loading from sketchbook/hardware folder is broken. Works fine in 022, broken in 1.0

techplex

It seems that "boards.txt loading from sketchbook/hardware folder is" STILL broken as of 1.0.4

Where do we report issues?

afremont

#11
Apr 21, 2013, 04:50 pm Last Edit: Apr 21, 2013, 04:56 pm by afremont Reason: 1
Sounds like you created a new folder under the hardware folder to contain your new boards.txt file.  In order for the compiler to find the right arduino_pins.h header is for the build.variant line to look like this:

atmega328bb.build.variant=arduino:standard

By the way, that baud rate has to match the baud used by the ArduinoISP sketch (mine came set to 19200).  Trying high baud rates created new problems with data overruns.  You might also want to find your programmers.txt file and set the baud for ArduinoISP there too.

Here is the whole board description for my mega328p running at 20MHz on a breadboard:
Code: [Select]

MWB20MHz.name=ATmega328 on a breadboard (20 MHz external clock)

### MWB20MHz.upload.protocol=stk500v1     # commented to allow the upload.using line to work right
MWB20MHz.upload.maximum_size=32256
MWB20MHz.upload.speed=19200
MWB20MHz.upload.using=arduino:arduinoisp

MWB20MHz.bootloader.low_fuses=0xF7
MWB20MHz.bootloader.high_fuses=0xDE
MWB20MHz.bootloader.extended_fuses=0x05
MWB20MHz.bootloader.path=arduino:optiboot
MWB20MHz.bootloader.file=optiboot_atmega328__20MHz.hex
MWB20MHz.bootloader.unlock_bits=0x3F
MWB20MHz.bootloader.lock_bits=0x0F

MWB20MHz.build.mcu=atmega328p
MWB20MHz.build.f_cpu=20000000L
MWB20MHz.build.core=arduino:arduino
MWB20MHz.build.variant=arduino:standard
Experience, it's what you get when you were expecting something else.

Docedison

Did you get the millis / micros() issue fixed? and is it possible that you'd be willing to make the boot code available?

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

afremont


Did you get the millis / micros() issue fixed? and is it possible that you'd be willing to make the boot code available?

Doc


I think you are asking me, forgive me if I'm mistaken.  This isn't my thread and I don't want to hijack it.  I'll tail onto the thread I started with details on where I'm at with this.  It's the "pages aren't erased" thread.
Experience, it's what you get when you were expecting something else.

Docedison

No it was the 20 MHz bootloader I was interested in, You sharing your work... But I'll not hijack it or the thread I can wait until it comes by again..

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up