Opening Serial port breaks sketch in Linux, Works in Windows

Hello all,

I had been programming my Mega 2650 from a Windows XP VM due to issues with the IDE/programmer from my native Red Hat Enterprise Linux 6.2 installation. The compilation/upload process began to get slow within the VM, so I decided to try from Linux again.

I got farther this time. Everything seems to complete fine, and works fine, with the exception of when I try to do anything serially.

If I even just have "Serial.begin(9600);" in my sketch, the LED on pin 13 will blink with some regular cycle (sort of like a heart beat: lub dub, lub dub, lub dub, etc...) and the rest of my code will be ignored -- i.e. if I try and manually set pin 13 LOW, it still blinks like I've described if I try and open the serial port.

Same thing happens if I use Serial1 instead of the 0th port. If I program the Mega via USB, disconnect, and power from an external non-USB source, the same thing happens.

What is going on differently when I program from Linux??

Here is a verbose compilation and upload from Linux. The only code in the sketch was:

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

void loop() {}

Thanks,
-jorwex

Any ideas?

I had the same issue ... kinda ... it had to do with the way linux handled the comm port and the CTR and RTS lines ... I never got it to work I ended up putting a resistor between the gnd and reset but everytime I uploaded a new sketch I had to pull the resistor

How many ohms? What made you try that? Any references for me to read?

what the resitor does is disable the auto resethttp://arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection.The value should be about 120 ohms.But before that have you already try just upload to the arduino an example from IDE section?
I'm using arduino on linux distros and works very well, much faster compiling than in windows :smiley:

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

void loop() {}

well just this code it will not do anything that you can debug.
Are you sure you upload the code correctly?