Compiling duration

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Compiling duration

Postby goeck » Tue Feb 12, 2013 2:53 pm

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

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Compiling duration

Postby Tectu » Tue Feb 12, 2013 2:57 pm

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Compiling duration

Postby Giovanni » Tue Feb 12, 2013 3:01 pm

Try looking in the task manager if there is something taking CPU time.

Giovanni

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Re: Compiling duration

Postby goeck » Tue Feb 12, 2013 3:04 pm

@ 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

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Compiling duration

Postby Tectu » Tue Feb 12, 2013 3:43 pm

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

vibrolax
Posts: 9
Joined: Sat Jan 05, 2013 3:23 pm

Re: Compiling duration

Postby vibrolax » Tue Feb 12, 2013 10:33 pm

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.
Last edited by vibrolax on Wed Feb 13, 2013 12:10 am, edited 2 times in total.

gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm
Location: Aberdeenshire, UK

Re: Compiling duration

Postby gmb42 » Tue Feb 12, 2013 10:42 pm

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.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Compiling duration

Postby Tectu » Tue Feb 12, 2013 10:50 pm

Are you guys all developing under windows? Are you using ChibiStudio?


~ Tectu

gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm
Location: Aberdeenshire, UK

Re: Compiling duration

Postby gmb42 » Tue Feb 12, 2013 10:58 pm

Windows and msys command line with a text editor. Gdb for debugging.

goeck
Posts: 92
Joined: Mon Feb 11, 2013 12:00 pm
Location: Germany

Re: Compiling duration

Postby goeck » Wed Feb 13, 2013 11:36 am

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
Last edited by goeck on Wed Feb 13, 2013 1:15 pm, edited 1 time in total.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 17 guests