Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A 'Tiny Tcl'?

128 views
Skip to first unread message

Helmut Giese

unread,
Mar 21, 2022, 12:54:34 PM3/21/22
to
Hello out there,
I am contemplating to implement a little language on a microprocessor
that has rather a lot of memory (>500 kB) but no OS. I found "Jim Tcl"
which looks promising - but I don't know how to compile it. In the
manual it says "./configure ; make ..." so I fired up MSys and called
'configure'. It ran smoothly but of course it configured 'Jim' for the
PC.
So my question is: How do I tell 'configure' that the compiler to use
is not 'gcc' but rather '<some-path>/arm-none-eabi-gcc'? And what else
should I maybe tell 'configure'?
Or is 'Jim Tcl' the wrong choice altogether and I should look into
other 'Tiny Tcls'?
Any insight or advice will be greatly appreciated
Helmut

Robert Heller

unread,
Mar 21, 2022, 1:38:13 PM3/21/22
to
Typically 'configure' will take --target= and/or --host= options which can be
used to cross-compile using a cross-build environment and normally the target
contains three things: cpu type, vendor, and os (in your case: arm, none,
and eabi). It basically looks for the compiler tools with the target prefixed
onto gcc, etc. You could *try* './configure --host=arm-none-eabi', but how
well that would work would depend on how much/little Jim Tcl needs additional
os stuff (additional O/S libraries) and how much of the base OS libraries it
wants and how much of that is supplied by your cross-build env, possibly with
something like FreeRTOS, etc. *Some* of the higher-end Arduino-ish MCUs
provide a suprising amount of UNIX-ish support (obviously not really actual
UNIX of course, but enough for some very simple stuff to compile -- including
stuff stuff well beyond a simple Arduino -- like an actual web server,
including a simple but complete Tcp/Ip stack or a minimual file system).

>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Christian Gollwitzer

unread,
Mar 21, 2022, 1:44:10 PM3/21/22
to
Am 21.03.22 um 17:54 schrieb Helmut Giese:
> Hello out there,
> I am contemplating to implement a little language on a microprocessor
> that has rather a lot of memory (>500 kB) but no OS. I found "Jim Tcl"
> which looks promising - but I don't know how to compile it. In the
> manual it says "./configure ; make ..." so I fired up MSys and called
> 'configure'. It ran smoothly but of course it configured 'Jim' for the
> PC.
> So my question is: How do I tell 'configure' that the compiler to use
> is not 'gcc' but rather '<some-path>/arm-none-eabi-gcc'? And what else
> should I maybe tell 'configure'?

To use another compiler, set CC to the path of the executable:

CC=/path/to/gcc ./configure

Additionally, you want to set --prefix=/some/path, where it will install
everything on "make install". The tricky part with no OS will be the
file operations. SOmehow the C library that comes with your copiler
either emulates these or simply leaves fopen() etc. out and this will
give errors during compilation. If it wasn't done before, expect to find
some compilation errors which you'll have to deal with in some way. I
don't know about JimTcl, or other micro Tcls, that have been ported
already to microcontrollers. There is a list of Tcl-like languages on
the wiki: https://wiki.tcl-lang.org/page/Small+Tcl

Christian

Helmut Giese

unread,
Mar 21, 2022, 5:41:01 PM3/21/22
to
Hi Christian, hi Robert

>To use another compiler, set CC to the path of the executable:
>
> CC=/path/to/gcc ./configure
>
>Additionally, you want to set --prefix=/some/path, where it will install
>everything on "make install". The tricky part with no OS will be the
>file operations. SOmehow the C library that comes with your copiler
>either emulates these or simply leaves fopen() etc. out and this will
>give errors during compilation. If it wasn't done before, expect to find
>some compilation errors which you'll have to deal with in some way. I
>don't know about JimTcl, or other micro Tcls, that have been ported
>already to microcontrollers. There is a list of Tcl-like languages on
>the wiki: https://wiki.tcl-lang.org/page/Small+Tcl
>
> Christian
thanks to both of you for your advice: it worked.
After some trial and error I succeeded setting 'CC' to my compiler and
it created a makefile. But when I then said 'make' MSys told me 'make:
command not found' which I find very intriguing: a Unix-like
environment without 'make'? Very strange.
Having failed on this front I didn't yet try Robert's '--build'
suggestion - this is left for tomorrow.
Again many thanks
Helmut

Dave

unread,
Mar 21, 2022, 5:59:07 PM3/21/22
to
You can run the configure in a unix environment. Then run 'make -n' and
save the output. From that you can quickly get a shell script that runs
all the compiles & links. It most likely will not compile cleanly in
your environment but at least you've got something to start with.

--
computerjock AT mail DOT com

Manuel Collado

unread,
Mar 22, 2022, 4:22:33 AM3/22/22
to
El 21/03/2022 a las 22:40, Helmut Giese escribió:
>>[...]
> thanks to both of you for your advice: it worked.
> After some trial and error I succeeded setting 'CC' to my compiler and
> it created a makefile. But when I then said 'make' MSys told me 'make:
> command not found' which I find very intriguing: a Unix-like
> environment without 'make'? Very strange.

Of course, Msys has a 'make' tool. And Msys sits on top of MinGW, which
also has a GNU make named 'mingw32-make'.

Please look at your PATH, and check that it contains both the 'bin'
subdirectory of Msys and the 'bin' subdirectory of MinGW. If you do it
at the bash prompt, the pathes are somehow disguised. On my machine it is:

$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:...

You could also test:

$ which make
/bin/make.exe

$ which mingw32-make
/mingw/bin/mingw32-make.exe

HTH.
--
Manuel Collado - http://mcollado.z15.es

Helmut Giese

unread,
Mar 23, 2022, 4:14:38 PM3/23/22
to
Hello out there,
to close this thread:
@Manuel: My PATH was ok, but I still didn't have a 'make'. Why that?
See below.
@Dave: I had all forgotten about the '-n' switch for 'make'. I am sure
it will come in handy.

The advice of Robert and Christian were very helpful to identify and
use the correct compiler. But then the missing 'make'. Well, it
turned out I hadn't fully configured MSYS, in fact I had just
installed it and that was it (I think I never ever really used it). I
found a good tutorial which taught me that there was such a thing like
MINGW32/64 and once I had followed it - lo and behold there was
'make'.
Now the first run produced of course lots of errors but when I had
learned how to reduce the number of modules to include ('configure'
/is/ a complex beast) it compiled cleanly - just a couple of warnings.
Right now I am stuck on linking but with time and asking and learning
I am sure I will arrive at something.
You see I am a 'Windows only' guy and venturing only every couple of
years into Linux land does not really make for any substanceful
experience.
Again thanks to all of you
Helmut
0 new messages