After reading quite a few posts I managed to compile my code for a atmega1284 (the non pico-power version) in the new version of the IDE 1.6.1 based on the following:
I loaded the Mighty-1284P core definition by Jack Christensen (many thanks for making this available on GitHub) in the 'hardware' subdirectory of my sketches directory.
In IDE 1.6.1 you no longer need the "core" subdirectory because the atmega1284 (and atmega1284P) is now known in the defaults Arduino cores.
But I did need to adapt the "boards.txt" file to get the compilations error free. I'm also using the "standard" pinout definitions in the Mighty-1284P files (standard under variants).
Since I loaded my atmega1284 with the Optiboot bootloader using the sketches by Nick Gamon (another great thanks to him !!!), I needed to change the signature for my chip version.
Also the self detect sketch needs to be updated with the signature of the atmega1284, since it only contains the signature of the atmega1284p.
I temporarily changed the signature of the atmega1284p in his boot loader sketch to match the signature of the atmega1284 (last byte is 06 instead of 05) and then programmed the atmega1284p version of optiboot into the atmega1284. Doing this allows me to use both types when programming sketches via the FTDI cable.
So first the changes in the boards.txt file. To keep from mixing with the existing files I made my own boards.txt file with the content below. This can also be changed in the original boards.txt file. The prefix "gsan_opt_" is not relevant.
##############################################################
gsan_opt.name=atmega1284 16MHz using Optiboot
gsan_opt.upload.tool=arduino:avrdude
gsan_opt.upload.protocol=arduino
gsan_opt.upload.maximum_size=130048
gsan_opt.upload.maximum_data_size=16384
gsan_opt.upload.speed=115200
gsan_opt.bootloader.tool=arduino:avrdude
gsan_opt.bootloader.low_fuses=0xf7
gsan_opt.bootloader.high_fuses=0xde
gsan_opt.bootloader.extended_fuses=0xfd
gsan_opt.bootloader.file=optiboot/optiboot_atmega1284p.hex
gsan_opt.bootloader.unlock_bits=0x3F
gsan_opt.bootloader.lock_bits=0x0F
gsan_opt.build.mcu=atmega1284
gsan_opt.build.f_cpu=16000000L
gsan_opt.build.board=AVR_ATMEGA1284
gsan_opt.build.core=arduino:arduino
gsan_opt.build.variant=standard
The change in Nick Gamon's sketch to load Optiboot was as follows:
In Atmega_Board_Programmer (v1.31):
around line 322:
// ATmega1284P family
{ { 0x1E, 0x97, 0x05 }, "ATmega1284P", 128 * kb, 1 * kb,
#if USE_ATMEGA1284
optiboot_atmega1284p_hex,
Needs to be changed into
// ATmega1284P family
{ { 0x1E, 0x97, 0x06 }, "ATmega1284P", 128 * kb, 1 * kb,
#if USE_ATMEGA1284
optiboot_atmega1284p_hex,
I would prefer if the sketch incorporated a second signature for the non-pico power version, the Optiboot version can be the same in both cases.
Another sketch where the signature would need to be added is the one where another Arduino is used as ISP for the target atmega1284. Since I use an FTDI cable directly to my breadboarded atmega1284, I did not change this. This is future work.
But with the above changes I was able to compile my sketch under IDE 1.6.1
Uploading with an FTDI friend from Adafruit worked without a problem, under the condition that I changed the crystal oscillator setting to full swing.
I use my atmega1284 in a minimal breadboard setup.
For those with problems loading large sketches on the atmega1284: make sure you fuses are set for Full Swing oscilation (f7 instead of ff on the low fuses setting of the boot loader).
I tested loading several sketches up to 130029 bytes in length and it works consistently. They also run until the end as expected.
Knowing that Optiboot does not use the full 1024 bytes now reserved for the boot section, one could imagine making another 512 byte available for programs, but I'm not greedy at the moment. 130048 bytes is plenty for what I need now. Me izz happy bunny