I bootloaded mine using AVR ISP MKii from the IDE with this bootlloader and this boards.txt entry.
We understand the MkII and all the others of that flavor work wonderfully. Some of us are perplex as to why the Arduino hooked up ICSP will upload bootloaders to 168, 328, 1280, 2560 just fine, but not the 1284p.
CrossRoads:
Check Nick Gammon's site on this. http://www.gammon.com.au/forum/?id=11637
Scroll about 2/3 down the page. He shows bootloading a '1284 from Uno as ISP.
I've already tried that. And tried everything everyone else suggested here. I even changed from burning the bootloader with my Mega ADK R3 to my home made UNO. The burning is always successful and the bootloader MD5 sum is the same as for Nick. So everything went well. But I always get the same error when trying to upload any sketch. I'm beginning to give up on this.
I'll give it another try tonight after work. If it dosen't work then i'll integrate a ISP programmer in the circuit so it in the end is programmable and debug-gable through FTDI.
I wonder if there is some issue with the ftdi and (perhaps) your host software. HW flowcontrol being enabled, or something.
Which FTDI board are you using? I doesn't seem to match any of the Arduino, Sparkfun, or Adafruit boards.
westfw:
I wonder if there is some issue with the ftdi and (perhaps) your host software. HW flowcontrol being enabled, or something.
Which FTDI board are you using? I doesn't seem to match any of the Arduino, Sparkfun, or Adafruit boards.
Edit: The CTS on my FTDI board wasn't connected. I guess because I thought that it isn't important. I tried connecting it to ground and that resulted with an getsync error. But if I put a capacitor (100nF) between CTS and ground then the upload goes further to eventually go to some error again. I'm using DTR to reset the board. Do I have to do something with the RTS and CTS line. Because putting a capacitor on CTS made the upload go further but it eventually ended with an error! Can I do something about this?
Try connecting CTS and DSR to DTR ("before" the cap that goes to the arduino reset pin.)
I can't quite tell whether your sparkfun board (the one in your picture) is (un)jumpered for 3.3V or not? If it is set for 5V, did you remember to connect vccio to +5 instead?
Progress everyone =P!!! I tried grounding the RTS line with a 100nF capacitor in between! And guess what?? the process went as far as beginning to flash the blink sketch!! But stopped in the middle of the sending with the programmer is out of sync error:
westfw:
Try connecting CTS and DSR to DTR ("before" the cap that goes to the arduino reset pin.)
I can't quite tell whether your sparkfun board (the one in your picture) is (un)jumpered for 3.3V or not? If it is set for 5V, did you remember to connect vccio to +5 instead?
While you were writing this message I was holding in the soldering iron and de-soldering that jumper Looll =P!! Ya, 5V is connected to VCCIO! I'll come back with the results of ur suggestion =P Thx
westfw:
Try connecting CTS and DSR to DTR ("before" the cap that goes to the arduino reset pin.)
I can't quite tell whether your sparkfun board (the one in your picture) is (un)jumpered for 3.3V or not? If it is set for 5V, did you remember to connect vccio to +5 instead?
Well, I tried coupling CTS and DSR to DTR before the cap ;)! The sketch got uploaded/written to the flash! But I got the programmer is out of sync error when avrdude tried to verify the written data. See the output: https://dl.dropbox.com/u/74389175/avrdude_1.txt
And ya, the bootloader isn't responding anymore.. I think it got corrupted or something. Am gonna try burning the bootloader again. But meenwhile, do you got any more ideas regarding the FTDI =P? Do I need to connect the RTS to something or????
Do you have an Uno with a removable chip? If so, after you reload your bootloader to the 1284, remove the Uno chip and use its serial to load your sketch to the 1284p.
rx to rx, tx to tx, 5v to 5v, gnd to gnd, reset to reset. It works well for me and it will also give you another way to test for serial issues.
cyclegadget:
Do you have an Uno with a removable chip? If so, after you reload your bootloader to the 1284, remove the Uno chip and use its serial to load your sketch to the 1284p.
rx to rx, tx to tx, 5v to 5v, gnd to gnd, reset to reset. It works well for me and it will also give you another way to test for serial issues.
SOLVED THE PROBLEM!!!! OHHHH!!!! SOLVED SOLVED SOLVED!!!
There is apparently nothing wrong with the FTDI nor the chip. Something is fishy about the bootloader. However I tried an experimental version of the bootloader that uses the other UART (UART1 instead of the default UART0). Connected the serial wires from the FTDI to pin 16; 17. Click on upload and DONE!! =P Works every time. But the thing is if I use the serial library then it'll use the first UART (UART0). So I have to reconnect the wires to UART0 after uploading a sketch inorder to recieve and send information through the serial connection. But I think this is simply fixed by rewriting the serial library. Or maybe there is an option for that?? I'll get into it right away =P!!
Just use the default boards.txt that comes with the Mighty 1284p optiboot bootloader. All you have to do is replace the optiboot_atmega1284p.hex with the one you downloaded!
EDIT: Use the second serial by using the Serial1 function instead of Serial. Example:
florinc:
Did you try the previous bootloader on more than one 1284P processor? (If you only tried a single one, I am thinking it may be faulty.)
I had the same thought and already bought another one. The same results there! Maybe a faulty shipment =P?? No kidding, (about the shipment) but ya the same results. I wrote a sketch that sends and receives data on the first UART (UART0) and it's sending and receiving fine! So I highly doubt that it's faulty (or both are faulty)!
That's odd. There is "infrastructure" in the source code that changed to permit other serial ports, but the .hex file produced by the current source is exactly the same as the download on google code, except for the misplaced version number (which really, really, shouldn't affect anything.)
Still, here is a uart0 version from the same source as the experimental uart1 code:
westfw:
That's odd. There is "infrastructure" in the source code that changed to permit other serial ports, but the .hex file produced by the current source is exactly the same as the download on google code, except for the misplaced version number (which really, really, shouldn't affect anything.)
Still, here is a uart0 version from the same source as the experimental uart1 code:
did you modify it yourself or just download the one on the resp. ? Because I already tried the one that uses UART0 on the google code resp. and that doesn't work!
It's freshly compiled and doesn't quite match the .hex file on the google download page; it has the version number in the right place. It's vaguely possible that there is some strange interaction between the hex file and whole avrdude/arduinoisp/etc chain.
westfw:
It's freshly compiled and doesn't quite match the .hex file on the google download page; it has the version number in the right place. It's vaguely possible that there is some strange interaction between the hex file and whole avrdude/arduinoisp/etc chain.
I've already made a PCB and soldered the thing =P! But i'll try it out with the other one I've got! I'll report back as soon as possible! Thx!