• A 'Tiny Tcl'?

    From Helmut Giese@21:1/5 to All on Mon Mar 21 17:54:30 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Mon Mar 21 18:44:05 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to [email protected] on Mon Mar 21 12:38:03 2022
    At Mon, 21 Mar 2022 17:54:30 +0100 Helmut Giese <[email protected]> wrote:


    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

    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
    [email protected] -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to Helmut Giese on Mon Mar 21 16:58:56 2022
    On 3/21/2022 4:40 PM, Helmut Giese wrote:
    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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Giese@21:1/5 to All on Mon Mar 21 22:40:57 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manuel Collado@21:1/5 to All on Tue Mar 22 09:22:25 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Giese@21:1/5 to All on Wed Mar 23 21:14:33 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)