This post is solved. The idea was to make a core that supported all major DIP-40s.
I was able to make ATmega8535, ATmega16, ATmega32, ATmega164, ATmega324, ATmega644 and ATmega1284 work under the same core. If you're interested, please download the latest version from my Github repository: GitHub - MCUdude/MightyCore: Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535
Hi! A few months ago I designed an DIP-40 Arduino compatible board. This boards currently supports Atmega16, Atmega32, Atmega644p and Atmega1284p through Arduino 1.0.6. I'm using the Arduino software on a mac, and I have the newest version of Java installed.
I downloaded the newest version, Arduino 1.6.4 a few days ago, but have struggled a lot trying to make it work. I found a guide that explains how to migrate custom boards to Arduino 1.6, but I still get upload errors. Here are my boards.txt file:
##############################################################
atmega1284o.name=ATmega1284p [Optiboot]
atmega1284o.upload.protocol=arduino
atmega1284o.upload.tool=arduino:avrdude
atmega1284o.upload.maximum_size=130048
atmega1284o.upload.speed=115200
atmega1284o.bootloader.tool=arduino:avrdude
atmega1284o.bootloader.low_fuses=0xf7
atmega1284o.bootloader.high_fuses=0xde
atmega1284o.bootloader.extended_fuses=0xfd #0x05
atmega1284o.bootloader.file=optiboot/optiboot_atmega1284p.hex
atmega1284o.bootloader.unlock_bits=0x3F
atmega1284o.bootloader.lock_bits=0x0F
atmega1284o.build.mcu=atmega1284p
atmega1284o.build.f_cpu=16000000L
atmega1284o.build.core=standard
atmega1284o.build.variant=standard1284
##############################################################
atmega644o.name=ATmega644p [Optiboot]
atmega644o.upload.protocol=arduino
atmega644o.upload.tool=arduino:avrdude
atmega644o.upload.maximum_size= 63488
atmega644o.upload.speed=115200
atmega644o.bootloader.low_fuses=0xff
atmega644o.bootloader.high_fuses=0xdc
atmega644o.bootloader.extended_fuses=0xfd
atmega644o.bootloader.file=optiboot/optiboot_atmega644p.hex
atmega644o.bootloader.unlock_bits=0x3F
atmega644o.bootloader.lock_bits=0x0F
atmega644o.build.mcu=atmega644p
atmega644o.build.f_cpu=16000000L
atmega644o.build.core=standard
atmega644o.build.variant=standard644
##############################################################
atmega32o.name=ATmega32 [Optiboot]
atmega32o.upload.protocol=arduino
atmega32o.upload.tool=arduino:avrdude
atmega32o.upload.maximum_size=32256
atmega32o.upload.speed=115200
atmega32o.bootloader.low_fuses=0xff
atmega32o.bootloader.high_fuses=0xde
atmega32o.bootloader.file=optiboot/optiboot_atmega32.hex
atmega32o.bootloader.unlock_bits=0x3F
atmega32o.bootloader.lock_bits=0x0F
atmega32o.build.mcu=atmega32
atmega32o.build.f_cpu=16000000L
atmega32o.build.core=standard
atmega32o.build.variant=mega32
##############################################################
mighty16h.name=ATmega16 [Optiboot]
mighty16h.upload.protocol=arduino
mighty16h.upload.tool=arduino:avrdude
mighty16h.upload.maximum_size=15360
mighty16h.upload.speed=115200
mighty16h.bootloader.low_fuses=0xFF
mighty16h.bootloader.high_fuses=0xda
mighty16h.bootloader.file=optiboot/optiboot_atmega16.hex
mighty16h.bootloader.unlock_bits=0x3F
mighty16h.bootloader.lock_bits=0x0F
mighty16h.build.mcu=atmega16
mighty16h.build.f_cpu=16000000L
mighty16h.build.core=standard
mighty16h.build.variant=Mega16
##############################################################
When I choose the Atmega1284p from the boards menu, and tries to upload a simple sketch, I get this error:
Sketch uses 506 bytes (0%) of program storage space. Maximum is 130,048 bytes.
Global variables use 9 bytes of dynamic memory.
java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:73)
at processing.app.debug.Compiler.upload(Compiler.java:163)
at processing.app.Sketch.upload(Sketch.java:1220)
at processing.app.Sketch.exportApplet(Sketch.java:1194)
at processing.app.Sketch.exportApplet(Sketch.java:1166)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2487)
at java.lang.Thread.run(Thread.java:745)
When I choose the Atmega644 from the boards menu, and tries to upload a simple sketch, I get this error:
/Users/hansi/Documents/Arduino/hardware/AVR/DIP-40/cores/standard/HardwareSerial.cpp:132:15: error: attempt to use poisoned "SIG_USART1_RECV"
#elif defined(SIG_USART1_RECV)
^
Error compiling.
When I choose the Atmega32 from the boards menu, and tries to upload a simple sketch, I get this error:
/Users/hansi/Documents/Arduino/hardware/AVR/DIP-40/cores/standard/HardwareSerial.cpp:93:11: error: attempt to use poisoned "SIG_UART_RECV"
!defined(SIG_UART_RECV)
^
/Users/hansi/Documents/Arduino/hardware/AVR/DIP-40/cores/standard/HardwareSerial.cpp:94:4: error: #error "Don't know what the Data Received vector is called for the first UART"
#error "Don't know what the Data Received vector is called for the first UART"
^
Error compiling.
When I choose the Atmega16 from the boards menu, and tries to upload a simple sketch, I get this error:
Build options changed, rebuilding all
/Users/hansi/Documents/Arduino/hardware/AVR/DIP-40/cores/standard/HardwareSerial.cpp:93:11: error: attempt to use poisoned "SIG_UART_RECV"
!defined(SIG_UART_RECV)
^
/Users/hansi/Documents/Arduino/hardware/AVR/DIP-40/cores/standard/HardwareSerial.cpp:94:4: error: #error "Don't know what the Data Received vector is called for the first UART"
#error "Don't know what the Data Received vector is called for the first UART"
^
Error compiling.
Have anybody got the DIP40 Atmegas to work in the new Arduino 1.6? And can all the new libraries be used with these Atmegas? I've read that the new libraries are more optimized than the old ones. I have not touched the platform.txt file, but just copied the original AVR one.