apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.91k stars 1.19k forks source link

make menuconfig failed #12333

Open snikeguo opened 6 months ago

snikeguo commented 6 months ago

platform: windows10+msys2+kconfig-frontends-win32-3.12.1.zip(kconfig-mconf.exe)

  1. ./tools/configure.sh -L | less
  2. ./tools/configure.sh -l stm32f4discovery:nsh
  3. make menuconfig
CP: arch/dummy/Kconfig to /d/Project/OpenSouceProject/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /d/Project/OpenSouceProject/nuttx/boards/dummy/dummy_kconfig
LN: include/arch to arch/arm/include
LN: include/arch/board to /d/Project/OpenSouceProject/nuttx/boards/arm/stm32/stm32f4discovery/include
LN: drivers/platform to /d/Project/OpenSouceProject/nuttx/drivers/dummy
LN: include/arch/chip to /d/Project/OpenSouceProject/nuttx/arch/arm/include/stm32
LN: arch/arm/src/chip to /d/Project/OpenSouceProject/nuttx/arch/arm/src/stm32
LN: arch/arm/src/board to /d/Project/OpenSouceProject/nuttx/boards/arm/stm32/stm32f4discovery/../common
LN: arch/arm/src/board/board to /d/Project/OpenSouceProject/nuttx/boards/arm/stm32/stm32f4discovery/src
arch/arm/src/imxrt/Kconfig:2568: syntax error
arch/arm/src/imxrt/Kconfig:2567: invalid option
arch/arm/src/rp2040/Kconfig:302: syntax error
arch/arm/src/rp2040/Kconfig:294: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:267: missing end statement for this entry
arch/arm/Kconfig:1514: missing end statement for this entry
arch/arm/Kconfig:7: missing end statement for this entry
Kconfig:2467: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:301: invalid statement
arch/arm/src/rp2040/Kconfig:310: unexpected end statement
arch/arm/src/rp2040/Kconfig:316: unexpected end statement
arch/arm/src/rp2040/Kconfig:333: syntax error
arch/arm/src/rp2040/Kconfig:325: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:332: invalid statement
arch/arm/src/rp2040/Kconfig:341: unexpected end statement
arch/arm/src/rp2040/Kconfig:347: unexpected end statement
arch/arm/src/rp2040/Kconfig:364: syntax error
arch/arm/src/rp2040/Kconfig:356: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:363: invalid statement
arch/arm/src/rp2040/Kconfig:372: unexpected end statement
arch/arm/src/rp2040/Kconfig:378: unexpected end statement
arch/arm/src/rp2040/Kconfig:398: syntax error
arch/arm/src/rp2040/Kconfig:388: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:397: invalid statement
arch/arm/src/rp2040/Kconfig:406: unexpected end statement
arch/arm/src/rp2040/Kconfig:412: unexpected end statement
arch/arm/src/rp2040/Kconfig:429: syntax error
arch/arm/src/rp2040/Kconfig:421: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:428: invalid statement
arch/arm/src/rp2040/Kconfig:437: unexpected end statement
arch/arm/src/rp2040/Kconfig:443: unexpected end statement
arch/arm/src/rp2040/Kconfig:460: syntax error
arch/arm/src/rp2040/Kconfig:452: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:459: invalid statement
arch/arm/src/rp2040/Kconfig:468: unexpected end statement
arch/arm/src/rp2040/Kconfig:474: unexpected end statement
arch/arm/src/rp2040/Kconfig:491: syntax error
arch/arm/src/rp2040/Kconfig:483: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:490: invalid statement
arch/arm/src/rp2040/Kconfig:499: unexpected end statement
arch/arm/src/rp2040/Kconfig:505: unexpected end statement
arch/arm/src/rp2040/Kconfig:522: syntax error
arch/arm/src/rp2040/Kconfig:514: missing end statement for this entry
arch/arm/src/rp2040/Kconfig:521: invalid statement
arch/arm/src/rp2040/Kconfig:532: unexpected end statement
arch/arm/src/rp2040/Kconfig:538: unexpected end statement
arch/arm/src/rp2040/Kconfig:540: unexpected end statement
arch/arm/Kconfig:1515: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5369: syntax error
arch/arm/src/stm32l4/Kconfig:5355: missing end statement for this entry
arch/arm/src/stm32l4/Kconfig:5199: missing end statement for this entry
arch/arm/src/stm32l4/Kconfig:8: missing end statement for this entry
arch/arm/Kconfig:1544: missing end statement for this entry
arch/arm/src/stm32l4/Kconfig:5368: invalid statement
arch/arm/src/stm32l4/Kconfig:5379: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5393: syntax error
arch/arm/src/stm32l4/Kconfig:5392: invalid statement
arch/arm/src/stm32l4/Kconfig:5403: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5417: syntax error
arch/arm/src/stm32l4/Kconfig:5416: invalid statement
arch/arm/src/stm32l4/Kconfig:5427: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5430: syntax error
arch/arm/src/stm32l4/Kconfig:5429: invalid statement
arch/arm/src/stm32l4/Kconfig:5445: syntax error
arch/arm/src/stm32l4/Kconfig:5444: invalid statement
arch/arm/src/stm32l4/Kconfig:5455: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5457: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5460: syntax error
arch/arm/src/stm32l4/Kconfig:5459: invalid statement
arch/arm/src/stm32l4/Kconfig:5475: syntax error
arch/arm/src/stm32l4/Kconfig:5474: invalid statement
arch/arm/src/stm32l4/Kconfig:5485: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5487: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5490: syntax error
arch/arm/src/stm32l4/Kconfig:5489: invalid statement
arch/arm/src/stm32l4/Kconfig:5505: syntax error
arch/arm/src/stm32l4/Kconfig:5504: invalid statement
arch/arm/src/stm32l4/Kconfig:5515: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5517: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5519: unexpected end statement
arch/arm/src/stm32l4/Kconfig:5521: unexpected end statement
arch/arm/src/stm32l4/Kconfig:6397: unexpected end statement
arch/arm/Kconfig:1545: unexpected end statement
arch/arm/Kconfig:1591: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:529: syntax error
arch/risc-v/src/common/espressif/Kconfig:528: invalid option
arch/risc-v/src/common/espressif/Kconfig:553: syntax error
arch/risc-v/src/common/espressif/Kconfig:552: invalid option
arch/risc-v/src/common/espressif/Kconfig:577: syntax error
arch/risc-v/src/common/espressif/Kconfig:576: invalid option
arch/risc-v/src/common/espressif/Kconfig:601: syntax error
arch/risc-v/src/common/espressif/Kconfig:600: invalid option
arch/risc-v/src/common/espressif/Kconfig:633: syntax error
arch/risc-v/src/common/espressif/Kconfig:512: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:8: missing end statement for this entry
arch/risc-v/src/esp32c3/Kconfig:8: missing end statement for this entry
arch/risc-v/Kconfig:613: missing end statement for this entry
arch/risc-v/Kconfig:7: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:632: invalid statement
arch/risc-v/src/common/espressif/Kconfig:642: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:644: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:708: unexpected end statement
arch/risc-v/src/esp32c3/Kconfig:10: unexpected end statement
arch/risc-v/Kconfig:614: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:529: syntax error
arch/risc-v/src/common/espressif/Kconfig:528: invalid option
arch/risc-v/src/common/espressif/Kconfig:553: syntax error
arch/risc-v/src/common/espressif/Kconfig:552: invalid option
arch/risc-v/src/common/espressif/Kconfig:577: syntax error
arch/risc-v/src/common/espressif/Kconfig:576: invalid option
arch/risc-v/src/common/espressif/Kconfig:601: syntax error
arch/risc-v/src/common/espressif/Kconfig:600: invalid option
arch/risc-v/src/common/espressif/Kconfig:633: syntax error
arch/risc-v/src/common/espressif/Kconfig:512: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:8: missing end statement for this entry
arch/risc-v/src/esp32c6/Kconfig:8: missing end statement for this entry
arch/risc-v/Kconfig:616: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:632: invalid statement
arch/risc-v/src/common/espressif/Kconfig:642: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:644: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:708: unexpected end statement
arch/risc-v/src/esp32c6/Kconfig:42: unexpected end statement
arch/risc-v/Kconfig:617: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:529: syntax error
arch/risc-v/src/common/espressif/Kconfig:528: invalid option
arch/risc-v/src/common/espressif/Kconfig:553: syntax error
arch/risc-v/src/common/espressif/Kconfig:552: invalid option
arch/risc-v/src/common/espressif/Kconfig:577: syntax error
arch/risc-v/src/common/espressif/Kconfig:576: invalid option
arch/risc-v/src/common/espressif/Kconfig:601: syntax error
arch/risc-v/src/common/espressif/Kconfig:600: invalid option
arch/risc-v/src/common/espressif/Kconfig:633: syntax error
arch/risc-v/src/common/espressif/Kconfig:512: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:8: missing end statement for this entry
arch/risc-v/src/esp32h2/Kconfig:8: missing end statement for this entry
arch/risc-v/Kconfig:619: missing end statement for this entry
arch/risc-v/src/common/espressif/Kconfig:632: invalid statement
arch/risc-v/src/common/espressif/Kconfig:642: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:644: unexpected end statement
arch/risc-v/src/common/espressif/Kconfig:708: unexpected end statement
arch/risc-v/src/esp32h2/Kconfig:10: unexpected end statement
arch/risc-v/Kconfig:620: unexpected end statement
arch/risc-v/Kconfig:648: unexpected end statement
Kconfig:2469: unexpected end statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:289: syntax error
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:177: missing end statement for this entry
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:8: missing end statement for this entry
boards/Kconfig:3970: missing end statement for this entry
Kconfig:2471: missing end statement for this entry
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:288: invalid statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:332: syntax error
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:331: invalid statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:375: syntax error
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:374: invalid statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:413: unexpected end statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:414: unexpected end statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:415: unexpected end statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:417: unexpected end statement
boards/arm/stm32wl5/nucleo-wl55jc/Kconfig:570: unexpected end statement
boards/Kconfig:3971: unexpected end statement
boards/sim/sim/sim/Kconfig:52: syntax error
boards/sim/sim/sim/Kconfig:51: invalid option
boards/arm/rp2040/common/Kconfig:275: syntax error
boards/arm/rp2040/common/Kconfig:265: missing end statement for this entry
boards/Kconfig:4484: missing end statement for this entry
boards/Kconfig:4453: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:274: invalid statement
boards/arm/rp2040/common/Kconfig:285: unexpected end statement
boards/arm/rp2040/common/Kconfig:287: unexpected end statement
boards/arm/rp2040/common/Kconfig:303: syntax error
boards/arm/rp2040/common/Kconfig:293: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:302: invalid statement
boards/arm/rp2040/common/Kconfig:313: unexpected end statement
boards/arm/rp2040/common/Kconfig:315: unexpected end statement
boards/arm/rp2040/common/Kconfig:331: syntax error
boards/arm/rp2040/common/Kconfig:321: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:330: invalid statement
boards/arm/rp2040/common/Kconfig:341: unexpected end statement
boards/arm/rp2040/common/Kconfig:343: unexpected end statement
boards/arm/rp2040/common/Kconfig:359: syntax error
boards/arm/rp2040/common/Kconfig:349: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:358: invalid statement
boards/arm/rp2040/common/Kconfig:369: unexpected end statement
boards/arm/rp2040/common/Kconfig:371: unexpected end statement
boards/arm/rp2040/common/Kconfig:387: syntax error
boards/arm/rp2040/common/Kconfig:377: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:386: invalid statement
boards/arm/rp2040/common/Kconfig:397: unexpected end statement
boards/arm/rp2040/common/Kconfig:399: unexpected end statement
boards/arm/rp2040/common/Kconfig:415: syntax error
boards/arm/rp2040/common/Kconfig:405: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:414: invalid statement
boards/arm/rp2040/common/Kconfig:425: unexpected end statement
boards/arm/rp2040/common/Kconfig:427: unexpected end statement
boards/arm/rp2040/common/Kconfig:443: syntax error
boards/arm/rp2040/common/Kconfig:433: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:442: invalid statement
boards/arm/rp2040/common/Kconfig:453: unexpected end statement
boards/arm/rp2040/common/Kconfig:455: unexpected end statement
boards/arm/rp2040/common/Kconfig:471: syntax error
boards/arm/rp2040/common/Kconfig:461: missing end statement for this entry
boards/arm/rp2040/common/Kconfig:470: invalid statement
boards/arm/rp2040/common/Kconfig:481: unexpected end statement
boards/arm/rp2040/common/Kconfig:483: unexpected end statement
boards/Kconfig:4485: unexpected end statement
boards/Kconfig:4495: unexpected end statement
Kconfig:2473: unexpected end statement
sched/Kconfig:980: syntax error
sched/Kconfig:979: invalid option
drivers/note/Kconfig:22: syntax error
drivers/note/Kconfig:21: invalid option
drivers/sensors/Kconfig:576: syntax error
drivers/sensors/Kconfig:575: invalid option
drivers/syslog/Kconfig:338: syntax error
drivers/syslog/Kconfig:337: invalid option
net/Kconfig:158: syntax error
net/Kconfig:157: invalid option
net/Kconfig:173: syntax error
net/Kconfig:172: invalid option
net/pkt/Kconfig:57: syntax error
net/pkt/Kconfig:56: invalid option
net/can/Kconfig:67: syntax error
net/can/Kconfig:66: invalid option
net/netlink/Kconfig:59: syntax error
net/netlink/Kconfig:58: invalid option
net/tcp/Kconfig:87: syntax error
net/tcp/Kconfig:86: invalid option
net/udp/Kconfig:72: syntax error
net/udp/Kconfig:71: invalid option
net/bluetooth/Kconfig:59: syntax error
net/bluetooth/Kconfig:58: invalid option
net/ieee802154/Kconfig:70: syntax error
net/ieee802154/Kconfig:69: invalid option
net/icmp/Kconfig:82: syntax error
net/icmp/Kconfig:81: invalid option
net/icmpv6/Kconfig:273: syntax error
net/icmpv6/Kconfig:272: invalid option
net/usrsock/Kconfig:65: syntax error
net/usrsock/Kconfig:64: invalid option
mm/Kconfig:242: syntax error
mm/Kconfig:241: invalid option
mm/Kconfig:358: syntax error
mm/Kconfig:357: invalid option
mm/Kconfig:364: syntax error
mm/Kconfig:363: invalid option
Kconfig:2533: can't open file "../apps/Kconfig"
make: *** [tools/Unix.mk:694: menuconfig] Error 1

