You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by fft <ff...@feedforward.com.cn> on 2022/11/02 15:36:41 UTC

Native Windows build

Dear all,


A few years ago, I successfully configure and build NuttX-8.2 in a native Windows environment (the toolchains is GNU-Win32 + kconfig-frontends-win32-3.12.1 + MinGW, and the host OS is both XP and Win7 ) , I can even debug NuttX through Code::Blocks IDE under Windows. But now i find the NuttX can not build in native Windows environment anymore, the environment and toolchains is exactly what i had configured a few years ago, but now it failed at configure stage, I tried to fix the configure, but i found there's too many changes involved. So I have to ask, is there anybody build NuttX in native Windows environment recently? or is the issues of my toolchains?


regards,
Zouboan

Re: Native Windows build

Posted by fft <ff...@feedforward.com.cn>.
Thanks for your advice, i will try it!



BR,


Zouboan


------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"xiaoxiang781216"<xiaoxiang781216@gmail.com&gt;;
Date: &nbsp;Sun, Nov 13, 2022 11:15 PM
To: &nbsp;"dev"<dev@nuttx.apache.org&gt;; 

Subject: &nbsp;Re: Native Windows build

&nbsp;
First, you need to update
https://github.com/apache/incubator-nuttx/blob/master/tools/ci/cibuild.sh
to install the tool required by the build in a refresh Windows installation.
Second, Update
https://github.com/apache/incubator-nuttx/blob/master/.github/workflows/build.yml
to select Windows as build server.

Re: Native Windows build

Posted by Xiang Xiao <xi...@gmail.com>.
On Sat, Nov 12, 2022 at 9:43 PM fft <ff...@feedforward.com.cn> wrote:

> Dear all,
>
>
> Through the efforts of Petro and me ,&nbsp; NuttX Windows native build is
> finally restored again:
>
>
> https://github.com/apache/incubator-nuttx/pull/7572
> https://github.com/apache/incubator-nuttx/pull/7580
> https://github.com/apache/incubator-nuttx-apps/pull/1407
>
>
> As Alan's suggestion, is better to add Windows Native Environment build in
> CI to avoid breaking it again. but i'm not expert in ci and docker, i don't
> know how to construct a Windows environment in docker on github. If someone
> have interesting in construct Windows Native Environment ci , i can be able
> to help.
>
>
First, you need to update
https://github.com/apache/incubator-nuttx/blob/master/tools/ci/cibuild.sh
to install the tool required by the build in a refresh Windows installation.
Second, Update
https://github.com/apache/incubator-nuttx/blob/master/.github/workflows/build.yml
to select Windows as build server.


>
> BR,
>
> Zouboan
>
>
> ------------------&nbsp;Original&nbsp;------------------
> From: &nbsp;"Alan&nbsp;Carvalho&nbsp;de&nbsp;Assis"<acassis@gmail.com&gt;;
> Date: &nbsp;Thu, Nov 3, 2022 00:22 AM
> To: &nbsp;"dev"<dev@nuttx.apache.org&gt;;
>
> Subject: &nbsp;Re: Native Windows build
>
> &nbsp;
>
> Hi Zouboan,
>
> Unfortunately there is nobody working with Windows Native Environment
> and some time ago someone reported it was delaying about 10 minutes to
> compile NuttX.
>
> So I think it is not an issue with your tools, but with NuttX Building
> System.
>
> My suggestion is if someone fixes it we add Windows Native Environment
> build in our CI to avoid breaking it again.
>
> BR,
>
> Alan
>
> On 11/2/22, fft <fft@feedforward.com.cn&gt; wrote:
> &gt; Dear all,
> &gt;
> &gt;
> &gt; A few years ago, I successfully configure and build NuttX-8.2 in a
> native
> &gt; Windows environment (the toolchains is GNU-Win32 +
> &gt; kconfig-frontends-win32-3.12.1 + MinGW, and the host OS is both XP
> and Win7
> &gt; ) , I can even debug NuttX through Code::Blocks IDE under Windows.
> But now i
> &gt; find the NuttX can not build in native Windows environment anymore,
> the
> &gt; environment and toolchains is exactly what i had configured a few
> years ago,
> &gt; but now it failed at configure stage, I tried to fix the configure,
> but i
> &gt; found there's too many changes involved. So I have to ask, is there
> anybody
> &gt; build NuttX in native Windows environment recently? or is the issues
> of my
> &gt; toolchains?
> &gt;
> &gt;
> &gt; regards,
> &gt; Zouboan

Re: Native Windows build

Posted by Xiang Xiao <xi...@gmail.com>.
On Sun, Nov 13, 2022 at 10:33 PM fft <ff...@feedforward.com.cn> wrote:

