[En-Nut-Discussion] Compiling toolchain and programs on Windows
Philipp Burch
phip at hb9etc.ch
Mon Nov 25 17:00:43 CET 2013
Hi everyone,
the project I've been working on for quite a while now has reached a
state in which I should get the development environment on our company
computers. Unlike my notebook, those all boot Windows, so I'm facing the
(usual) Linux-to-Windows-hassles.
Using Cygwin, I've now managed to compile the Ethernut tools itself
(nutconfigure.exe at least) and generate the build and application
trees. So far, everything OK. When I try to build the libraries for the
first time (i.e. there are no object and especially no dep files), the
"all" target builds fine. But when make wants to take care of the
"install" target, it fails:
------------ 8< ---------------
make -C arch install
make[1]: Entering directory '/cygdrive/c/Dokumente und
Einstellungen/p.burch/Eigene Dateien/devnut_lm3s/nutbld/arch'
cm3/dev/lm3/lm3s_uart0.d:1: *** Mehrfache Target-Muster. Schluss.
make[1]: Leaving directory '/cygdrive/c/Dokumente und
Einstellungen/p.burch/Eigene Dateien/devnut_lm3s/nutbld/arch'
Makefile:18: recipe for target 'install' failed
make: *** [install] Error 2
------------ 8< ---------------
I know that those damn whitespaced Windows paths eventually will cause
trouble, but right now, this seems not to be the root cause. When I open
the offending dep file, the problem is revealed:
------------ 8< ---------------
cm3/dev/lm3/lm3s_uart0.o: ../.././nut/arch/cm3/dev/lm3/lm3s_uart0.c \
../.././nut/include/sys/atom.h ../.././nutbld/include/cfg/os.h \
../.././nut/include/sys/types.h ../.././nut/include/compiler.h \
../.././nut/include/toolchain.h ../.././nut/include/toolchain/gcc.h \
../.././nut/include/arch/cm3.h \
c:\programme\gnu\ tools\ arm\ embedded\4.7\
2013q3\bin\../lib/gcc/arm-none-eabi/4.7.4/include/stddef.h \
../.././nutbld/include/cfg/arch.h \
../.././nut/include/arch/cm3/cortexM3.h \
c:\programme\gnu\ tools\ arm\ embedded\4.7\
2013q3\bin\../lib/gcc/arm-none-eabi/4.7.4/include/stdint.h \
c:\programme\gnu\ tools\ arm\ embedded\4.7\
2013q3\bin\../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/include/stdint.h
\
c:\programme\gnu\ tools\ arm\ embedded\4.7\
2013q3\bin\../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/include/_ansi.h
\
[...]
------------ 8< ---------------
Obviously, the ARM toolchain in use (it's the official GNU ARM
toolchain, setup with the windows installer), places absolute paths into
the Makefile - in the Windows format with colons and backslashes. At
least the make supplied with Cygwin can't handle this, which does not
really surprise me. How to tell if a colon belongs to the drive letter
or marks the end of a target? Not to speak of the backslashes, anyway.
So my question is now, how to fix this? I don't mind installing another
more Windows-targeted make, but I doubt that this will get everything
running smoothly. Path styles switch between UNIX/Windows even inside a
single location, so how could this really be handled? In my opinion,
there should be a way to tell GCC that it should emit UNIX-style paths
with the /cygdrive notion and backslashes replaced by forward ones.
How do you do that in your setups?
Thanks,
Philipp
More information about the En-Nut-Discussion
mailing list