Skip to content

interpreters: add Tcl support#3646

Draft
csanchezdll wants to merge 1 commit into
apache:masterfrom
csanchezdll:add_jimtcl
Draft

interpreters: add Tcl support#3646
csanchezdll wants to merge 1 commit into
apache:masterfrom
csanchezdll:add_jimtcl

Conversation

@csanchezdll

Copy link
Copy Markdown
Contributor

Summary

Tcl is added using The Jim Interpreter. Jim is an opensource small-footprint implementation of the Tcl programming language. It implements a large subset of Tcl and adds new features like references with garbage collection, closures, built-in Object Oriented Programming system, Functional Programming commands, first-class arrays and UTF-8 support.

Impact

Build should be straightforward, just enable the application inside the "Interpreters" section of the configuration. You need to make sure you have setjmp support, so consider enabling it in "Build Setup" -> "Customize Header Files".

Testing

Tested on master, with a minimal custom board with a STM32H5. Planning to test on a nucleo as soon as I can get one.

NuttShell (NSH) NuttX-13.0.0
nsh> jimsh
Welcome to Jim version 0.83
. puts "hello world"
. exit
hello world
nsh> jimsh
Welcome to Jim version 0.83
. foreach i {a b c} {
{> puts $i
{> }
. exit
a
b
c
nsh> 

Tcl is added using The Jim Interpreter. Jim is an opensource small-footprint
implementation of the Tcl programming language. It implements a large subset
of Tcl and adds new features like references with garbage collection,
closures, built-in Object Oriented Programming system, Functional Programming
commands, first-class arrays and UTF-8 support.

Signed-off-by: Carlos Sánchez de La Lama <csanchezdll@gmail.com>
JIMTCL_VERSION = 0.83
JIMTCL_TARBALL = $(JIMTCL_VERSION).tar.gz
JIMTCL_UNPACK = jimtcl
JIMTCL_URL_BASE = https://github.com/msteveb/jimtcl/archive/refs/tags

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's possible to add Cmake too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure! I'll add it.


config INTERPRETERS_JIMTCL
bool "The Jim (TCL) Interpreter"
default n

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should add depends on here for the config enabling setjmp support if that's a requirement as you mentioned

@linguini1

Copy link
Copy Markdown
Contributor

Cool!

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