Close

The software, creating the firmware.

A project log for Galdeano handheld computer

It is a python handheld computer with a complete keyboard and a symbolic math engine inside it.

angel-cabelloAngel Cabello 09/14/2022 at 12:230 Comments

We want to create a graphical computer, and the best library for it is LVGL. and we want to program this computer and made it easy to program with it, so we choose micropython as the programming language.

But we want also to create a computer with symbolic math, so we need a symbolic math engine. There are many of them, but no one has migrated any to an esp32. But it was just C .... so we choose Eigenmath as the math engine because it is plain C.

First, we migrated Eigenmath to esp32, it is easy and we have only a few memory issues. The main problem is the amount of memory that esp32 can use as stack memory (local variables) so we change a few to heap (malloc() them ). A few small fixes after that it compiles and works fine.

Now we have to get a custom micropython with LVGL support. We downloaded the software to git and compiled it with Eigenmath. We share the RAM between both programs, 2Mb to any (we use a WROVER module with 4 MB of SPI RAM).

But we need to communicate from python to Eigenmath, so we created a special python module, Eigenmath, with only a function, that reads a string, runs it in the math engine, and responds with a string from there. Another problem arises. Eigenmath uses UTF characters to draw mathematic formulae. We add a custom font, called Galeano, with these characters to micropython.

The firmware grew too much, so we alter the partition table so the app partitions were greater, and reduce the data (where the python files are)  partition.

We also customized the ili4385 driver to use our IO pin setup (SPI) and we can create the screen object easily.

But we have an unresolved problem with the SD card. It is a software problem because we can use the screen and the SDcard with Arduino programs. The SPI bus is the same, and even when we use the lv_spi interface (that claims to solve it) we have problems with the bus initialization. 

Discussions