Page 1 of 4

Compiling duration

Posted: Tue Feb 12, 2013 2:53 pm
by goeck
Hey everyone,

just a short question.. I configured my GNU Tools for ARM processors toolchain in Eclipse and everything is working fine, except the compiling of ChibiOS Demo for STM32F0-Discovery takes at least 40 seconds (even if there is "nothing to be done"), every now and then it takes me more than a minute to get a elf, hex and bin file compiled. I use Win7 x64 on a Core i3 540 with 4Gb RAM. ah...parallel compilation turned enabled with 4 threads
Using my Laptop with a Core i5 and the same toolchain and preferences I got the job done mostly in around 5 seconds?

What's the point here? Some Path and Make searching?
I appreciate any hint on that!

Cheers
Stefan

Re: Compiling duration

Posted: Tue Feb 12, 2013 2:57 pm
by Tectu
Compiling the F0-Discovery demo on my i5-550M machine, 4GB DDRIII and a 128GB Crucial M4 SSD does take 1.92 seconds when doing a make clean before. I cannot see any issues.


~ Tectu

Re: Compiling duration

Posted: Tue Feb 12, 2013 3:01 pm
by Giovanni
Try looking in the task manager if there is something taking CPU time.

Giovanni

Re: Compiling duration

Posted: Tue Feb 12, 2013 3:04 pm
by goeck
@ tectu Uh..I guess you have the same machine that I have (Laptop). Equal features!
Anyway, that's not worth it 2secs or 5secs...I don't care...but one minute???

I guess I have to go through the qt and MinGW stuff. I already deinstalled Pearl, because it was somehow interfering, I don't want the ARM Compiler to interfere with Qt/MinGW and WinAVR though...

@Giovanni Yeah, I've done that. Nothing special going on... That really bothers me.

EDIT1:
OK, done that again. make.exe takes 25% of all CPU time, which is one core fully blown with work by make.exe. So which make.exe is it: sure it's not the yagarto one :-( It's the one from MSYS used with my MinGW. So I will play around with the Path variable. Can I just tell Eclipse, kinda hardcoded, which paths to use? there was some preferences stuff like that. I will focus on those two things. Let's see..

EDIT2:
OK, here we go: 2.14secs. How did I do it, sure I just pushed the path to yagarto tools from last position all the way up front of my system wide windows PATH variable. I didn't try though whether this influences my Qt Build environment, or the AVR Build environment, but I guess the latter doesn't since this get's all housekept by AVRStudio. We will see.
Thanks for taking care of this, guys.

Keep it up.
Cheers from Germany.
Stefan

Re: Compiling duration

Posted: Tue Feb 12, 2013 3:43 pm
by Tectu
My machine is a Lenovo T410. I should maybe say that I'm using a very minimalistic operation system with not even a desktop environment installed so I have some additional power resources ^^


~ Tectu

Re: Compiling duration

Posted: Tue Feb 12, 2013 10:33 pm
by vibrolax
I have also been appalled be the slowness of make, even when run from the command line. I'm also using MSYS make, and will be fixing the path ASAP
I will try this method to set the tool paths needed for ChibiOS builds:
http://gnuarmeclipse.livius.net/wiki/Up ... _toolchain

Jon

Edit: Now that I'm home, here are my observations. This is Windows 7 x64 Pro
I already had C:\MSYS\1.0\bin and and c:\MINGW\bin at the front of my System Settings/Advanced/Environment variables Path. However when I check the Path at the command line, all the Path elements I added here are appended to the underlying Windows path. Performance was awful. When I invoked make with -r, as gmb42 suggests, performance is great.

Re: Compiling duration

Posted: Tue Feb 12, 2013 10:42 pm
by gmb42
On my machine using msys make for a win32 build takes an age. Passing the '-r' flag speeds it up immensely. The flag tells make to not bother with some built-in rules, I'm not sure if this affects the build in an adverse manner, but it works for me.

Re: Compiling duration

Posted: Tue Feb 12, 2013 10:50 pm
by Tectu
Are you guys all developing under windows? Are you using ChibiStudio?


~ Tectu

Re: Compiling duration

Posted: Tue Feb 12, 2013 10:58 pm
by gmb42
Windows and msys command line with a text editor. Gdb for debugging.

Re: Compiling duration

Posted: Wed Feb 13, 2013 11:36 am
by goeck
Yeah, compiling under Win7 x64 usually with MSYS and MinGW, but for the ARM stuff I use GNU ARM toolchain and Yagarto tools Make.

I just found out, that Eclipse has the option to explicitely tell'em the Make path in Project Properties -> C\C++ Build : Builder Settings
uncheck "Use default build command" and use the PATHTOMAKE variable (you can give it a custom name, whatever you prefer). You have to make this variable available before doing the mentioned step by adding it under C\C++ Build -> Environment.
Hit "Add" and give it the name PATHTOMAKE, also put the absolute path into "value". In my case (win7 x64) no wrapping in " was needed, actually doing so messes everything up.
If you want to add the variable for the whole worksspace, you can do that in Window->Preferences-> c\C++ -> Build -> Environment.
My "Build command" on that page looks like this:

Code: Select all

${PATHTOMAKE}\make -j

Now, calling make gives me this output on the CDT Build Console: "C:\\Program Files\\yagarto-tools-20121018\\bin\\make" -j4 all
and takes just some seconds the succeed :-)

You could also think about the options available under the pages where you add variables:
1. Append variables to native environment <-- chosen by default
2. replace native environment with specified one
Unsing second option you could actually overwrite the system PATH variable and may have to only make this single step to get your toolchain working in eclipse.

Hope this helps
Cheers
Stefan