ATmega1284P: End to End using 1.0 IDE

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!!

Ya, for others with the same problem try the following bootloader: Google Code Archive - Long-term storage for Google Code Project Hosting.

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:

void setup()  { 
  Serial1.begin(9600);
} 

void loop()  { 
Serial1.println("Hi");
delay(100);
}