Building on Windows with MinGW

Carles Cufi

Hi there,

I've followed the steps outlined here:

to compile Zephyr on Windows.

The first problem I encountered was that the regex library could not be found by MinGW's gcc, so I had to add the following to my .bash_profile:

export CPATH="C:/mingw/msys/1.0/include"
export LIBRARY_PATH="C:/mingw/msys/1.0/lib"

Not sure if this is due to the way one installs MinGW, but it was required for me.

The second problem I see is that no matter how I configure my build (both manually or adding my own Makefile.toolchain) the build always fails with an error similar to:

Error processing 'c:/cygwin64/home/cacu/src/nordic/git/cacu/zp/c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\soc\atom\Kconfig' #123.

Obviously my git repo lives in c:\cygwin64\home\cacu\src\nordic\git\cacu\zp.

After digging a bit, I found out that win_process_files in zconf.lex.c_shipped gets the following path when the error occurs:


which obviously does not exist (I see no "Kconfig" file in x86\soc\atom). Since there is no wildcard, there is no chance that file is going to be found, and then win_process_files tries a second path by doing:

env = getenv(SRCTREE);
if (env) {
sprintf(fullname, "%s/%s", env, expanded);

But that doesn't work either, since it results in a path concatenation.

It is worth mentioning that the folders that *do* contain a Kconfig file, such as c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\core\Kconfig, seem to be processed fine.

Any idea on what could be causing this?



Join to automatically receive all group messages.