speccy88 opened a new pull request, #3564:
URL: https://github.com/apache/nuttx-apps/pull/3564
## Summary
- Add Berry as an optional interpreter under `apps/interpreters/berry`.
- Pin upstream Berry at commit `4db341475df9e9ad18e6741ef978b4c467690e09`
and fetch it from the upstream archive during Make/CMake builds.
- Add Makefile, CMake, Kconfig, NuttX Berry configuration, and a short
README with usage examples.
- Apply a small default-port patch so Berry reports `NuttX` in its startup
banner and avoids the NuttX `optarg` macro collision.
## Impact
- New opt-in config: `CONFIG_INTERPRETERS_BERRY`.
- Default command: `berry`.
- Default priority: `100`.
- Default stack size: `12288`.
- Selects `ARCH_SETJMP_H`, `LIBC_FLOATINGPOINT`, and `SYSTEM_SYSTEM`.
- Keeps Berry shared-library module loading disabled, so it does not require
`CONFIG_LIBC_DLFCN`.
- Berry object files in the ESP32-C3 USB-console validation build:
`text=136529 data=0 bss=1004 dec=137533`.
## Testing
Host validation:
```sh
git diff --check -- interpreters/berry
```
Target build validation was done with current NuttX commit
`5feb1c4b8b3fda0bfeccbf49a2be8865169cdfd4`, this apps branch, RISC-V GCC
13.2.0, and `kconfig-frontends` on macOS arm64.
The USB-console profile was used for board testing because
`esp32c3-devkit:nsh` routes NSH to UART0, while this board is attached via
`/dev/cu.usbmodem101` using ESP32-C3 USB Serial/JTAG.
```sh
./tools/configure.sh -a ../nuttx_apps_berry_pr esp32c3-devkit:usbconsole
kconfig-tweak --file .config --enable CONFIG_INTERPRETERS_BERRY \
--set-str CONFIG_INTERPRETERS_BERRY_PROGNAME berry \
--set-val CONFIG_INTERPRETERS_BERRY_STACKSIZE 12288 \
--set-val CONFIG_INTERPRETERS_BERRY_PRIORITY 100
make olddefconfig
make -j8
make flash ESPTOOL_PORT=/dev/cu.usbmodem101 ESPTOOL_BAUD=460800
```
Build result for that ESP32-C3 image:
```text
Memory region Used Size Region Size %age Used
ROM: 370348 B 4 MB 8.83%
iram0_0_seg: 14656 B 321296 B 4.56%
irom0_0_seg: 215736 B 4 MB 5.14%
dram0_0_seg: 23168 B 321296 B 7.21%
drom0_0_seg: 304776 B 4 MB 7.27%
rtc_iram_seg: 52 B 8168 B 0.64%
rtc_reserved_seg: 0 GB 24 B 0.00%
```
```text
text=230382 data=44356 bss=283630 dec=558368
nuttx.bin=370312 bytes
```
Runtime smoke test on ESP32-C3:
```text
NuttShell (NSH)
nsh> berry -v
Berry 1.1.0
nsh> berry -e print(40+2)
42
nsh> berry
Berry 1.1.0 (build in Jun 26 2026, 09:07:01)
[GCC 13.2.0] on NuttX (default)
> import os
> os.exit(0)
nsh>
```
--
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]