Porting MicroPython's LVGL Bindings to ESP32

Porting MicroPython’s LVGL Bindings to ESP32 I am not sure why nobody provides ready-made ESP32 firmware with MicroPython’s LVGL bindings, so I compiled one and recorded the steps. Steps All the steps below were done on a Linux system; other systems are similar, so I will not elaborate. Switch the ESP-IDF version The official LVGL bindings support up to v4.4; see Setting up ESP-IDF and the build environment. The ESP-IDF changes quickly and MicroPython only supports certain versions. Currently MicroPython supports v4.0.2, v4.1.1, v4.2.2, v4.3.2 and v4.4, although other IDF v4 versions may also work. ...

2024-09-10 · 2 mins · 3rd

Installing GUI Serial Tool COMTool on LCKFB TaishanPi

Installing GUI Serial Tool COMTool on LCKFB TaishanPi The TaishanPi is pretty good indeed, JLC rocks! Steps Follow the steps titled “Install as a Python package” provided by the software and execute them in order: 1 2 sudo apt install git python3-pyqt5 python3-numpy pip install -i https://pypi.tuna.tsinghua.edu.cn/simple comtool pyqt5 is error-prone to install with pip, so install it with the system package manager. Note The default system image of the TaishanPi does not include pip; install it with the following command: ...

2024-03-05 · 1 min · 3rd

ESP32 Development with CLion

ESP32 Development with CLion Since I wasn’t used to VSCode’s half-baked C++ IDE features, I turned to CLion. But CLion in turn faces the problem of having fewer plugins than VSCode, so I ran into issues when developing for the ESP32. Finally, let me stress: if you primarily use VSCode for development, just use the official plugin provided by ESP32 — it’s simple and convenient, no command line required. Steps Actually, there is no need to bother with environment variables or cross-compilation toolchains. I’ve tried them, and they’re useless — they only add unnecessary trouble. ...

2023-12-05 · 3 mins · 3rd

ST7735 Display Orientation and Color Configuration

ST7735 Display Orientation and Color Configuration The ST7735 is commonly used as the driver chip for small TFT screens. This article provides guidance on configuring the refresh direction (rotating or flipping the screen) and the RGB or BGR color format. Analysis This configuration corresponds to register address 0x36 of the driver chip, which is covered on page 110 of the datasheet. The commonly used initialization values are as follows (the refresh directions have not been strictly tested — please try them out yourself!): ...

2022-03-30 · 1 min · 3rd

Developing ESP32 with VSCode

Developing ESP32 with VSCode I stepped on the pitfalls so you do not have to — consider this a ladder to help you climb out. 1. Avoid pitfalls when installing the VSCode extension I will skip the installation steps and go straight to the official getting-started guides: VS Code IDE Quick Start, Quick Installation Guide. But watch out for the following points: If you have enough space on your C drive, do not bother configuring things manually — let the extension install everything to the C drive automatically; save yourself the hassle. As long as either the code or the developer can run, it is fine. When installing, do not pick Github for Select download server; it is slow in China. The extension uses pip during installation, but pip’s official index is unusable in China, so you need to switch to a mirror manually. The command: 1 2 pip install pip -U pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple An error interrupts the extension installation and you need to reinstall, but the previously installed files remain, causing a “file exists” error. Go to the user directory, i.e. %HOMEPATH%\esp, and delete the esp-idf folder. Reinstall and it succeeds in one go. If you use it on multiple devices and have VSCode sync enabled, be sure to enable ignore sync for the 6 configuration parameters in the extension’s settings. For the parameters and reasons, see the Issue I filed: Extension config modified incorrectly due to VSCode sync. 2. Usage notes Just read the official docs: ESP-IDF VS Code extension tutorial.

2022-03-21 · 2 mins · 3rd

Collaborative Development with VSCode and Keil

Collaborative Development with VSCode and Keil Keil is a familiar face among hardware development IDEs — so much so that many people who started with C51 probably used Keil. But I have never been quite convinced by Keil’s editor. VSCode, backed by Microsoft, has undoubtedly been battle-tested by countless developers and feels far more comfortable to use. This article therefore introduces the steps for developing with VSCode together with Keil uVison 5. ...

2022-03-05 · 4 mins · 3rd

Installing C51 and MDK Arm in Keil Together

Installing C51 and MDK-Arm in Keil Together To this day, Keil has yet to unify the common hardware platforms into a single IDE. If the intention is to save disk space, I think it is unnecessary — after all, the installation packages for C51 and MDK-Arm together amount to less than 1.5 GB, which, compared with WeChat and QQ that easily take up tens of GB, is undoubtedly more like “small and beautiful”. This article will introduce the perfect solution for installing C51 and MDK-Arm at the same time ...

2022-02-27 · 3 mins · 3rd