Skip to content

sim: Add Berry interpreter configuration#19224

Open
speccy88 wants to merge 1 commit into
apache:masterfrom
speccy88:codex/add-berry-docs-sim
Open

sim: Add Berry interpreter configuration#19224
speccy88 wants to merge 1 commit into
apache:masterfrom
speccy88:codex/add-berry-docs-sim

Conversation

@speccy88

Copy link
Copy Markdown

Summary

  • Add Berry interpreter documentation under Documentation/applications/interpreters/berry.
  • Add a sim:berry configuration that enables the Berry interpreter and its required dependencies.

Context

This is the NuttX-side companion for the optional Berry interpreter app proposed in apache/nuttx-apps#3564.

Testing

Built sim:berry against apache/nuttx-apps#3564 locally on macOS arm64:

./tools/configure.sh -a ../nuttx_apps_berry_pr sim:berry
make olddefconfig
make -j8

Runtime smoke test:

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:34:41)
[clang 21.0.0 (clang-2100.1.1.101)] on NuttX (default)
> import os
> os.exit(0)
nsh>

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium Board: simulator labels Jun 26, 2026
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

esp32-devkitc

  • ROM: .flash.text -8 B (-0.0%, 119,772 B / 4,194,272 B, total: 3% used)
  • irom0_0_seg: .flash.text -8 B (-0.0%, 85,052 B / 3,342,304 B, total: 3% used)

hifive1-revb

  • flash: .text +4 B (+0.0%, 80,196 B / 4,194,304 B, total: 2% used)

qemu-armv8a

  • Code: .rodata +8 B, .text.cmd_echo -16 B (-0.0%, 312,150 B)

qemu-intel64

  • Code: .text -3 B (-0.0%, 8,653,200 B)

rx65n-rsk2mb

acassis
acassis previously approved these changes Jun 26, 2026
@simbit18

simbit18 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Hi @speccy88 please fix

../nuttx/tools/checkpatch.sh -c -u -m -g  f5e3bb24595b78c5e329d13b1ad559a294ed3ef9..HEAD
❌ Missing Signed-off-by
Used config files:
    1: .codespellrc
Some checks failed. For contributing guidelines, see:
  https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md

Doc

Warning, treated as error:
/home/runner/work/nuttx/nuttx/Documentation/applications/interpreters/berry/index.rst:1:Title overline too short.

=================================
``berry`` Berry scripting language
=================================
make: *** [Makefile:52: html] Error 2

@speccy88 speccy88 dismissed stale reviews from acassis and xiaoxiang781216 via 4c55e0c June 27, 2026 09:36
@speccy88 speccy88 force-pushed the codex/add-berry-docs-sim branch from 089cab5 to 4c55e0c Compare June 27, 2026 09:36
@acassis

acassis commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@speccy88 seems like the defconfig you added is not updated (normalized) with the current nuttx-apps and/or nuttx repos:

Configuration/Tool: sim/berry
2026-06-27 11:57:21
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
  [1/1] Normalize sim/berry
HEAD detached at pull/19224/merge
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/sim/sim/sim/configs/berry/defconfig

Please rebase your branch with upstream repos and then normalize your board:

$ ./tools/refresh.sh --silent sim:berry

@speccy88 speccy88 force-pushed the codex/add-berry-docs-sim branch from 4c55e0c to 7239051 Compare June 27, 2026 18:25
@speccy88

speccy88 commented Jun 27, 2026

Copy link
Copy Markdown
Author

Updated after apache/nuttx-apps#3564 merged.

I rebased this branch again onto current apache/nuttx master and reran the requested normalization with current apache/nuttx-apps master available as ../apps:

./tools/refresh.sh --silent sim:berry

The refresh completed with no tracked defconfig diff. I also verified locally:

./tools/checkpatch.sh -c -u -m -g origin/master..HEAD
git diff --check origin/master..HEAD
./tools/configure.sh -a ../apps sim:berry
make olddefconfig
make -j8

The local sim:berry build completed successfully. I also smoke-tested the simulator:

berry -v
berry -e print(40+2)

which printed Berry 1.1.0 and 42.

Current pushed head: bcac56e.

@speccy88 speccy88 marked this pull request as ready for review June 27, 2026 18:26
Add a sim:berry configuration to exercise the Berry interpreter.

Document the new berry command under applications/interpreters.

Signed-off-by: Frederick Blais <fred_blais5@hotmail.com>
@speccy88 speccy88 force-pushed the codex/add-berry-docs-sim branch from 7239051 to bcac56e Compare June 27, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Board: simulator Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants