How to upload sketch to ATMEGA1284P using Arduino UNO?

Hi guys,

I've installed bootloader (Optiboot) to my 1284P

I chose 'Mighty 1284p 16MHz using Optiboot' as board, 'AVRISP mkII' as Programmer

and I wiring breadboard as picture below but I can't upload a sketch

|500x373

Credit : http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove

I got error message "Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer."

Could you please advise? (I don't have FTDI cable)

Need some more info:
What PC, OS, and IDE version?
How did you install the bootloader, what did you use for a Programmer?
Now you are using the Uno board as the USB/Serial adapter, that looks like it could be wired ok (need 0.1uF caps on VCC and AVCC), you will need to press Reset when the IDE shows “compiled xxx of 128xxx bytes”.
In the IDE, select File:Preferences and turn on Verbose Output.
Compile (Verify) again, and post the entire error message that results, use code tags (the </> button on the forum menu).

Sorry for poor informations, I'm using Windows 7 64-bit with Arduino IDE 1.5.8

I installed bootloader with nickgammon's sktech 'Atmega_Board_Programmer' by upload it to UNO

and install the bootloader via command line (Serial Monitor)

|500x362

Credit : http://www.gammon.com.au/breadboard

result as per below

|500x280

I also verified with 'Atmega_Fuse_Calculator' and I saw it should be ok

I followed your advised, put a cap 0.1uF on VCC and AVCC, show verbose output during compilation but there are the same result (I'm not sure other option such as Programmer, Board are correct or not)

Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer.

processing.app.debug.RunnerException
    at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:593)
    at processing.app.debug.Compiler.compileFiles(Compiler.java:271)
    at processing.app.debug.Compiler.compileSketch(Compiler.java:638)
    at processing.app.debug.Compiler.compile(Compiler.java:121)
    at processing.app.Sketch.build(Sketch.java:1588)
    at processing.app.Sketch.build(Sketch.java:1508)
    at processing.app.Editor$DefaultRunHandler.run(Editor.java:1912)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:97)
    at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:89)
    at processing.app.helpers.StringReplacer.formatAndSplit(StringReplacer.java:37)
    at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:591)
    ... 7 more

The compiler problem, I don't know how to help. 1.5.8 is older version, try upgrading to 1.6.5. I've just started using 1.6.9 for some basic stuff, works well for the little I've done. https://forum.arduino.cc/index.php?topic=402335.0 You don't have 5V/Gnd going to the left side of the protoboard, you'll need that. That is just the bootload installer setup, yes? Rx/Tx need connecting as you discussed in your original post.

Please show us a good image of the wiring.

.

The picture with red background it not mine I just show you how can I connect to protoboard

when install bootloader, actually I connect 5V and GND both sides together

|500x492

previously I've tried IDE 1.6.9 with 328P but I got error for some libraries so I switched back to 1.5.8

I will try with 1.6.9 again, many thanks for your kindly support :)

|429x500

After deal with 1.6.9 there is no error in compilation but it stuck after upload a sketch

I saw RX LED flashed 3 times after that I got an error message as per below

I can't find micro switch now so I just connect a wire from RESET pin to GND and then disconnect

Sketch uses 1,208 bytes (0%) of program storage space. Maximum is 130,048 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 16,375 bytes for local variables. Maximum is 16,384 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1d
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

A few more images at different angles would be helpful.

Please confirm the two crystal capacitor labeling.

The crystal is 16 megahertz?

I would urge you to use shorter wires wherever possible.

.

Neatness can be helpful.

.

That is a layout of beauty ;D

I just rewire to reduce a messy :)

|424x500

|500x376

|500x372

2016-06-13_22-29-09.png

.

LarryD:
2016-06-13_22-29-09.png

.

Sorry, I forgot it I just rewire to reduce a messy

previously I connect them together :slight_smile:


I connect them together and try again but it doesn’t work

Confirm you have installed a bootloader on the 1284 with no problems.

.

Also confirm the 22pf capacitors are being held firmly by the protoboard. With a voltmeter, measure the voltage on all power pins to check for proper power connections. Are you selecting 1284 under board type? You may have generate a full swing entry in boards.txt variant.

LarryD: Confirm you have installed a bootloader on the 1284 with no problems.

.

This is a result when I verify with Fuse Calculator

How to generate a full swing entry in boards.txt variant?

I did not change boards.txt I just copy and paste the mighty-1284 folder to /Documents/Arduino/hardware/

|500x423

I also check with volt meter I saw voltage of two 22pF are not equal, I'm not sure is it correct or not

could you please confirm?

|500x383

|500x373

|500x360

|500x458

the voltage of 10K resistor is 0V and it is 4.99V when I press RESET button, I think it should be correct

|500x425

Readings look OK.
You cannot use a DVM to measure levels on the crystal oscillator.

I had this problem, had to change the fuses to FULLSWING
low_fuses=0xf7

I use Crossroad’s Bobuino pin layout and created a new entry in boards.txt found in:
C:\Users\yourUserName\Documents\Arduino\hardware\mighty-1284p

See attached file:

Sample below:

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

bobuinofullSwing.name=BobuinoFullSwing
bobuinofullSwing.upload.protocol=arduino
bobuinofullSwing.upload.maximum_size=130048
bobuinofullSwing.upload.speed=115200
bobuinofullSwing.bootloader.low_fuses=0xf7
bobuinofullSwing.bootloader.high_fuses=0xde
bobuinofullSwing.bootloader.extended_fuses=0xfd
bobuinofullSwing.bootloader.path=optiboot
bobuinofullSwing.bootloader.file=optiboot_atmega1284p.hex
bobuinofullSwing.bootloader.unlock_bits=0x3F
bobuinofullSwing.bootloader.lock_bits=0x0F
bobuinofullSwing.build.mcu=atmega1284p
bobuinofullSwing.build.f_cpu=16000000L
bobuinofullSwing.build.core=mighty
bobuinofullSwing.build.variant=bobuino

boards.txt (3.99 KB)

BTW
Make this change in Nick’s board programmer too, then re-burn the bootloader:

0xF7, //fuse low byte: external clock, max start-up time “Full Swing Oscillator” <------------<<<<

  // ATmega1284P family
  { { 0x1E, 0x97, 0x05 }, "ATmega1284P", 128 * kb,   1 * kb,
  #if USE_ATMEGA1284
        optiboot_atmega1284p_hex,
  #else
        0,
  #endif
        0x1FC00,      // start address
  #if USE_ATMEGA1284
        sizeof optiboot_atmega1284p_hex,
  #else
        0,
  #endif
        256,          // page size in bytes (for committing)

        0xF7,  //fuse low byte: external clock, max start-up time  "Full Swing Oscillator" <----<<<<
//      Original value is in the line below
//      0xFF,         // fuse low byte: external clock, max start-up time

etc.

I am using IDE 1.06

:sleeping: Time

maverick8421

I also check with volt meter I saw voltage of two 22pF are not equal, I'm not sure is it correct or not

LarryD

You cannot use a DVM to measure levels on the crystal oscillator.

Sorry, I didn't read whole thread... You can check with DMM if oscillator works. Voltage at XTAL1 pin to GND should be about Vcc/2 if ok. It is square signal 50:50.