Skip to content

Conversation

@lupyuen
Copy link
Member

@lupyuen lupyuen commented Mar 21, 2025

Summary

This PR fixes the endchoice and help in the Kconfig for fbcon

This patch will fix these build errors:

apps/examples/fbcon/Kconfig:62: syntax error
apps/examples/fbcon/Kconfig:172: unknown option "---help--"

https://github.com/lupyuen/nuttx-riscv64/actions/runs/13981663903/job/39147989438#step:5:158

Impact

This PR will fix the build errors for various NuttX Targets, e.g. rv-virt:nsh

Screenshot 2025-03-21 at 9 40 36 AM

Testing

Tested with local build of rv-virt:nsh on macOS.

This PR fixes the `endchoice` and `help` in the Kconfig for fbcon
- apache#3029 (comment)

This patch will fix these build errors:
```text
apps/examples/fbcon/Kconfig:62: syntax error
apps/examples/fbcon/Kconfig:172: unknown option "---help--"
```
https://github.com/lupyuen/nuttx-riscv64/actions/runs/13981663903/job/39147989438#step:5:158

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lupyuen :-) That fixes build problem introduced by #3029 at ./tools/configure.sh stage other builds now works again :-)

Regarding the fbcon setup some documentation is required and Kconfig dependencies update but this is out of the scope of this fix :-)

Before:

% ./tools/configure.sh -B esp32c3-devkit:lvgl
  Copy files
  Select CONFIG_HOST_BSD=y
  Refreshing...
CP: arch/dummy/Kconfig to /XXX/nuttx.git/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /XXX/nuttx.git/boards/dummy/dummy_kconfig
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
LN: include/arch to arch/risc-v/include
LN: include/arch/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/include
LN: drivers/platform to /XXX/nuttx.git/drivers/dummy
LN: include/arch/chip to /XXX/nuttx.git/arch/risc-v/include/esp32c3-legacy
LN: arch/risc-v/src/chip to /XXX/nuttx.git/arch/risc-v/src/esp32c3-legacy
LN: arch/risc-v/src/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common
LN: arch/risc-v/src/board/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src
mkkconfig in /XXX/nuttx-apps.git/audioutils
mkkconfig in /XXX/nuttx-apps.git/benchmarks
mkkconfig in /XXX/nuttx-apps.git/boot
mkkconfig in /XXX/nuttx-apps.git/canutils
mkkconfig in /XXX/nuttx-apps.git/crypto
mkkconfig in /XXX/nuttx-apps.git/database
mkkconfig in /XXX/nuttx-apps.git/examples/mcuboot
mkkconfig in /XXX/nuttx-apps.git/examples/module
mkkconfig in /XXX/nuttx-apps.git/examples/rust
mkkconfig in /XXX/nuttx-apps.git/examples/sotest
mkkconfig in /XXX/nuttx-apps.git/examples
mkkconfig in /XXX/nuttx-apps.git/fsutils
mkkconfig in /XXX/nuttx-apps.git/games
mkkconfig in /XXX/nuttx-apps.git/graphics
mkkconfig in /XXX/nuttx-apps.git/industry
mkkconfig in /XXX/nuttx-apps.git/inertial
mkkconfig in /XXX/nuttx-apps.git/interpreters/luamodules
mkkconfig in /XXX/nuttx-apps.git/interpreters
mkkconfig in /XXX/nuttx-apps.git/logging
mkkconfig in /XXX/nuttx-apps.git/lte
mkkconfig in /XXX/nuttx-apps.git/math
mkkconfig in /XXX/nuttx-apps.git/mlearning
mkkconfig in /XXX/nuttx-apps.git/netutils
mkkconfig in /XXX/nuttx-apps.git/sdr
mkkconfig in /XXX/nuttx-apps.git/system
mkkconfig in /XXX/nuttx-apps.git/testing/arch
mkkconfig in /XXX/nuttx-apps.git/testing/cxx
mkkconfig in /XXX/nuttx-apps.git/testing/drivers
mkkconfig in /XXX/nuttx-apps.git/testing/fs
mkkconfig in /XXX/nuttx-apps.git/testing/libc
mkkconfig in /XXX/nuttx-apps.git/testing/mm
mkkconfig in /XXX/nuttx-apps.git/testing/sched
mkkconfig in /XXX/nuttx-apps.git/testing
mkkconfig in /XXX/nuttx-apps.git/videoutils
mkkconfig in /XXX/nuttx-apps.git/wireless/bluetooth
mkkconfig in /XXX/nuttx-apps.git/wireless/ieee802154
mkkconfig in /XXX/nuttx-apps.git/wireless
mkkconfig in /XXX/nuttx-apps.git
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:62: syntax error
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:51: missing end statement for this entry
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:23: missing end statement for this entry
/XXX/nuttx-apps.git/examples/Kconfig:8: missing end statement for this entry
Kconfig:2785: missing end statement for this entry
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:61: invalid statement
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:62: unexpected option "prompt"
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:63: unexpected option "depends"
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:64: invalid statement
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:65:warning: ignoring unsupported character ':'
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:65: unknown statement "Note"
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:95: unexpected end statement
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:96: unexpected end statement
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:173: syntax error
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:172: unknown option "---help--"
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:173: unknown option "Decode"
/XXX/nuttx-apps.git/examples/fbcon/Kconfig:205: unexpected end statement
/XXX/nuttx-apps.git/examples/Kconfig:211: unexpected end statement
Kconfig:2787: unexpected end statement
gmake: *** [tools/Unix.mk:726: olddefconfig] Error 1
ERROR: failed to refresh

