[En-Nut-Discussion] RFC: Using CMake

Ulrich Prinz uprinz2 at netscape.net
Tue Sep 8 00:28:11 CEST 2009


I don't know what you're exactly talking about...

But I was involved in a project that mixed code for the cross platform, 
code for the PC and code generated by the code for the PC but compiled 
for the cross platform... Ok, now you're puzzled, I know!

Example:
Project has large menus and icon-sets. But not all targets need all menu 
entries and therefore not all icons. The code for the pc includes header 
files defining the menus and icons. It also includes all those platform 
definition header files. The same files are included by the cross 
plattform.

On the compiler run, the cross toolchain compiles and links only the 
menus and icons needed from the sources. Then the pc-compiler compiles 
the binary generator and compressor for the menu, font and icon file.
The binary generator sped out new c and header files for the cross 
platform too. That because the linker has to find the real addresses of 
what is left over when the rest of the code is compiled.
Then the objectcopy tool is invoked from the Makefile and everything is 
put together into the flash-image.
This handling looks awefull but it is very tricky and pretty neat. As 
both toolchains are feeded with the same files, containing the same 
defines and ifdefs they talk about exactly the same details.
I just disabled one menu entry and spared several hundred bytes of icons 
and characters. It doesn't have a big effect on western languages, but 
if you can skip some Asian characters... wow!

For NutO/S you can use this mechanism to generate a specialized font for 
several displays out of one single base font, while the displays have 
totally different features, byte-orders or bits per pixel information.
You can even compress the font in different manor depending on the CPU 
or displays features for decompression.

It worked quite good with mingw. CygWin is to much oversized.

Best regards,
Ulrich

Harald Kipp schrieb:
> Hi all,
> 
> I've been looking for an autotools replacement from time to time, but
> nothing caught my attraction.
> 
> Since version 2.6 CMake
> http://www.cmake.org/
> supports cross compiling. This looks quite promising.
> 
> autotools could do a lot of nice things. Running it on native Windows
> isn't trivial and I don't want to force users to install Cygwin or MingW
> just to get Nut/OS up and running.
> 
> I also don't like to add more tools than absolutely necessary, but it
> looks to me, that CMake may help us a lot to create Makefiles and linker
> scripts for different targets.
> 
> Any opinions? Anyone, who already used this tool, may share his experience?
> 
> Thanks,
> 
> Harald
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list