[CMake] Cross compiling arm-elf on Windows host

Harald Kipp harald.kipp at egnite.de
Sun Sep 20 14:35:44 EDT 2009


Alexander Neundorf wrote:
> On Sunday 20 September 2009, Harald Kipp wrote:

>> My subdir CMakeLists:
>>
>> --- C:\ethernut-4.9.6\nut\fs\CMakeLists.txt ---
>> add_library(nutfs STATIC basename dirent dirname)
> 
> This command means that you want to build a library called "nutfs" from the 
> source files "basename", "dirent" and "dirname". Is this what you want ?

Yes. Actually there are more files, but I wanted to start with these
simple ones first.

The directory structure is

C:\ethernut-4.9.6
  nut <- Source tree
    fs <- nutlibfs sources
    .... <- other sources

>>  cmake -G "Unix Makefiles"
>> -DCMAKE_TOOLCHAIN_FILE=c:\ethernut-4.9.6\toolchain-generic.cmake
>> c:\ethernut-4.9.6\nut
>>
>> So far the result is
>>
>>  -- Configuring done
>>  -- Generating done
>>  -- Build files have been written to: C:/ethernut-4.9.6/nutbld
>>
>> However, when trying to run make, I get
> 
> What "make" is it ? cygwin ? mingw ? 

Generally we use
http://www.yagarto.de/
for building arm-elf binaries on Windows. YAGARTO is build with mingw.
However, the Ethernut developers do not need to install cygwin or mingw.
So far all binaries run on a native Windows command shell.


>>   Scanning dependencies of target nutfs
>>   [ 33%] Building C object fs/CMakeFiles/nutfs.dir/basename.c.obj
>>   Das System kann den angegebenen Pfad nicht finden.
> 
> Try "VERBOSE=1 make" to see the full command which is executed. 

I'll try to do this tommorrow.

>>   cd C:/ethernut-4.9.6/nutbld && "C:/Programm....
>>
>> I think that this will not work on Windows. cd requires backslashes.
> 
> I think this depends on the type of makefiles you generate and on the type of 
> make/shell you use to execute them.
> You might try the nmake makefiles in case you have nmake. 

I'll try this as well.

One reason for looking at CMake as an alternative to GNU autotools is,
that we do not want to force Windows users to install Cygwin or force OS
X users to install fink. It'd be great if CMake can help here.

Many thanks so far for your prompt reply,

Harald





More information about the CMake mailing list