Go Down

Topic: breadboard bootloader error in IDE 1.0.1 (Read 720 times) previous topic - next topic

fbriggs4

I am running the breadboard bootloader which can be found here http://arduino.cc/en/Tutorial/ArduinoToBreadboardon a stand alone 328P. This has worked very well for me using IDE 0023 but I am trying to use IDE 1.0.1 now and I am getting an error that I can not resolve. When I try to compile I get this error "sketch_jul23a.cpp:1:21: error: Arduino.h: No such file or directory". I know that IDE 0023 used wprogram.h and that IDE 1.0.1 uses Arduino.h so this seems to be the issue. However I do not know how or where to look to make the change. I did look in the boards.txt file but I do not understand it well enough to know what to change. Has anyone else run into this or have suggestions on where to look?

wanderson

There are a number of differences that need to be accounted for to get code to compile under 1.0.x, but at least this "Renamed WProgram.h to Arduino.h. "

I would suggest reviewing; http://arduino.cc/en/Reference/Changes
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

fbriggs4

wanderson, do you know where it is looking for arduino.h? I looked through the boards.txt file and can not find a reference to Wprogram.h so I am not sure where to make this change.

BlueJakester

You might check here. I believe the header location differences are talked about.

http://arduino.cc/forum/index.php/topic,97455.0.html

wanderson


wanderson, do you know where it is looking for arduino.h? I looked through the boards.txt file and can not find a reference to Wprogram.h so I am not sure where to make this change.


You shouldn't need to tell it where and make sure to capitalize it properly; Arduino.h nor arduino.h  C/C++ is case sensitive.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

fbriggs4

I had a look at that link but I am not using any libraries so I don't think that is my issue. Here is my sketch
Code: [Select]
void setup(){
  int test = 5;
}

void loop(){
}

My code does not do anything at all and it is just used to see if I can compile something with IDE 1.0.1. It keeps looking for Arduino.h and does not seem able to find it. As soon as I try to compile the sketch with another bootloader such as UNO it will compile with no issue. So the problem has to be with the breadboard bootloader. The only file I can find that is related to the bootloader is a boards.txt file. Here is the code I find in the boards.txt file
Code: [Select]

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

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

atmega328bb.upload.protocol=arduino.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:arduinoatmega328bb.build.variant=standard

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

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

atmega328bb.upload.protocol=arduino.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:arduinoatmega328bb.build.variant=standard

I looked through this and I do not see any reference to WProgram.h so I don't see what I can change to Arduino.h. When I try to compile do you know where it is going to look for the Arduino.h file? Should that reference be in the boards.txt file or am I barking up the wrong tree?


wanderson

The problem code is likely in arduino:arduinoatmega328bb.build.  Go to your hardware directory and look at the core code your using there. 

If you breadboarding a 168/328p you shouldn't need a separate core, try replacing the above with arduino:standard
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

fbriggs4

I changed the file name as suggested and that corrected the Arduino.h compile error. However, it started to give me an error that it could not find pins_arduino.h. The solution was to add
Code: [Select]
atmega328bb.build.variant=arduino:standard
. I am now able to compile with no errors using the breadboard boot loader. Here is the full code for the boards.txt file in case it might help someone else.

Code: [Select]
##############################################################

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
atmega328bb.build.variant=arduino:standard


Thanks everyone for all the help, I really appreciate it!

Go Up