After:

% ./tools/configure.sh -B esp32c3-devkit:lvgl
  Copy files
  Select CONFIG_HOST_BSD=y
  Refreshing...
CP: arch/dummy/Kconfig to /XXX/nuttx.git/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /XXX/nuttx.git/boards/dummy/dummy_kconfig
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
LN: include/arch to arch/risc-v/include
LN: include/arch/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/include
LN: drivers/platform to /XXX/nuttx.git/drivers/dummy
LN: include/arch/chip to /XXX/nuttx.git/arch/risc-v/include/esp32c3-legacy
LN: arch/risc-v/src/chip to /XXX/nuttx.git/arch/risc-v/src/esp32c3-legacy
LN: arch/risc-v/src/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common
LN: arch/risc-v/src/board/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src
mkkconfig in /XXX/nuttx-apps.git/audioutils
mkkconfig in /XXX/nuttx-apps.git/benchmarks
mkkconfig in /XXX/nuttx-apps.git/boot
mkkconfig in /XXX/nuttx-apps.git/canutils
mkkconfig in /XXX/nuttx-apps.git/crypto
mkkconfig in /XXX/nuttx-apps.git/database
mkkconfig in /XXX/nuttx-apps.git/examples/mcuboot
mkkconfig in /XXX/nuttx-apps.git/examples/module
mkkconfig in /XXX/nuttx-apps.git/examples/rust
mkkconfig in /XXX/nuttx-apps.git/examples/sotest
mkkconfig in /XXX/nuttx-apps.git/examples
mkkconfig in /XXX/nuttx-apps.git/fsutils
mkkconfig in /XXX/nuttx-apps.git/games
mkkconfig in /XXX/nuttx-apps.git/graphics
mkkconfig in /XXX/nuttx-apps.git/industry
mkkconfig in /XXX/nuttx-apps.git/inertial
mkkconfig in /XXX/nuttx-apps.git/interpreters/luamodules
mkkconfig in /XXX/nuttx-apps.git/interpreters
mkkconfig in /XXX/nuttx-apps.git/logging
mkkconfig in /XXX/nuttx-apps.git/lte
mkkconfig in /XXX/nuttx-apps.git/math
mkkconfig in /XXX/nuttx-apps.git/mlearning
mkkconfig in /XXX/nuttx-apps.git/netutils
mkkconfig in /XXX/nuttx-apps.git/sdr
mkkconfig in /XXX/nuttx-apps.git/system
mkkconfig in /XXX/nuttx-apps.git/testing/arch
mkkconfig in /XXX/nuttx-apps.git/testing/cxx
mkkconfig in /XXX/nuttx-apps.git/testing/drivers
mkkconfig in /XXX/nuttx-apps.git/testing/fs
mkkconfig in /XXX/nuttx-apps.git/testing/libc
mkkconfig in /XXX/nuttx-apps.git/testing/mm
mkkconfig in /XXX/nuttx-apps.git/testing/sched
mkkconfig in /XXX/nuttx-apps.git/testing
mkkconfig in /XXX/nuttx-apps.git/videoutils
mkkconfig in /XXX/nuttx-apps.git/wireless/bluetooth
mkkconfig in /XXX/nuttx-apps.git/wireless/ieee802154
mkkconfig in /XXX/nuttx-apps.git/wireless
mkkconfig in /XXX/nuttx-apps.git
#
# configuration written to .config
#

% gmake -j8 CROSSDEV=riscv32-esp-elf-
Create version.h
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
Register: nsh
Register: sh
Register: lvgldemo
CC:  /XXX/nuttx-apps.git/graphics/lvgl/lvgl/demos/benchmark/assets/lv_font_benchmark_montserrat_12_compr_az.cCC:  /XXX/nuttx-apps.git/graphics/lvgl/lvgl/demos/benchmark/assets/lv_font_benchmark_montserrat_16_compr_az.cCC:  /XXX/nuttx-apps.git/graphics/lvgl/lvgl/demos/benchmark/assets/lv_font_benchmark_montserrat_28_compr_az.cCC:  /XXX/nuttx-apps.git/graphics/lvgl/lvgl/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africaCPP:  /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common/scripts/esp32c3_rom.ld-> /zraid/daCPP:  /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common/scripts/flat_memory.ld-> /zraid/daCPP:  /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common/scripts/legacy_sections.ld-> /zraiLD: nuttx
Memory region         Used Size  Region Size  %age Used
     iram0_0_seg:        6608 B     321296 B      2.06%
     irom0_0_seg:      305258 B    4194272 B      7.28%
     dram0_0_seg:       18080 B     321296 B      5.63%
     drom0_0_seg:      508524 B    4194272 B     12.12%
         rtc_seg:          0 GB         8 KB      0.00%