image

acassis commented 6 months ago

@snikeguo what Kconfig frontends are you using?

Mine is 4.11:

$ apt info kconfig-frontends
Package: kconfig-frontends
Version: 4.11.0.1+dfsg-6

Alternatively you can try to use python3-kconfiglib, although I don't like kconfiglib because it cannot search for symbols when you start it with CONFIG and the symbol name, where kconfig-frontends support with or without CONFIG

simbit18 commented 6 months ago

@snikeguo here version in use in nuttx

kconfig-frontends for msys2 on the MSYS environment

--enable-mconf option will enable the menuconfig

snikeguo commented 6 months ago

@snikeguo what Kconfig frontends are you using?

Mine is 4.11:

$ apt info kconfig-frontends
Package: kconfig-frontends
Version: 4.11.0.1+dfsg-6

Alternatively you can try to use python3-kconfiglib, although I don't like kconfiglib because it cannot search for symbols when you start it with CONFIG and the symbol name, where kconfig-frontends support with or without CONFIG

image

 /d/DirMove/Downloads/kconfig-frontends-4.11.0.1
# ./configure && make
configure: loading site script /etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 262144
checking how to convert x86_64-pc-msys file names to x86_64-pc-msys format... func_convert_file_noop
checking how to convert x86_64-pc-msys file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-msys/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... no
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for inline... inline
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for gperf... gperf
checking for the type used in gperf declarations... size_t
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether gettext is declared... yes
checking for library containing gettext... -lintl
checking ncursesw/curses.h usability... yes
checking ncursesw/curses.h presence... yes
checking for ncursesw/curses.h... yes
checking for library containing setupterm... no
checking for library containing initscr... -lncursesw
checking for library containing new_panel... -lpanelw
checking for library containing menu_init... -lmenuw
checking for gtk... no
checking for Qt5... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libs/parser/kconfig-parser.pc
config.status: creating scripts/.autostuff/config.h
config.status: scripts/.autostuff/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
configure: Configured with:
configure: - parser library     : static
configure:   - root-menu prompt : Configuration
configure:   - config prefix    : CONFIG_
configure: - frontends          : kconfig conf mconf nconf
configure:   - localised        : yes
configure: - install utilities  : yes
configure: - CFLAGS CXXFLAGS    : -Wall
make  all-am
make[1]: Entering directory '/d/DirMove/Downloads/kconfig-frontends-4.11.0.1'
  CC       libs/parser/libs_parser_libkconfig_parser_la-yconf.lo
