Go Down

Topic: Unbelievable slow compilation of simple sketches (Read 61847 times) previous topic - next topic

eliaar

Hi guys,

I recently bought a Arduino Uno and started playing with it. Everything works fine apart the unbelievable amount of time needed to compile (verify) even the simplest of the sketches (e.g. around 2 mins for the blinking led).

I have done some research and I could not find any solution. Just to be clear, it is not that the IDE software is slow: openin, closing, selection ports etc.. works fine. Uploading the sketch to the Arduino is fast. Just the compilation get stopped at half the bar for 1-2 mins. In tha time, the load of processing on the computer is very low, so it is just waiting for something, just I don't know what..

I tried to: 1) re install java 2) remove blue-tooth stuff 3) disable the ports not used 4) disable firewall 5) replaced rxtxSerial.dll with a version that should solve some problems..

.. but still compiling is super slow.

Do you have any suggestion what it could be? I am running a Windows XP machine not super new  but should have all the power needed to compile 4 lines of code...

Tnx for the help
Eliaar

eliaar

I tried to figure out better what is not working in the compilation. I found out two maybe helpeful info:

1) while the compilation is unexplainably frozen, in the background the process avr -gcc is launched and aborted at least 20 times in interval of 1-2 seconds one from the other.

2) even and empty sketch without loop() and setup() takes 2-3 mins do be "verified" before getting an error.

Does this information help anyone in giving me a hint of what is going on? I really hope someone can be so gentle to help me cause this problem is slowing down incredibly any work i can do with arduino..

Tnx
Eliaar

CrossRoads

Sorry, I only have experience with Vista Home SP2 (32-bit), have not tried an older Windws version.
Or a newer version for that matter (Win7/64 bit for example).
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

deadduck

I also have the same issue. I only received my Arduino Uno yesterday. On my work machine (Win XP), i've no issues, but at home on my laptop (Win 7), compilation of the blink demo takes minutes, and then uploads and runs successfully. I'd be very interested in any solutions people might be able to offer.

CrossRoads

Have you tried turning off bluetooth stuff running in the background?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robtillaart


There are configuration options in windows to give priority to foreground/background processes. (somewhere deep down inside - no link) If your forground processes have priority I can imagine that gcc which is run in the background is also slow.

But still minutes is slow - I have a windows 7 laptop with 4 boinc processes in the background and it compiles most sketches in less minute.

If you open the task manager and you start compiling do you see any "strange" things...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

oric_dan

#6
Feb 11, 2012, 10:48 pm Last Edit: Feb 11, 2012, 11:18 pm by AWOL Reason: 1
This may not be related to anything you guys are doing, but I was just compiling a sketch with the
following routine in it, and which had worked 100% beforehand, but which hung up the compiler
indefinitely after I added the routine. IOW, compilation started on "Verify" and partially completed,
but then simply hung in the middle, with no error messages indicated.
Code: [Select]

void test3()
{
 int num = 9;
 int freq[] = {
   50, 100, 200, 500, 1000, 2000, 3000, 4000, 5000 };
   
 Serial.print("\n);
 for( int i=0; i<num; i++) {
   Serial.print( freq[i], DEC);
   Serial.print(" ");
   playFreq(freq[i], 500);
 }
}


Moderator edit: CODE TAGS added

What I discovered was, a quote was left out of the statement just before the for() loop,
ie, s/b Serial.print("\n");

I am kind of surprised that the compiler didn't signal this as a syntax error ?????????

It must have treated everything between the first and 3rd Serial.print() statements as a
string-literal.

Moral of the story is: you might need to re-check the syntax in your code, if compilation
takes forever to complete.


mmcp42

[ code]
[ /code]
stops your code going into italics!
there are only 10 types of people
them that understands binary
and them that doesn't

pYro_65


There are configuration options in windows to give priority to foreground/background processes. (somewhere deep down inside - no link) If your forground processes have priority I can imagine that gcc which is run in the background is also slow.


On windows 7
type 'Control Panel\System and Security\System' into explorer
click 'Advanced System Settings'
then 'Advanced' tab
You want performance settings.

On XP
right click on my computer then click 'properties'
and go to advanced tab, then settings button.
Forum Mod anyone?
https://arduino.land/Moduino/

rtadams89

Make sure the IDE .exe file and particularly all the header files you are using is on a local drive. Also, make sure what ever hard drive it is running from is not bogged down doing a bunch of other things.

The background/foreground preferences should only make significantnt difference if you have a resource intensive process running in the foreground, AND another running in the background. For most people, this setting will nevemakeek noticeableldifferencece and should not be changed from the default.

angel67

#10
Feb 28, 2012, 12:37 am Last Edit: Feb 28, 2012, 12:39 am by angel67 Reason: 1

Hi guys,

I recently bought a Arduino Uno and started playing with it. Everything works fine apart the unbelievable amount of time needed to compile (verify) even the simplest of the sketches (e.g. around 2 mins for the blinking led).

I have done some research and I could not find any solution. Just to be clear, it is not that the IDE software is slow: openin, closing, selection ports etc.. works fine. Uploading the sketch to the Arduino is fast. Just the compilation get stopped at half the bar for 1-2 mins. In tha time, the load of processing on the computer is very low, so it is just waiting for something, just I don't know what..

I tried to: 1) re install java 2) remove blue-tooth stuff 3) disable the ports not used 4) disable firewall 5) replaced rxtxSerial.dll with a version that should solve some problems..

.. but still compiling is super slow.

Do you have any suggestion what it could be? I am running a Windows XP machine not super new  but should have all the power needed to compile 4 lines of code...

Tnx for the help
Eliaar

any solution for this issue?.
i am running a windows xp on old lantop y arduino uno ide 1.0..
processing last version. the check ports spend next to 2 minutes. after the program go well.

oric_dan

Quote

i am running a windows xp on old lantop y arduino uno ide 1.0..


It is also my old XP notebook that shows exactly the same behavior as yours. My 2-YO
XP netbook works ok, so I just gave up using the Arduino IDEs on the older machine.

However, it occurs to me that you might go to the Microsoft website and load all of the
OS patches [there must be a million of them by now], and see if that helps. Will probably
only take a couple of hours!!!!

The Arduino IDE is the only dev tool out of a couple of dozen that I use that won't work on
my older notebook,  so I don't want to mess with it anymore.

mohamedelhosary

I have installed windows xp and its very slow ,i try all ways to fix it but no hope

oric_dan

Quote

I have installed windows xp and its very slow ,i try all ways to fix it but no hope


If you're reinstalling WinXP from a CD disk or backup partition, you probably need to go the
microsoft website and  also get all the latest operating system patches, otherwise you
still have the old OS installed. There are probably a million patches.

BillO


...
1) while the compilation is unexplainably frozen, in the background the process avr -gcc is launched and aborted at least 20 times in interval of 1-2 seconds one from the other.
...


Hmmm, I'm running XP and do not have such issues.  Which version of the Arduino software is this?

Also, on XP if a process is starting and exiting over and over again, you will likely have many errors in your system event log.  Try having a look at the log just after you do a sketch compile and up-load.

Start -> Settings -> Control Panel -> Administrative Tools -> Event viewer -> System

Go Up