snikeguo commented on issue #12333:
URL: https://github.com/apache/nuttx/issues/12333#issuecomment-2111648315

   > @snikeguo
   > 
   > ### Steps fresh and clean install MSYS2
   > **1) Install MSYS2** https://www.msys2.org/
   > 
   > **2) Use MSYS2 MSYS shell launcher** (C:\msys64\msys2.exe)
   > 
   > (https://www.msys2.org/docs/environments/)
   > 
   > ```
   >    Update the package databases
   >   $ pacman -Syuu
   > ```
   > 
   > **3) Installing dependencies** (Always use the MSYS2 shell launcher -> 
C:\msys64\msys2.exe)
   > 
   > ```
   >  $ pacman -S --noconfirm --needed base-devel gcc gperf automake autoconf 
git python3 ncurses-devel unzip zip tio zlib-devel cmake ninja python-pip vim
   > 
   >  $ pip3 install --root-user-action=ignore --no-cache-dir pyelftools 
cxxfilt kconfiglib
   > ```
   > 
   > **4) Install a toolchain for ARM architecture and tool kconfig frontends** 
(Always use the MSYS2 shell launcher -> C:\msys64\msys2.exe)
   > 
   > ```
   >    $ mkdir -p nuttxspace
   > 
   >    $ cd nuttxspace
   > ```
   > 
   > Copy the attached script 
**[install_tools.txt](https://github.com/apache/nuttx/files/15311594/install_tools.txt)**
 (change extension .txt -> .sh )to the **nuttxspace** folder and run
   > 
   > ```
   >    $ ./install_tools.sh
   > ```
   > 
   > **This command must run in every terminal window**
   > 
   > ```
   >    $ source ./tools/env.sh
   > ```
   > 
   > Check the compiler version you have already installed.
   > 
   > ```
   >    $ arm-none-eabi-gcc --version
   > ```
   > 
   > **5) Clone git repositories**
   > 
   > ```
   >    $ git clone https://github.com/apache/nuttx.git nuttx
   >    
   >    $ git clone https://github.com/apache/nuttx-apps apps
   > ```
   > 
   > **6) Initialize Configuration and Build NuttX** (Always use the MSYS2 
shell launcher -> C:\msys64\msys2.exe)
   > 
   > ```
   >    $ cd nuttx
   >    
   >    $ ./tools/configure.sh -g stm32f4discovery:nsh
   >      ( where :
   >        -g selects the Windows host and MSYS environment
   >        stm32f4discovery:nsh -> <board name>:<board configuration>) 
   > ```
   > 
   > You can then customize this configuration
   > 
   > ```
   >    $ make menuconfig
   > ```
   > 
   > Build NuttX (you can pass the -jN flag to make, where N is the number of 
parallel jobs
   > 
   > ```
   >    $ make V=1 -j 2
   > ```
   > 
   > To clean the build, you can do:
   > 
   > ```
   >   $ make clean -j 2
   > ```
   > 
   > Build NuttX for new board
   > 
   > first run
   > 
   > ```
   >    $ make distclean -j 2
   >    (It removes the configuration of the previous board)
   > ```
   > 
   > after running the command (start of step 6)
   > 
   > ```
   >    $ ./tools/configure.sh -g <board name>:<board configuration>
   > ```
   
   
![image](https://github.com/apache/nuttx/assets/20830435/ee948e66-f2ea-4e47-b715-61a87299aac3)
   thank you very  much!!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to