In file included from libs/parser/yconf.c:252:
libs/parser/hconf.gperf:153:1: error: conflicting types for ‘kconf_id_lookup’; have ‘const struct kconf_id *(const char *, unsigned int)’
libs/parser/hconf.gperf:12:31: note: previous declaration of ‘kconf_id_lookup’ with type ‘const struct kconf_id *(const char *, size_t)’ {aka ‘const struct kconf_id *(const char *, long unsigned int)’}
   12 | static const struct kconf_id *kconf_id_lookup(register const char *str, register GPERF_LEN_TYPE len);
      |                               ^~~~~~~~~~~~~~~
In file included from libs/parser/yconf.c:80:
libs/parser/confdata.c: In function ‘conf_expand_value’:
libs/parser/confdata.c:97:32: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   97 |                 while (isalnum(*src) || *src == '_')
      |                                ^~~~
libs/parser/confdata.c: In function ‘conf_set_sym_val’:
libs/parser/confdata.c:155:54: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  155 |                         for (p2 = p; *p2 && !isspace(*p2); p2++)
      |                                                      ^~~
libs/parser/expr.c: In function ‘expr_parse_string’:
libs/parser/expr.c:913:63: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  913 |         return !errno && !*tail && tail > str && isxdigit(tail[-1])
      |                                                           ~~~~^~~~
