ZEReader is an open source hardware and software E-Book Reader platform. Originally developed as a bachelor's thesis in electrical engineering, the project now evolves as a hobby initiative dedicated to further develop this hackable and customizable platform. https://marx.engineer/zereader/
Find a file
Anna-Lena Marx 39591d4dd9
feat: add the board definition for the ZEReader rev2 PCB (#28)
The second revision of the ZEReader PCB comes with some
breaking changes in the device tree.
Several pin configurations changed, and with the new
latching (self-holding) on/off button circuitry,
additional device tree configurations are added.
For turning the device off, ZEReader takes advantage
of the "zephyr,input-longpress" infrastructure to allow
a customizable time the button must be pressed before
the device turned off.
The code makes use of Zephyr's KConfig system to ensure
both hardware revisions stay usable and supported.
The on/off related code is disabled for rev1.

Signed-off-by: Anna-Lena Marx <mail@marx.engineer>
2025-12-28 16:53:03 +01:00
.github/workflows feat: add custom board for ZEReader rev1 (#22) 2025-10-22 23:03:11 +02:00
app feat: add the board definition for the ZEReader rev2 PCB (#28) 2025-12-28 16:53:03 +01:00
boards feat: add the board definition for the ZEReader rev2 PCB (#28) 2025-12-28 16:53:03 +01:00
doc Support for native simulator (#26) 2025-11-05 09:15:07 +01:00
include Support for native simulator (#26) 2025-11-05 09:15:07 +01:00
LICENSES doc: add in-action picture of ZEReader (#13) 2025-07-29 23:28:54 +02:00
zephyr feat: add custom board for ZEReader rev1 (#22) 2025-10-22 23:03:11 +02:00
.gitignore Support for native simulator (#26) 2025-11-05 09:15:07 +01:00
.gitmodules chores/doc: Restructured the project as a better base for docs and testing 2025-07-27 14:23:01 +02:00
.pre-commit-config.yaml chores/doc: Restructured the project as a better base for docs and testing 2025-07-27 14:23:01 +02:00
0001_avoid-full-refresh.patch feat: add custom board for ZEReader rev1 (#22) 2025-10-22 23:03:11 +02:00
CMakeLists.txt fix/cleanup: move implementations back into the app directory (#19) 2025-08-17 21:48:18 +02:00
Kconfig fix/cleanup: move implementations back into the app directory (#19) 2025-08-17 21:48:18 +02:00
LICENSE Create LICENSE 2025-07-21 18:36:59 +02:00
README.md Support for native simulator (#26) 2025-11-05 09:15:07 +01:00
SECURITY.md lic: Add SPDX header for SECURITY.md 2025-07-27 15:00:47 +02:00
west.yml chores: introduce proper license handling with reuse tool 2025-07-21 17:48:19 +02:00

ZEReader

Build Zephyr ZEReader Application Build ZEReader documentation

Documentation API Documentation

ZEReader in Action

ZEReader is a Zephyr based firmware for an open hardware eBook reader approach. See https://github.com/Allegra42/ZEReader-KiCad for more information about the hardware design.

The firmware is currently in a really early PoC stage. Nevertheless, due to Zephyr, it is easily portable and adaptable to different hardware platforms which provide the essential components and a proper device tree (overlay) configuration.

ZEReader Hardware

The ZEReader firmware is, based on Zephyr, highly flexible and can be adopted to a wide range of different hardware with a proper device tree (overlay). In general, the development and testing is based on the following components:

  • Raspberry Pi Pico 1/2
  • Waveshare ePaper Display 7,5" (Gooddisplay GDEW075T7, GDEY075T7) with UC8179 controller
  • SD Card Reader (SPI)
  • 4 Buttons for navigation

The ZEReader PCB itself is developed in a seperated git repository available here.

Setup for local development

west init -m git@github.com:Allegra42/ZEReader.git zereader-workspace

cd zereader-workspace

python3 -m venv .venv
source .venv/bin/activate

west update
pip install -r zephyr-rtos/scripts/requirements.txt
cd zephyr-rtos
west sdk install

Build

Always source the venv environment first!

cd zereader-workspace
source .venv/bin/activate

cd ZEReader

Build for Raspberry Pi Pico 1 using a Device Tree Overlay

west build -b rpi_pico app -p always

Build for Raspberry Pi Pico 2 using a Device Tree Overlay

west build -b rpi_pico2/rp2350a/m33 app -p always

Build for the ZEReader Rev1 Board

west build -b zereader_rev1/rp2350a/m33 app -p always

Other useful build commands

# Update Zephyr and external modules
# The west.yml of this project uses potentially unstable main branches from Zephyr and the modules.
# This was needed as neighter Pi Pico 2 nor LVGL v9 were included in the 4.0 release, but more or less important for this project.
# Be aware this can break!

west update

# May check if patches in this repo are (still) needed or new ones needed or new issues showed up.

# Generate SBoM
west spdx

Flash Pico

  • disconnect USB
  • press the 'BOOTSEL' button during reconnect
  • the device shows up as a mass storage
  • copy 'build/zephyr/zephyr.uf2' to the device
  • it flashes itself and restarts running the firmware

Logs

Logs are printed via the Pi Pico default UART pins with 115200 bauds.

Debugging

With Blackmagic Debug Probe using the SWD interface:

  • connect the Blackmagic Debug Probe to the Pi Pico's SWD header

  • west debug --runner blackmagicprobe -> Connects to a GDB session

  • set breakpoint with break <full/source/code/file/path>:<linenumber>

  • step through / step in with GDB commands (next/n, step in/si, ..)

Emulator

Note: the Zephyr native simulator only works on Linux.

To build the emulator, build the ZEReader app for the native_sim board:

west build -b native_sim/native/64 app

To run the emluator, execute this command:

./build/zephyr/zephyr.exe

The native simulator uses emulated flash to provide storage, which replaces the SD card from the actual board. This emulated storage is backed by a 100 MB file named flash.bin, located in the directory where the emulator is run. If this file does not exist, the emulator creates it. To put data onto the simulated SD card, mount the file on the host and copy the data into it:

sudo mount -o loop flash.bin /mnt
sudo cp -r my-book /mnt
sudo umount /mnt

Alternatively, if the FUSE development headers are installed, FUSE access to the simulated storage can be enabled:

west build -b native_sim/native/64 app -- -DCONFIG_FUSE_FS_ACCESS=y

When the emulator is running, it mounts the simulated SD card on the directory flash/SD:, so the book can be copied there:

cp -r my-book flash/SD\:/

In any case, the emulator needs to be restarted after new books are added to the simulated SD card.

Current state

This is still a work-in-process. The firmware shows a proof-of-concept that reading EPUBs as they are is possible with the available resources of a cheap microcontroller unit like the RP2040/RP2350. (Right now, without unzipping the EPUB files directly from Zephyr.)

The firmware supports showing the contents of a book in correct order while jumping over pictures and leave (X)HTML formatting untouched.

The UI implementation is still very basic. The display orientation is still landscape and refresh configurations need to be tuned for an actually usable reading experience.

Config options for EPUB handling are still part of epub.h and should move to an own KConfig definition as the project proceeds in order to keep these configurations in a central location adopt Zephyr idioms.

See the GitHub issue page for a closer look on planned tasks.