Discussion:
Improvements to msys build (with success)
(too old to reply)
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-05-28 10:36:27 UTC
Permalink
Hello

I spoke too fast: I still have problems with msys and clean_context.

I'm using the following config, as stated before:

CONFIG_HOST_WINDOWS=y
CONFIG_WINDOWS_MSYS=y
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y

The reason why I'm using this config, is that MSYS tries to imitate a POSIX
platform, and has nothing to do with cygwin, cygpath, and windows tools.

With msys, there is no /cygdrive folder, instead path translation between
c:\windowspath and /c/windowspath is automatic. That's why the bleeding edge
toolchain, and probably other toolchains, work easily under msys.

So using a toolchain that does not define WINTOOL via Toolchain.defs allows me
to avoid the use of cygpath with msys.

But there is still one more problem: with MSYS, ln -s does not create a symlink,
but a simple copy. There is no way to circumvent this, because windows does not
support symlinks.

So here I am, LN does a copy behind my back.

"make" works, and I can successfully build nuttx.hex with msys.

The problem arises when I run "make clean_context" or "make distclean", because
unlink.sh (or whatever was used before my change) does not find the .fakelnk
file that signals a faked directory symlink, or does not add the -r option to rm -f.

I sort of fixed this with two changes:

1. in configs/stm3f4discovery/nsh/Make.defs, I added a special case to use
link.sh and unlink.sh when msys is defined, but not wintool:

ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem
"${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w
$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
else
# Linux/MSYS/Cygwin-native toolchain

# sebastien lorquet: msys ln will copy (hardlink), not symbolic link, so we
need the fakelink method as in windows native
ifeq ($(CONFIG_WINDOWS_MSYS),y)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif

MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
endif

I suspect there is a lot of Make.defs that look like this one in a lot of
configurations, so a side question is, why is this file configuration-specific?

2. in tools/link.sh, I try to detect msys via uname -o, and I add the .fakelnk file:

# Create the soft link

ln -s "${src}" "${dest}" || \
{ echo "Failed to create link: $dest" ; exit 1 ; }

# sebastien lorquet 20140528 for msys, ln will not create a symlink, but a copy
# so fake the link instead
os = `shell uname -o`
if [ "x${os}" == "xMsys" ]; then
touch ${dest}/.fakelnk
fi

This seems to work, I can run make clean_context or distclean without problems;
I'd like to get your inputs on these changes.
Should we create a new configuration stm32f4discovery/msysbuild with the correct
default settings for this build platform? I don't know.


best regards,
--
Sébastien Lorquet


