Updating the mighty-1284p core

scargill:
Can anyone help. I've been using Manicbug's 1284p Optiboot code on 1.05 and I've now tried twice to get it to work with 1.52 and now 1.57 - I've moved the core files from my sketches hardware folder - and updated the boards.txt file --- and.... Although I can select the 1284p - I get this error even on an empty sketch.

sketch_jul07a.ino:1:21: fatal error: Arduino.h: No such file or directory
compilation terminated.

I'm not sure what all you have done,
but it isn't as simple as just moving around a few core files and updating a boards.txt file.
You have to create a separate 1.5x compatible 3rd party h/w core directory tree for the
1284 core files under the users sketchbook/hardware directory as 1.5x 3rd party cores work differently.

You will also have to create a platform.txt with all the compile/link rules for the builds
and then you have to copy some libraries (Wire, SPI, EEPROM, & SoftSerial) that used to be in main libraries area that are now
down under each core.
You will also have to copy over any of the patched libaries into the proper location in the new 1.5x h/w core tree.

And then...... after all that.......
I just found out it what I had working on 1.5.6-r2 no longer works under 1.5.7
They changed where avrdude lives in the directory tree which affects how it is used by boards.txt
avrdude has been moved from {installdir}/hardware/tools/
to {installdir}/hardware/tools/avr/bin

The net result is that avrdude will not be found with the existing 1284 boards.txt entries.
With the existing entries, the IDE ends up only looking in {installdir}/hardware/tools
and bombs out because it can't find an avrdude executable there.

To me this new location and execution method has some issues as it doesn't fall back to an avrdude on the users path
(which it will be for linux users that have avr tools installed separately from the Arduino tools)

Second, while moving the avrdude executable down into a core related directory is a good thing,
I don't think it shouldn't be placed down with the gcc tools. It should be somewhere else.
Moving it down with the gcc tools makes it much harder to swap out gcc tools supplied
with the IDE for a different locally installed versions since you can no longer just move/rename
the IDE's gcc tool directory since it now contains avrdude.
The gcc tools and avrdude are now somewhat bound together.

There is a work around for this in boards.txt
If you prefix the upload.tool with the name of the core then it will find it.
so in a 1.5x boards.txt file you must change this:

mighty_sleepingbeauty.upload.tool=avrdude

to this

mighty_sleepingbeauty.upload.tool=arduino:avrdude

And then it will work on both 1.5.7 and pre 1.5.7

Guys, this is the kind of stuff that I believe shows why this core should be rapidly moved to 1.5x
as 1.5x is still having all kinds of changes and updates and you have to keep your eye on it
to make sure that things are working and that the Arduino teams doesn't accidentally
break the 3rd party libraries/cores.

1.5x IDE also has some nice features that are not in 1.x
The biggest being that dropdown are now scrollable.
This is critical if you have lots of boards or libraries installed.
Without this capability you may not be able to select the desired board or be able
to pick an example sketch because the entry is below what is on the screen and there
is no way to scroll down to it.
Having this scrolling capability is a MUST HAVE for me as I have close to 100 libraries
and nearly the same number of board selections.
There is a work around in 1.x that I'm using for that, and that is if you install Pauls
teensyduino he modifies the IDE to add in the scrolling menus.
So you can get the scrolling menus on 1.x by simply installing Pauls Teensyduino add on.

Another thing that is better with 1.5x is that all the patched libraries could be put into place in
the core directory structure so that once the user installs the core all the patched libraries are there
and ready to go with nothing else to do.

--- bill