libs/parser/symbol.c: In function ‘sym_expand_string_value’:
libs/parser/symbol.c:924:32: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  924 |                 while (isalnum(*src) || *src == '_')
      |                                ^~~~
libs/parser/menu.c: In function ‘menu_add_prop’:
libs/parser/menu.c:137:29: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  137 |                 if (isspace(*prompt)) {
      |                             ^~~~~~~
libs/parser/menu.c:139:40: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  139 |                         while (isspace(*prompt))
      |                                        ^~~~~~~
make[1]: *** [Makefile:1404: libs/parser/libs_parser_libkconfig_parser_la-yconf.lo] Error 1
make[1]: Leaving directory '/d/DirMove/Downloads/kconfig-frontends-4.11.0.1'
make: *** [Makefile:889: all] Error 2
snikeguo commented 6 months ago

@snikeguo here version in use in nuttx

kconfig-frontends for msys2 on the MSYS environment

--enable-mconf option will enable the menuconfig

how to use? I tried such a command, but it still doesn't work:

cd /nuttx/tools/ci/platforms
./msys2.sh
+ install_build_tools
+ mkdir -p ''
mkdir: cannot create directory ‘’: No such file or directory

image

snikeguo commented 6 months ago

By the way, can you support ConMenu?

https://download-redirect.rt-thread.org/download/env_release/env-windows-1.5.0.7z image

image

simbit18 commented 6 months ago

@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 (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>
acassis commented 6 months ago

@snikeguo ConMenu is not an independent open-source project like kconfig-frontends, it seems like a RT-Thread only thing. I found a ConMenu independent project here: https://github.com/meznaric/conmenu but it is something else.

Kconfig works fine on Linux, Windows, Mac, BSDs, etc. On Windows you can also use WSL/WSL2, it works fine and is faster then Cygwin/MSYS2.

snikeguo commented 6 months ago

@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 (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 thank you very much!!

snikeguo commented 6 months ago

@simbit18 when i enter 'make menuconfig' again

# make menuconfig
CP: arch/dummy/Kconfig to /d/Project/nuttxspace/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /d/Project/nuttxspace/nuttx//Kconfig
LN: platform/board to /d/Project/nuttxspace/apps/platform/dummy
LN: include/arch to arch/arm/include
LN: include/arch/board to /d/Project/nuttxspace/nuttx//include
ln: failed to create symbolic link 'include/arch/board' -> '/d/Project/nuttxspace/nuttx//include': File name too long
Failed to create link: include/arch/board
make[1]: *** [tools/Unix.mk:294: include/arch/board] Error 1
make: *** [tools/Unix.mk:693: menuconfig] Error 2
simbit18 commented 6 months ago

@snikeguo Which environment are you using ?

https://www.msys2.org/docs/environments/

nuttx is currently used on MSYS environment

The MSYS environment contains the unix-like/cygwin based tools, lives under /usr and is special in that it is always active. All the other environments inherit from the MSYS environment and add various things on top of it.

type on terminal window $ uname -s

what do you see? MINGW64_NT- or MSYS_NT- ?

then I remind you to do:

clean the build,

$ make clean -j 2

for new board

$ make distclean -j 2 (It removes the configuration of the previous board)

snikeguo commented 6 months ago

@snikeguo Which environment are you using ?

https://www.msys2.org/docs/environments/

nuttx is currently used on MSYS environment

The MSYS environment contains the unix-like/cygwin based tools, lives under /usr and is special in that it is always active. All the other environments inherit from the MSYS environment and add various things on top of it.

type on terminal window $ uname -s

what do you see? MINGW64_NT- or MSYS_NT- ?

then I remind you to do:

clean the build,

$ make clean -j 2

for new board

$ make distclean -j 2 (It removes the configuration of the previous board)

uname -a
MINGW64_NT-10.0-19043 P30008850002A 3.5.3.x86_64 2024-05-06 06:45 UTC x86_64 Msys
simbit18 commented 6 months ago

you need to use MSYS environment C:\msys64\msys2.exe

msys2

snikeguo commented 6 months ago

you need to use MSYS environment C:\msys64\msys2.exe

msys2

zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx

make menuconfig

CP: arch/dummy/Kconfig to /d/Project/nuttxspace/nuttx/arch/dummy/dummy_kconfig CP: boards/dummy/Kconfig to /d/Project/nuttxspace/nuttx//Kconfig LN: platform/board to /d/Project/nuttxspace/apps/platform/dummy LN: include/arch to arch/arm/include LN: include/arch/board to /d/Project/nuttxspace/nuttx//include ln: failed to create symbolic link 'include/arch/board' -> '/d/Project/nuttxspace/nuttx//include': File name too long Failed to create link: include/arch/board make[1]: [tools/Unix.mk:294: include/arch/board] Error 1 make: [tools/Unix.mk:693: menuconfig] Error 2

zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx

uname -a

MINGW32_NT-10.0-19043 P30008850002A 3.5.3.x86_64 2024-05-06 06:45 UTC x86_64 Msys

snikeguo commented 6 months ago

you need to use MSYS environment C:\msys64\msys2.exe msys2

zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx

make menuconfig

CP: arch/dummy/Kconfig to /d/Project/nuttxspace/nuttx/arch/dummy/dummy_kconfig CP: boards/dummy/Kconfig to /d/Project/nuttxspace/nuttx//Kconfig LN: platform/board to /d/Project/nuttxspace/apps/platform/dummy LN: include/arch to arch/arm/include LN: include/arch/board to /d/Project/nuttxspace/nuttx//include ln: failed to create symbolic link 'include/arch/board' -> '/d/Project/nuttxspace/nuttx//include': File name too long Failed to create link: include/arch/board make[1]: [tools/Unix.mk:294: include/arch/board] Error 1 make: [tools/Unix.mk:693: menuconfig] Error 2

zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx

uname -a

MINGW32_NT-10.0-19043 P30008850002A 3.5.3.x86_64 2024-05-06 06:45 UTC x86_64 Msys

snikeguo commented 6 months ago

you need to use MSYS environment C:\msys64\msys2.exe msys2

> 
> zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx
> 
> # make menuconfig
# make menuconfig
CP: arch/dummy/Kconfig to /d/Project/nuttxspace/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /d/Project/nuttxspace/nuttx//Kconfig
LN: platform/board to /d/Project/nuttxspace/apps/platform/dummy
LN: include/arch to arch/arm/include
LN: include/arch/board to /d/Project/nuttxspace/nuttx//include
ln: failed to create symbolic link 'include/arch/board' -> '/d/Project/nuttxspace/nuttx//include': File name too long
Failed to create link: include/arch/board
make[1]: *** [tools/Unix.mk:294: include/arch/board] Error 1
make: *** [tools/Unix.mk:693: menuconfig] Error 2

> 
> zrwbgy10@P30008850002A MINGW32 /d/Project/nuttxspace/nuttx
> 
> # uname -a
> MINGW32_NT-10.0-19043 P30008850002A 3.5.3.x86_64 2024-05-06 06:45 UTC x86_64 Msys
snikeguo commented 6 months ago

you need to use MSYS environment C:\msys64\msys2.exe msys2

 make menuconfig
CP: arch/dummy/Kconfig to /d/Project/nuttxspace/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /d/Project/nuttxspace/nuttx//Kconfig
LN: platform/board to /d/Project/nuttxspace/apps/platform/dummy
LN: include/arch to arch/arm/include
LN: include/arch/board to /d/Project/nuttxspace/nuttx//include
ln: failed to create symbolic link 'include/arch/board' -> '/d/Project/nuttxspace/nuttx//include': File name too long
Failed to create link: include/arch/board
make[1]: *** [tools/Unix.mk:294: include/arch/board] Error 1
make: *** [tools/Unix.mk:693: menuconfig] Error 2

uname -a
MINGW32_NT-10.0-19043 P30008850002A 3.5.3.x86_64 2024-05-06 06:45 UTC x86_64 Msys
simbit18 commented 6 months ago

@snikeguo you are not yet using the MSYS environment

path MSYS environment -> C:\msys64\msys2.exe

MSYS_environment

$ uname -a MSYS_NT-10.0-19045

after that I recommend that you remove the contents of the nuttxspace folder and repeat the steps

https://github.com/apache/nuttx/issues/12333#issuecomment-2110187514

tommasoclini commented 5 months ago

Or... just use linux

acassis commented 5 months ago

Or... just use linux

Although I liked the joke, it is nice to have NuttX building on Windows. This is why we have CI with Windows to guarantee it still working when someone modify something.