CP: nuttx.hex
MKIMAGE: ESP32-C3 binary
esptool.py -c esp32c3 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
esptool.py v4.8.1
Creating esp32c3 image...
Merged 1 ELF section
Successfully created esp32c3 image.
Generated: nuttx.bin (ESP32-C3 compatible)

### ADD FBCON EXAMPLE

% gmake menuconfig CROSSDEV=riscv32-esp-elf-
CP: arch/dummy/Kconfig to /XXX/nuttx.git/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /XXX/nuttx.git/boards/dummy/dummy_kconfig
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
LN: include/arch to arch/risc-v/include
LN: include/arch/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/include
LN: drivers/platform to /XXX/nuttx.git/drivers/dummy
LN: include/arch/chip to /XXX/nuttx.git/arch/risc-v/include/esp32c3-legacy
LN: arch/risc-v/src/chip to /XXX/nuttx.git/arch/risc-v/src/esp32c3-legacy
LN: arch/risc-v/src/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/../common
LN: arch/risc-v/src/board/board to /XXX/nuttx.git/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

% kconfig-diff
 EXAMPLES_FBCON n -> y
+EXAMPLES_FBCON_BPP_NX_DEFAULT y
+EXAMPLES_FBCON_CURSORCHAR 95
+EXAMPLES_FBCON_CUSTOM_BPP n
+EXAMPLES_FBCON_CUSTOM_FONTID n
+EXAMPLES_FBCON_DEFAULT_COLORS y
+EXAMPLES_FBCON_DEFAULT_FONT y
+EXAMPLES_FBCON_DEF_FB "/dev/fb0"
+EXAMPLES_FBCON_GLCACHE 94
+EXAMPLES_FBCON_LINESPACING 0
+EXAMPLES_FBCON_NOWRAP n
+EXAMPLES_FBCON_PIPE_STDERR y
+EXAMPLES_FBCON_PIPE_STDIN y
+EXAMPLES_FBCON_PIPE_STDOUT y
+EXAMPLES_FBCON_PRIORITY 100
+EXAMPLES_FBCON_SHOW_WELCOME y
+EXAMPLES_FBCON_SPAWN_TASK "nsh"
+EXAMPLES_FBCON_STACKSIZE 2048
+EXAMPLES_FBCON_VT100_DECODE y


% gmake -j8 CROSSDEV=riscv32-esp-elf-
Create version.h
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
Register: lvgldemo
Register: fbcon
Register: nsh
Register: sh
./fbcon_main.c:51:4: error: #error This application requires NX Graphics
 #  error This application requires NX Graphics
    ^~~~~
./fbcon_main.c:57:4: error: #error FIFO and Named Pipe Drivers should be enabled in the configuration
 #  error FIFO and Named Pipe Drivers should be enabled in the configuration
    ^~~~~
./fbcon_main.c:176:6: error: #error NXFONT_DEFAULT not defined
 #    error NXFONT_DEFAULT not defined
      ^~~~~
CC:  dirent/lib_versionsort.c fbcon_main.c:51:4: error: #error This application requires NX Graphics
 #  error This application requires NX Graphics
    ^~~~~
fbcon_main.c:57:4: error: #error FIFO and Named Pipe Drivers should be enabled in the configuration
 #  error FIFO and Named Pipe Drivers should be enabled in the configuration
    ^~~~~
fbcon_main.c:176:6: error: #error NXFONT_DEFAULT not defined
 #    error NXFONT_DEFAULT not defined
      ^~~~~
CC:  sched/sched_rrgetinterval.c fbcon_main.c: In function 'fbcon_renderglyph':
fbcon_main.c:1062:22: warning: passing argument 1 of 'nxf_convert_1bpp' from incompatible pointer type [-Wincompatible-pointer-types]
       ret = RENDERER((FAR nxgl_mxpixel_t *)glyph->bitmap,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from fbcon_main.c:41:
/XXX/nuttx.git/include/nuttx/nx/nxfonts.h:553:35: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'nxgl_mxpixel_t *' {aka 'long unsigned int *'}
 int nxf_convert_1bpp(FAR uint8_t *dest, uint16_t height,
                          ~~~~~~~~~^~~~
fbcon_main.c: In function 'fbcon_initialize':
fbcon_main.c:178:24: error: 'NXFONT_DEFAULT' undeclared (first use in this function); did you mean 'FONTID_DEFAULT'?
 #  define FBCON_FONTID NXFONT_DEFAULT
                        ^~~~~~~~~~~~~~

@cederom cederom requested a review from hartmannathan March 21, 2025 01:20
@lupyuen lupyuen merged commit 1e4a952 into apache:master Mar 21, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants