nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

Difficulty in configuring NuttX to enable many features at once

Open cwt opened this issue 2 years ago • 1 comments

I found that the configuration system for NuttX is separated. For example, there are esp32s3-devkit:blewifi, esp32s3-devkit:psram_octal, esp32s3-devkit:smp, esp32s3-devkit:spiflash, etc. There is no official way to enable all of them at once. I struggled for several days to enable one of them as my baseline and then used make menuconfig to enable other features, which ended up in failure. Finally, I had to use the following commands:

$ mkdir boards/xtensa/esp32s3/esp32s3-devkit/configs/cwt
$ cat boards/xtensa/esp32s3/esp32s3-devkit/configs/blewifi/defconfig \
   boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_octal/defconfig \
   boards/xtensa/esp32s3/esp32s3-devkit/configs/smp/defconfig \
   boards/xtensa/esp32s3/esp32s3-devkit/configs/spiflash/defconfig \
   | grep -v "^#" | sort | uniq > boards/xtensa/esp32s3/esp32s3-devkit/configs/cwt/defconfig
$ vim boards/xtensa/esp32s3/esp32s3-devkit/configs/cwt/defconfig  # to remove some unwanted or conflicted options
$ ./tools/configure.sh esp32s3-devkit:cwt
$ make menuconfig  # to fine-tune the options and make changes for MTD offset and size

Is there any easier way to do this?

cwt avatar Oct 31 '23 09:10 cwt

For easily reproducible builds, use kconfig-tweak in a script to turn the flags you want off and on without ever manually touching menuconfig.

https://nuttx.apache.org/docs/latest/quickstart/configuring.html#fast-configuration-changes

You can find examples of scripts doing this in Lup's (excellent) writings on Nuttx:

https://lupyuen.github.io/articles/auto#configure-build

robertlipe avatar Oct 31 '23 22:10 robertlipe