> A few years ago, i build NuttX-8.2 in Windows native build it takes about
> 1 minutes. the latest nuttx use temporary .ddc to generate Make.dep because
> there's so many .ddc file, one type command to process all .ddc file will
> give an error: input line is too long in Windows native build.&nbsp; i have
> to type .ddc to Make.dep one by one, and this waste a lot of time.
> now build lateset NUttX(stm32f4discovery:nsh) take 3.34 minutes in first
> time and 1.15 minutes second time(make clean rather than make distclean).
>
>
You may try to revert:
https://github.com/apache/incubator-nuttx/pull/2335
https://github.com/apache/incubator-nuttx/pull/2544


>
> As suggested in NuttX's README.md, i configure NuttX-8.2 in Windows native
> build use kconfig-frontends-win32 from:
> https://github.com/reclone/kconfig-frontends-win32 and
> https://github.com/reclone/kconfig-frontends-win32/releases
> but https://github.com/reclone/kconfig-frontends-win32 last version is
> v3.12.1, and it stop update since 2017, since v9.1.0 nuttx use
> kconfig-frontends v4.11.0 to configure nuttx and there's some expression
> in Kconfig (for example: if PWM_MULTICHAN &amp;&amp; PWM_NCHANNELS &gt; 1)
> can not support by kconfig-frontends-win32-3.12.1, and will give an error
> when&nbsp; make olddefconfig in configure stage. to configure latest NuttX
> in Windows native build, i update kconfig-frontends-win32 to v4.11.0 and
> create a PR: https://github.com/reclone/kconfig-frontends-win32/pull/1
> ,but kconfig-frontends-win32 hasn't been updated for so many years, i don't
> know whether there's any body to merge this patch. So before this patch was
> merged,if anybody who want configure latest NuttX use
> kconfig-frontends-win32, please download from my branch:
> https://github.com/zouboan/kconfig-frontends-win32/releases/tag/v4.11.0
>
>
Again, the community needs to find a place to host the unmaintained
projects like kconfig-frontends.


>
> BR,
>
>
> Zouboan
> &nbsp;
> &nbsp;
> ------------------&nbsp;Original&nbsp;------------------
> From: &nbsp;"Brennan&nbsp;Ashton"<bashton@brennanashton.com&gt;;
> Date: &nbsp;Sat, Nov 12, 2022 11:05 PM
> To: &nbsp;"dev"<dev@nuttx.apache.org&gt;;
>
> Subject: &nbsp;Re: Native Windows build
>
> &nbsp;
>
> I can probably help revive my past effort to run some native builds in CI
> to at least prevent it from getting fully broken. One of the blockers last
> time, was just how slow it was and the limited number of Windows workers.
>
> Let's see what we can do.
>
> --Brennan

Re: Native Windows build

Posted by fft <ff...@feedforward.com.cn>.
A few years ago, i build NuttX-8.2 in Windows native build it takes about 1 minutes. the latest nuttx use temporary .ddc to generate Make.dep because there's so many .ddc file, one type command to process all .ddc file will give an error: input line is too long in Windows native build.&nbsp; i have to type .ddc to Make.dep one by one, and this waste a lot of time.
now build lateset NUttX(stm32f4discovery:nsh) take 3.34 minutes in first time and 1.15 minutes second time(make clean rather than make distclean).


As suggested in NuttX's README.md, i configure NuttX-8.2 in Windows native build use kconfig-frontends-win32 from: 
https://github.com/reclone/kconfig-frontends-win32 and https://github.com/reclone/kconfig-frontends-win32/releases
but https://github.com/reclone/kconfig-frontends-win32 last version is v3.12.1, and it stop update since 2017, since v9.1.0 nuttx use 
kconfig-frontends v4.11.0 to configure nuttx and there's some expression in Kconfig (for example: if PWM_MULTICHAN &amp;&amp; PWM_NCHANNELS &gt; 1) can not support by kconfig-frontends-win32-3.12.1, and will give an error when&nbsp; make olddefconfig in configure stage. to configure latest NuttX in Windows native build, i update kconfig-frontends-win32 to v4.11.0 and create a PR: https://github.com/reclone/kconfig-frontends-win32/pull/1 ,but kconfig-frontends-win32 hasn't been updated for so many years, i don't know whether there's any body to merge this patch. So before this patch was merged,if anybody who want configure latest NuttX use kconfig-frontends-win32, please download from my branch: https://github.com/zouboan/kconfig-frontends-win32/releases/tag/v4.11.0


BR,


Zouboan
&nbsp;
&nbsp;
------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"Brennan&nbsp;Ashton"<bashton@brennanashton.com&gt;;
Date: &nbsp;Sat, Nov 12, 2022 11:05 PM
To: &nbsp;"dev"<dev@nuttx.apache.org&gt;; 

Subject: &nbsp;Re: Native Windows build

&nbsp;

I can probably help revive my past effort to run some native builds in CI
to at least prevent it from getting fully broken. One of the blockers last
time, was just how slow it was and the limited number of Windows workers.

Let's see what we can do.

--Brennan

Re: Native Windows build

Posted by Gregory Nutt <sp...@gmail.com>.
On Sat, Nov 12, 2022 at 9:28 AM Gregory Nutt <sp...@gmail.com> wrote:

> There was also IAR/uVision IDE support in the repository for STM32.  All
> of the IAR/uVision helper tools are still present (I think), but the IAR
> board support was removed
> https://bitbucket.org/patacongo/obsoleted/src/60ec01456d8b09f5b813a5fd8865cdbd5a0ccc20/ChangeLog#lines-357
>

The only special support that IAR needed was special assembly language
source files because the GNU asm source file syntax was not compatible with
IAR.  But I I see that these special IAR files were also deleted for
ARMv7-M:
https://github.com/apache/incubator-nuttx/commit/1320e5add4771718c6da3fdd850583a2b2694ddb

Re: Native Windows build

Posted by Gregory Nutt <sp...@gmail.com>.
On 11/12/2022 9:05 AM, Brennan Ashton wrote:
> I can probably help revive my past effort to run some native builds in CI
> to at least prevent it from getting fully broken. One of the blockers last
> time, was just how slow it was and the limited number of Windows workers.

Did we ever really have a native windows build in CI?  I don't think 
that the native build has been working since NuttX moved to the ASF 
incubator.  Are you sure this wasn't a Cygwin build?  The Cygwin build 
is not a "native" build since it still depends on the POSIX environment 
provided by Cygwin.  So it is really just like the Linux build but 
slower.  Cygwin is slow due primarily to the emulation of fork() which 
does not exist in Windows.  But would not think that a truly native 
build would depend on the emulated fork() and should not be so slow.

Last time I measured, I used a script with a loop that forked some 
trivial process as fast as possible.  The emulated fork() limited 
performance to about 7 forks/sec under Cygwin.

Some "native" Windows tools are still based on Cygwin (like MinGW which 
is usually bundled with MSYS/MSYS2) are still based on Cygwin and 
probably still have some fork-related performance issues.  If someone 
really cared about the native build performance, a Visual C++ port might 
be work considering.

There was alsoIAR/uVisionIDEsupport in the repository for STM32.  All of 
the IAR/uVision helper tools are still present (I think), but the IAR 
board support was removed 
https://bitbucket.org/patacongo/obsoleted/src/60ec01456d8b09f5b813a5fd8865cdbd5a0ccc20/ChangeLog#lines-357


Re: Native Windows build

Posted by Brennan Ashton <ba...@brennanashton.com>.
I can probably help revive my past effort to run some native builds in CI
to at least prevent it from getting fully broken. One of the blockers last
time, was just how slow it was and the limited number of Windows workers.

Let's see what we can do.

--Brennan

On Sat, Nov 12, 2022, 5:43 AM fft <ff...@feedforward.com.cn> wrote:

> Dear all,
>
>
> Through the efforts of Petro and me ,&nbsp; NuttX Windows native build is
> finally restored again:
>
>
> https://github.com/apache/incubator-nuttx/pull/7572
> https://github.com/apache/incubator-nuttx/pull/7580
> https://github.com/apache/incubator-nuttx-apps/pull/1407
>
>
> As Alan's suggestion, is better to add Windows Native Environment build in
> CI to avoid breaking it again. but i'm not expert in ci and docker, i don't
> know how to construct a Windows environment in docker on github. If someone
> have interesting in construct Windows Native Environment ci , i can be able
> to help.
>
>
> BR,
>
> Zouboan
>
>
> ------------------&nbsp;Original&nbsp;------------------
> From: &nbsp;"Alan&nbsp;Carvalho&nbsp;de&nbsp;Assis"<acassis@gmail.com&gt;;
> Date: &nbsp;Thu, Nov 3, 2022 00:22 AM
> To: &nbsp;"dev"<dev@nuttx.apache.org&gt;;
>
> Subject: &nbsp;Re: Native Windows build
>
> &nbsp;
>
> Hi Zouboan,
>
> Unfortunately there is nobody working with Windows Native Environment
> and some time ago someone reported it was delaying about 10 minutes to
> compile NuttX.
>
> So I think it is not an issue with your tools, but with NuttX Building
> System.
>
> My suggestion is if someone fixes it we add Windows Native Environment
> build in our CI to avoid breaking it again.
>
> BR,
>
> Alan
>
> On 11/2/22, fft <fft@feedforward.com.cn&gt; wrote:
> &gt; Dear all,
> &gt;
> &gt;
> &gt; A few years ago, I successfully configure and build NuttX-8.2 in a
> native
> &gt; Windows environment (the toolchains is GNU-Win32 +
> &gt; kconfig-frontends-win32-3.12.1 + MinGW, and the host OS is both XP
> and Win7
> &gt; ) , I can even debug NuttX through Code::Blocks IDE under Windows.
> But now i
> &gt; find the NuttX can not build in native Windows environment anymore,
> the
> &gt; environment and toolchains is exactly what i had configured a few
> years ago,
> &gt; but now it failed at configure stage, I tried to fix the configure,
> but i
> &gt; found there's too many changes involved. So I have to ask, is there
> anybody
> &gt; build NuttX in native Windows environment recently? or is the issues
> of my
> &gt; toolchains?
> &gt;
> &gt;
> &gt; regards,
> &gt; Zouboan

Re: Native Windows build

Posted by fft <ff...@feedforward.com.cn>.
Dear all,


Through the efforts of Petro and me ,&nbsp; NuttX Windows native build is finally restored again:


https://github.com/apache/incubator-nuttx/pull/7572
https://github.com/apache/incubator-nuttx/pull/7580
https://github.com/apache/incubator-nuttx-apps/pull/1407


As Alan's suggestion, is better to add Windows Native Environment build in CI to avoid breaking it again. but i'm not expert in ci and docker, i don't know how to construct a Windows environment in docker on github. If someone have interesting in construct Windows Native Environment ci , i can be able to help.


BR,

Zouboan


------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"Alan&nbsp;Carvalho&nbsp;de&nbsp;Assis"<acassis@gmail.com&gt;;
Date: &nbsp;Thu, Nov 3, 2022 00:22 AM
To: &nbsp;"dev"<dev@nuttx.apache.org&gt;; 

Subject: &nbsp;Re: Native Windows build

&nbsp;

Hi Zouboan,

Unfortunately there is nobody working with Windows Native Environment
and some time ago someone reported it was delaying about 10 minutes to
compile NuttX.

So I think it is not an issue with your tools, but with NuttX Building System.

My suggestion is if someone fixes it we add Windows Native Environment
build in our CI to avoid breaking it again.

BR,

Alan

On 11/2/22, fft <fft@feedforward.com.cn&gt; wrote:
&gt; Dear all,
&gt;
&gt;
&gt; A few years ago, I successfully configure and build NuttX-8.2 in a native
&gt; Windows environment (the toolchains is GNU-Win32 +
&gt; kconfig-frontends-win32-3.12.1 + MinGW, and the host OS is both XP and Win7
&gt; ) , I can even debug NuttX through Code::Blocks IDE under Windows. But now i
&gt; find the NuttX can not build in native Windows environment anymore, the
&gt; environment and toolchains is exactly what i had configured a few years ago,
&gt; but now it failed at configure stage, I tried to fix the configure, but i
&gt; found there's too many changes involved. So I have to ask, is there anybody
&gt; build NuttX in native Windows environment recently? or is the issues of my
&gt; toolchains?
&gt;
&gt;
&gt; regards,
&gt; Zouboan

Re: Native Windows build

Posted by "Alan C. Assis" <ac...@gmail.com>.
Hi Zouboan,

Unfortunately there is nobody working with Windows Native Environment
and some time ago someone reported it was delaying about 10 minutes to
compile NuttX.

So I think it is not an issue with your tools, but with NuttX Building System.

My suggestion is if someone fixes it we add Windows Native Environment
build in our CI to avoid breaking it again.

BR,

Alan

On 11/2/22, fft <ff...@feedforward.com.cn> wrote:
> Dear all,
>
>
> A few years ago, I successfully configure and build NuttX-8.2 in a native
> Windows environment (the toolchains is GNU-Win32 +
> kconfig-frontends-win32-3.12.1 + MinGW, and the host OS is both XP and Win7
> ) , I can even debug NuttX through Code::Blocks IDE under Windows. But now i
> find the NuttX can not build in native Windows environment anymore, the
> environment and toolchains is exactly what i had configured a few years ago,
> but now it failed at configure stage, I tried to fix the configure, but i
> found there's too many changes involved. So I have to ask, is there anybody
> build NuttX in native Windows environment recently? or is the issues of my
> toolchains?
>
>
> regards,
> Zouboan