0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« on: February 02, 2012, 09:10:24 pm » |
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/ArduinoISP2) 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.
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 97
Posts: 6376
|
 |
« Reply #1 on: February 02, 2012, 09:29:02 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #2 on: February 02, 2012, 10:03:17 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #3 on: February 03, 2012, 12:44:56 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #4 on: February 03, 2012, 02:52:52 am » |
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 ).
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
God Member
Karma: 19
Posts: 683
|
 |
« Reply #5 on: February 03, 2012, 06:06:18 am » |
Obviously you are missing the file pins_arduino.h, it should be in hardware\arduino\cores\arduino
|
|
|
|
|
Logged
|
|
|
|
|
Tokyo, Japan
Offline
Newbie
Karma: 0
Posts: 18
|
 |
« Reply #6 on: February 03, 2012, 06:43:48 am » |
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
|
|
|
|
« Last Edit: February 03, 2012, 06:45:59 am by karl_b »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #7 on: February 03, 2012, 09:21:18 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 13
Arduino rocks
|
 |
« Reply #8 on: February 03, 2012, 09:56:40 pm » |
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. ##############################################################
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
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 27
Arduino rocks
|
 |
« Reply #9 on: March 01, 2012, 01:29:13 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #10 on: April 21, 2013, 08:21:11 am » |
It seems that "boards.txt loading from sketchbook/hardware folder is" STILL broken as of 1.0.4
Where do we report issues?
|
|
|
|
|
Logged
|
|
|
|
|
texas
Offline
God Member
Karma: 26
Posts: 841
old, but not dead
|
 |
« Reply #11 on: April 21, 2013, 09:50:26 am » |
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: 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
|
|
|
|
« Last Edit: April 21, 2013, 09:56:00 am by afremont »
|
Logged
|
Experience, it's what you get when you were expecting something else.
|
|
|
|
Anaheim CA.
Offline
Edison Member
Karma: 31
Posts: 2311
Experienced old Whitebeard with a Full head of Hair...
|
 |
« Reply #12 on: April 21, 2013, 10:01:35 pm » |
Did you get the millis / micros() issue fixed? and is it possible that you'd be willing to make the boot code available?
Doc
|
|
|
|
|
Logged
|
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
|
|
|
|
texas
Offline
God Member
Karma: 26
Posts: 841
old, but not dead
|
 |
« Reply #13 on: April 22, 2013, 07:23:01 pm » |
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.
|
|
|
|
|
Logged
|
Experience, it's what you get when you were expecting something else.
|
|
|
|
Anaheim CA.
Offline
Edison Member
Karma: 31
Posts: 2311
Experienced old Whitebeard with a Full head of Hair...
|
 |
« Reply #14 on: April 22, 2013, 07:31:53 pm » |
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
|
|
|
|
|
Logged
|
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
|
|
|
|
|