FORTH on the PicoCalc

Hi Travis,

Any chance you (or others) can supply some UF2 files for the standard PicoCalc 2040? I am not familiar with the tool chain yet but would like to try some things out.

Thanks,

Paul

There are two problems with that at the moment. The first is that I’m on vacation, and I didn’t bring along an RP2040 board (and an actual RP2040 needed to build a UF2 for it). The second is the number of possible configurations ─ there is both a graphical and a text-only terminal emulator, and there are three different fonts supported, 5x8, 6x8, and 7x8 pixels. That by itself makes six different configurations.

And that is not including all the desired software (e.g. you may want a bare configuration or you may want FAT32 support for block storage and the SD card, zeptoed, tools to transfer files to and from your computer without removing the SD card, the tool to copy files between filesystems, the appropriate screenshot tool, and, if you are to use the graphical terminal emulator, turtle graphics).

If you are using a Pico 1 W (or Pico 2 W or Pimoroni Pico Plus 2 W) you may also want to have zeptoIP with the CYW43439 driver, which requires using non-free firmware and thus I do not make UF2 files including it. (Note that on the Pico 1 W you will have to use the text-only terminal emulator if you are using zeptoIP or even just the CYW43439 driver, e.g. to blink the LED, because of restrictions on available RAM.)

This is why I do not supply premade UF2 files for zeptoforth on the PicoCalc. Rather, the suggested approach is to use a premade full UF2 file from the latest release, which is currently 1.13.2, and then either use utils/codeload3.sh or zeptocom.js to load the source files per the instructions in USING_THE_PICOCALC.md. If you are not comfortable with the toolchain, I would recommend using Chrome or Chromium on your computer (note that mobile Chrome will not work) with zeptocom.js.

You need to download
zeptoforth-1.13.2.tar.gz

in the git repository
(GitHub - tabemann/zeptoforth: A not-so-small Forth for Cortex-M)
on the top right find the GREEN drop down labeled
<> CODE

This is NOT the one you want, as it gives us
zeptoforth-master.zip

Go down further on the right to find RELEASES

Releases 265

Patch-level release 1.13.2Latest
2 weeks ago
(Release Patch-level release 1.13.2 · tabemann/zeptoforth · GitHub)

+ 264 releases

CLICK ON LATEST

The window that opens shows
zeptoforth-1.13.2.tar.gz

This is the download archive the contains the /BIN folder with the compiled binaries.

Hi Travis,

Ok. I understand completely. I did not realize that it was that complicated. I imagine it is not. So used to being pampered with prebuilt.

I will attempt to build myself.

Thanks,

Paul

Let me know if you need any help with it at all.

I made a fix to the Attention s screenshot combo (it would previously not use a lock when flashing the display when taking a screenshot), so if you use screenshots please update to the latest.

Note that some applications such as my snow/wind example (test/rp_common/picocalc_snow_wind.fs) do not screenshot properly, as they repeatedly draw and erase the screen such that the terminal emulator is unlocked between erasing and drawing, such that the screenshot is taken when the display has been erased.

Edit:

The snow/wind example has been updated so it does screenshot correctly, as shown below:

Another update:

I have changed all references to ili9488 to st7365p, so be mindful of that next time you load the display drivers for the PicoCalc terminal emulators.

1 Like

I am the one who posted that. Zeptoforth runs great on the PicoCalc as I showed in the demo I mentioned. There is a lengthy discussion here on another thread with the author of Zeptoforth and others about it as well.

Some more changes ─ I fixed the read-battery, read-backlight, set-backlight, read-kbd-backlight, and set-kbd-backlight words in the picocalc-term module, which were previously broken. I have also renamed the extra/common/st7365p_spi_*x8_font_all.fs files extra/common/st7365p_spi_8_*x8_font_all.fs, as I accidentally broke the words’ naming convention (and contradicted my own doc).

Edit: It turned out that I had more fixing to do, so if you updated, update again… :frowning:

Here are a few demos on the PicoCalc that I implemented:

A Mandelbrot set:

A Sierpinski triangle:

A Barnsley fern:

Note that the Mandelbrot set and the Barnsley fern require an RP2350 as they use hardware single-precision floating point. Also note that the Barnsley fern implementation is based off a program written in MMBasic that was posted on this forum.

1 Like