------------------------------------
Posted by: Sebastien Lorquet <sebastien-i/***@public.gmane.org>
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-05-28 10:51:30 UTC
Permalink
hmm, there is a syntax error in my link.sh addition, which means it isn't
called. copydir.sh seems to be called instead...

So I wonder how it works...

Sébastien Lorquet
Post by Sebastien Lorquet sebastien-i/***@public.gmane.org [nuttx]
Hello
I spoke too fast: I still have problems with msys and clean_context.
CONFIG_HOST_WINDOWS=y
CONFIG_WINDOWS_MSYS=y
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y
The reason why I'm using this config, is that MSYS tries to imitate a POSIX
platform, and has nothing to do with cygwin, cygpath, and windows tools.
With msys, there is no /cygdrive folder, instead path translation between
c:\windowspath and /c/windowspath is automatic. That's why the bleeding edge
toolchain, and probably other toolchains, work easily under msys.
So using a toolchain that does not define WINTOOL via Toolchain.defs allows me
to avoid the use of cygpath with msys.
But there is still one more problem: with MSYS, ln -s does not create a symlink,
but a simple copy. There is no way to circumvent this, because windows does not
support symlinks.
So here I am, LN does a copy behind my back.
"make" works, and I can successfully build nuttx.hex with msys.
The problem arises when I run "make clean_context" or "make distclean", because
unlink.sh (or whatever was used before my change) does not find the .fakelnk
file that signals a faked directory symlink, or does not add the -r option to rm -f.
1. in configs/stm3f4discovery/nsh/Make.defs, I added a special case to use
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem
"${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w
$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
else
# Linux/MSYS/Cygwin-native toolchain
# sebastien lorquet: msys ln will copy (hardlink), not symbolic link, so we
need the fakelink method as in windows native
ifeq ($(CONFIG_WINDOWS_MSYS),y)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
endif
I suspect there is a lot of Make.defs that look like this one in a lot of
configurations, so a side question is, why is this file configuration-specific?
# Create the soft link
ln -s "${src}" "${dest}" || \
{ echo "Failed to create link: $dest" ; exit 1 ; }
# sebastien lorquet 20140528 for msys, ln will not create a symlink, but a copy
# so fake the link instead
os = `shell uname -o`
if [ "x${os}" == "xMsys" ]; then
touch ${dest}/.fakelnk
fi
This seems to work, I can run make clean_context or distclean without problems;
I'd like to get your inputs on these changes.
Should we create a new configuration stm32f4discovery/msysbuild with the correct
default settings for this build platform? I don't know.
best regards,
--
Sébastien Lorquet
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-05-28 10:52:41 UTC
Permalink
OK, I need to wake up, it works because I called copydir.sh in make.defs

So, no change to link.sh is required.

Sorry for the noise.

Sébastien Lorquet
Post by Sebastien Lorquet sebastien-i/***@public.gmane.org [nuttx]
hmm, there is a syntax error in my link.sh addition, which means it isn't
called. copydir.sh seems to be called instead...
So I wonder how it works...
Sébastien Lorquet
Post by Sebastien Lorquet sebastien-i/***@public.gmane.org [nuttx]
Hello
I spoke too fast: I still have problems with msys and clean_context.
CONFIG_HOST_WINDOWS=y
CONFIG_WINDOWS_MSYS=y
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y
The reason why I'm using this config, is that MSYS tries to imitate a POSIX
platform, and has nothing to do with cygwin, cygpath, and windows tools.
With msys, there is no /cygdrive folder, instead path translation between
c:\windowspath and /c/windowspath is automatic. That's why the bleeding edge
toolchain, and probably other toolchains, work easily under msys.
So using a toolchain that does not define WINTOOL via Toolchain.defs allows me
to avoid the use of cygpath with msys.
But there is still one more problem: with MSYS, ln -s does not create a symlink,
but a simple copy. There is no way to circumvent this, because windows does not
support symlinks.
So here I am, LN does a copy behind my back.
"make" works, and I can successfully build nuttx.hex with msys.
The problem arises when I run "make clean_context" or "make distclean", because
unlink.sh (or whatever was used before my change) does not find the .fakelnk
file that signals a faked directory symlink, or does not add the -r option to rm -f.
1. in configs/stm3f4discovery/nsh/Make.defs, I added a special case to use
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem
"${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w
$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
else
# Linux/MSYS/Cygwin-native toolchain
# sebastien lorquet: msys ln will copy (hardlink), not symbolic link, so we
need the fakelink method as in windows native
ifeq ($(CONFIG_WINDOWS_MSYS),y)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
endif
I suspect there is a lot of Make.defs that look like this one in a lot of
configurations, so a side question is, why is this file configuration-specific?
# Create the soft link
ln -s "${src}" "${dest}" || \
{ echo "Failed to create link: $dest" ; exit 1 ; }
# sebastien lorquet 20140528 for msys, ln will not create a symlink, but a copy
# so fake the link instead
os = `shell uname -o`
if [ "x${os}" == "xMsys" ]; then
touch ${dest}/.fakelnk
fi
This seems to work, I can run make clean_context or distclean without problems;
I'd like to get your inputs on these changes.
Should we create a new configuration stm32f4discovery/msysbuild with the correct
default settings for this build platform? I don't know.
best regards,
--
Sébastien Lorquet
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-05-28 13:28:48 UTC
Permalink
Hi, Sébastien,
I had to install msys-make from mingw-get since mingw32-make does not work with
msys paths.
Have you considered a pure Windows native build? No Cygwin and no MSYS. It might work better for you.

Another nice, consistent Window environment is to build the NuttX buildroot tools under Cygwin and build under Cygwin. I use this a lot. The result is that you use Cygwin in Windows and everything works exactly as it does under Linux: clean symbolic links, no path conversions, 100% POSIX paths, and perfect dependencies (you probably don't have any dependencies at all now).
But there is still one more problem: with MSYS, ln -s does not create a symlink,
but a simple copy. There is no way to circumvent this, because windows does not
support symlinks.
So here I am, LN does a copy behind my back.
So MSYS does not support symbolic links.

In NuttX, most Make.defs define DIRLINK to by copydir.sh which fakes the symbolic link with a copy as, apparaently, does MSYS. copydir.sh is what adds the .fakelnk file.
The problem arises when I run "make clean_context" or "make distclean", because
unlink.sh (or whatever was used before my change) does not find the .fakelnk
file that signals a faked directory symlink, or does not add the -r option to rm -f.
If you created the "fake" link with tools/copydir.sh, then it contain the .fakelnk file. Your Make.defs file should have:

Make.defs: DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
Make.defs: DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
# sebastien lorquet: msys ln will copy (hardlink), not symbolic link, so we
need the fakelink method as in windows native
ifeq ($(CONFIG_WINDOWS_MSYS),y)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
And it does. Normally, this is selected by WINTOOL is defined. WINTOOL does more than just cygpath conversions.
I suspect there is a lot of Make.defs that look like this one in a lot of
configurations, so a side question is, why is this file configuration-specific?
The Make.defs files are similar for GCC toolchains. There are small customizations (like the location of the linker script, etc.). But the Make.defs files are VERY different for other toolchains. I have no fear of duplication and it results in a much better solution that would some centralized logic that tries to pick off all of the correct settings for each toolchain.
If you are using copydir.sh, I don't understand why the .fakelnk file is not there. That is the script that creates it. Perhaps the unlink script just does not work correctly under MSYS?
This seems to work, I can run make clean_context or distclean without problems;
I'd like to get your inputs on these changes.
Freddie Chopin was building NuttX without these changes in the past. I have never used MSYS myself and would not want to include that in all Make.defs files. But, of course, the reason that the Make.defs files exists is so that you can customize the build as needed for your platform. So, in that since, you are using it correctly.
Should we create a new configuration stm32f4discovery/msysbuild with the correct
default settings for this build platform? I don't know.
Right now WINTOOL does three things (maybe more): (1) it does cygpath path conversions, (2) it uses a directory copy instead a symbolic link, and (3) it suppresses dependency generation. I would think that the solution should be to separate these three build characteristics in Toolchain.defs and the Kconfig files so that they can have defaults based on the selected toolchain but also be overridden from the configuration.

I don't know how many people use MSYS. Other that Freddie, I am not aware of anyone. Does anyone else use MSYS? If so, perhaps you could help Sébastien.

Greg
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-05-28 13:54:00 UTC
Permalink
hello

As you may have seen, I refined my analysis in additional shorter messages.

My issue was that WINTOOL is mixing 3 features (depends/cygpath/links), but msys
need only two.

I do have depends, since I did not define mkdep to tools/mknulldeps.sh , but
kept the native linux/cygwin definition. How can I make sure that depends are
working?

I think that your suggestion to split these features would be a good idea.

If you don't like that, that's okay, the required changes are in Make.defs only,
if that's the way to go to personnalize things, we're done. I can keep them in
my own configuration, since we'll be doing a specific one anyway.

-----

msys is my preferred build platform because it will not only be used by me, but
also by other colleagues in my company (at last, I managed to convince them that
nuttx was the way to go for an ambitious embedded project we're starting! -- the
alternative was to code everything from scratch...).

Anyways, msys will also be used by openocd and other tools, so I would like to
stick with a single shell system. They are visual-studio guys, so if I tell them
they have to use 2 different consoles, they may be lost. I'm not here to preach
them the benefits of linux of any developent environment, I'm here to make
things work for them!

(and moreover, I like msys better that the heavy-duty cygwin and I'd be happy to
get msys working once and for all)

Thanks,

Sébastien Lorquet
Hi, Sébastien,
I had to install msys-make from mingw-get since mingw32-make does not work with
msys paths.
Have you considered a pure Windows native build? No Cygwin and no MSYS. It
might work better for you.
Another nice, consistent Window environment is to build the NuttX buildroot
tools under Cygwin and build under Cygwin. I use this a lot. The result is
that you use Cygwin in Windows and everything works exactly as it does under
Linux: clean symbolic links, no path conversions, 100% POSIX paths, and perfect
dependencies (you probably don't have any dependencies at all now).
But there is still one more problem: with MSYS, ln -s does not create a symlink,
but a simple copy. There is no way to circumvent this, because windows does not
support symlinks.
So here I am, LN does a copy behind my back.
So MSYS does not support symbolic links.
In NuttX, most Make.defs define DIRLINK to by copydir.sh which fakes the
symbolic link with a copy as, apparaently, does MSYS. copydir.sh is what adds
the .fakelnk file.
The problem arises when I run "make clean_context" or "make distclean", because
unlink.sh (or whatever was used before my change) does not find the .fakelnk
file that signals a faked directory symlink, or does not add the -r option to
rm -f.
If you created the "fake" link with tools/copydir.sh, then it contain the
Make.defs: DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
Make.defs: DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
# sebastien lorquet: msys ln will copy (hardlink), not symbolic link, so we
need the fakelink method as in windows native
ifeq ($(CONFIG_WINDOWS_MSYS),y)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
And it does. Normally, this is selected by WINTOOL is defined. WINTOOL does
more than just cygpath conversions.
I suspect there is a lot of Make.defs that look like this one in a lot of
configurations, so a side question is, why is this file configuration-specific?
The Make.defs files are similar for GCC toolchains. There are small
customizations (like the location of the linker script, etc.). But the
Make.defs files are VERY different for other toolchains. I have no fear of
duplication and it results in a much better solution that would some centralized
logic that tries to pick off all of the correct settings for each toolchain.
2. in tools/link.sh, I try to detect msys via uname -o, and I add the .fakelnk
If you are using copydir.sh, I don't understand why the .fakelnk file is not
there. That is the script that creates it. Perhaps the unlink script just does
not work correctly under MSYS?
This seems to work, I can run make clean_context or distclean without problems;
I'd like to get your inputs on these changes.
Freddie Chopin was building NuttX without these changes in the past. I have
never used MSYS myself and would not want to include that in all Make.defs
files. But, of course, the reason that the Make.defs files exists is so that
you can customize the build as needed for your platform. So, in that since, you
are using it correctly.
Should we create a new configuration stm32f4discovery/msysbuild with the correct
default settings for this build platform? I don't know.
Right now WINTOOL does three things (maybe more): (1) it does cygpath path
conversions, (2) it uses a directory copy instead a symbolic link, and (3) it
suppresses dependency generation. I would think that the solution should be to
separate these three build characteristics in Toolchain.defs and the Kconfig
files so that they can have defaults based on the selected toolchain but also be
overridden from the configuration.
I don't know how many people use MSYS. Other that Freddie, I am not aware of
anyone. Does anyone else use MSYS? If so, perhaps you could help Sébastien.
Greg
------------------------------------
Posted by: Sebastien Lorquet <sebastien-i/***@public.gmane.org>
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-05-28 14:24:22 UTC
Permalink
You might also want to look how things are done in configs/stm32f100rc_generic. Those configurations were produced by Freddie Chopin and that is what he use his "bleeding edge" toolchain with.

You know, of course, that the "bleeding edge" toolchain is a couple of years old now (unless it has been updated, I don't keep track).

Greg
Sebastien Lorquet sebastien-i/0epbAZHkZGWvitb5QawA@public.gmane.org [nuttx]
2014-05-28 14:27:27 UTC
Permalink
Couple of months instead; the BET was updated on 2014-04-05 :)

Thanks, I'll have a look at these configs.

Sébastien Lorquet
Post by spudarnia-/***@public.gmane.org [nuttx]
You might also want to look how things are done in configs/stm32f100rc_generic.
Those configurations were produced by Freddie Chopin and that is what he use his
"bleeding edge" toolchain with.
You know, of course, that the "bleeding edge" toolchain is a couple of years old
now (unless it has been updated, I don't keep track).
Greg
------------------------------------
Posted by: Sebastien Lorquet <sebastien-i/***@public.gmane.org>
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Freddie Chopin freddie_chopin-FWhLrETftxM@public.gmane.org [nuttx]
2014-06-10 20:45:16 UTC
Permalink
Post by Sebastien Lorquet sebastien-i/***@public.gmane.org [nuttx]
Thanks, I'll have a look at these configs.
For me using MSYS with native toolchain (without cygwin and without
GnuWin32) requires following steps:

1. defconfig:
- CONFIG_HOST_WINDOWS=y
- CONFIG_WINDOWS_MSYS=y
- CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y

2. Make.defs:
- explicitly set "WINTOOL = n" _AFTER_ include of include
${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
- DIRLINK = $(TOPDIR)/tools/copydir.sh
- DIRUNLINK = $(TOPDIR)/tools/unlink.sh
- MKDEP = $(TOPDIR)/tools/mkdeps.sh

This way it works fine, but I'm still using tup because it's much easier
and MUCH faster. I'm using the original Makefile only to do "context"
stage, but maybe I'll try to skip that too...

Regards,
FCh


------------------------------------
Posted by: Freddie Chopin <freddie_chopin-***@public.gmane.org>
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/nuttx/join
(Yahoo! ID required)

<*> To change settings via email:
nuttx-digest-***@public.gmane.org
nuttx-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
nuttx-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-06-10 21:44:33 UTC
Permalink
A better solution might to replace all sequences like this

ifneq ($(CONFIG_WINDOWS_NATIVE),y)
WINTOOL = y
endif

with

ifeq ($(CONFIG_WINDOWS_CYWIN),y)
WINTOOL = y
endif

In

./nuttx/arch/arm/src/arm/Toolchain.def|s
./nuttx/arch/arm/src/armv6-m/Toolchain.defs
./nuttx/arch/arm/src/armv7-a/Toolchain.defs
./nuttx/arch/arm/src/armv7-m/Toolchain.defs
./nuttx/arch/avr/src/avr/Toolchain.defs
./nuttx/arch/avr/src/avr32/Toolchain.defs
./nuttx/arch/mips/src/mips32/Toolchain.defs
./nuttx/arch/z80/src/ez80/Toolchain.defs
./nuttx/arch/z80/src/z180/Toolchain.defs
./nuttx/arch/z80/src/z8/Toolchain.defs
./nuttx/arch/z80/src/z80/Toolchain.defs

There are really only three relevant cases:

CONFIG_WINDOWS_NATIVE
CONFIG_WINDOWS_CYGWIN
CONFIG_WINDOWS_MSYS

And CONFIG_WINDOWS_CYGWIN is sounds like CONFIG_WINDOWS_CYGWIN is the only place where WINTOOL=y is required.

Greg

Continue reading on narkive:
Loading...