[En-Nut-Discussion] First summary - Building Nut/OS fast...very fast

Ulrich Prinz uprinz2 at netscape.net
Wed Jul 20 19:40:09 CEST 2011


On 20.07.2011 16:30, Harald Kipp wrote:
> Hi all,
> Ulrich suggested to completely switch to building under Cygwin. Also
> worth to try, but definitely _not_ _on_ _my_ _machine_ ;-). After a
> lot of bad experience with SoDs and DLL-nightmares on
> Cygwin-contaminated Windows PCs, this is no otpion for me.
Nope, not!

I suggested to install cygwin. Then refer to the cygwin/bin directory in
the search PATH.

DO NOT run compilation WITHIN cygwin,
but use the cygwin tools from outside.

Or simpler: Exchange any existing linux-emulation tools like make, rm,
cp... by the ones from cygwin. Remove all references to these tools
provided by installed WinAVR, yagarto-tools, WinARM, MingW... from your
The easiest way is to add c:\cygwin\bin at the very beginning of your
windows / user PATH variables for your testing. If I was right, keep it,
if I was wrong, remove the entry and everything is as it was before.

Remove all references to these tools from nutconf->setup->path.
I never checked if this entry is added before or at the end of the
existing PATH. So to be save, remove them.

Then recompile.
It is not only that rm is 20% faster it counts for make.exe and cp too!

I never called cygwin to compile nutos I just used its tools from
outside. Except for recompiling openocd I never used cygwin myself.

I think it should even work if I send you my cygwin/bin directory an you
copy and refernce it in your PATH.

> I didn't compare build times on Windows and Linux hosts. What I found
> is, that when running single make processes, only 4 cores out of 8
> cores are utilized up to 10% to 20% on the Windows 7 machine. Nathan
> gives a plausible explanation to this: GCC at least runs the compiler
> in parallel with the assembler. And I can imagine, that something in
> this area causes some latency. Due to this latency, the CPU cores are
> still sleeping most of the time.
> After splitting the testing part (either by using a buildbot or
> modifying the existing Lua script), I should probably try it on Linux
> first.
For linux Ole and (hopefully I) can give the build a try. Then we have
some references. Here it is a AMD A6 (4 cores) and 8GB of RAM, running
ubuntu Natty amd64 version.

Wonder if it makes sense to recompile gcc to really use 64 bit on the
host... No idea if that is possible or if it gives performance boost.


More information about the En-Nut-Discussion mailing list