No description
Find a file
2025-08-12 14:13:39 +02:00
badgevms Compositor: Start the launcher if no other windows exist 2025-08-10 00:20:15 +02:00
components Or actually correct correct correct it 2025-08-08 20:47:53 +02:00
connectivity_esp_hosted set backlight of screen and keyboard to PWM 10% 2025-08-04 13:58:27 +02:00
flash_storage Visual OTA updater 2025-08-09 18:12:07 +02:00
host_tests Shuffle some things around 2025-08-01 20:08:35 +02:00
misc Also run clang-format on include files 2025-08-06 14:33:52 +02:00
sdk_apps Added custom keycode because my arrow keys do not work 2025-08-12 14:13:39 +02:00
sdk_include Didn't notice this until a full clean 2025-08-07 04:00:03 +02:00
sdk_libs Support fullscreen windows in SDL3 2025-08-09 00:44:48 +02:00
.clang-format Add clang format and run it 2025-07-09 14:46:36 +02:00
.gitignore build: Remove redundant components override_path and lock deps. 2025-07-31 18:18:50 +02:00
.gitlab-ci.yml ESP-IDF 5.5 2025-07-22 23:47:44 +02:00
AUTHORS Update AUTHORS 2025-08-03 16:59:55 +02:00
CMakeLists.txt build(cmake): Use always-out-of-date targets for staging dirs. 2025-08-08 14:26:13 +02:00
COPYING Add licensing information 2025-07-11 15:40:31 +02:00
dependencies.lock Maybe really GM this time? 2025-08-09 15:25:19 +02:00
firmware.code-workspace tools: Add code-workspace file. 2025-07-29 16:01:49 +02:00
partitions.csv HTTP support via curl-easy emulation 2025-07-31 23:24:41 +02:00
README.md fix logo location 2025-08-02 21:19:43 +00:00
sdkconfig.defaults Reboot on panic after 5 seconds 2025-08-07 13:35:25 +02:00
THANKS Update name 2025-07-28 15:20:28 +02:00
TODO.md Various cleanups and corrections 2025-08-06 07:56:46 +02:00
version.txt Bump main firmware version 2025-08-10 00:22:44 +02:00

Welcome to BadgeVMS

BadgeVMS is the most used Badge operating system on the WHY2025 camp.

BadgeVMS Logo

Some feature highlights:

  • Multiple programs can run at once
  • Every program gets its own linear address space
  • Programs are isolated from each other (but not the operating system)
  • VMS like paths and search lists

Supported hardware

  • Why2025 badge (ESP32P4 based)

Instructions

To build BadgeVMS you need to have esp-idf 5.5 installed. For installation instructions see here: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html.

Then build and run on the badge with:

idf.py build flash monitor

Note: When you do a git pull please run an idf.py fullclean before rebuilding so changes to sdkconfig.defaults are picked up

Example applications

The directory sdk_apps has several small programs in it.

  • framebuffer_test shows you how to directly interact with the windowing system and keyboard input.
  • sdl_test does the same, but for SDL.
  • curl_test shows you how to do http(s) calls,
  • thread_test has a simple example of creating a thread and how to interact with workers.
  • And many more!

Finally as a more complete example there is also doomgeneric a full-fledged doom port! In particular check out doomgeneric_badgevms.c for examples of framebuffers, scaling, window handling, input, etc.

Building applications

BadgeVMS has a simple SDK with C, BadgeVMS headers, and SDL3. You can build the SDK with

idf.py sdk

This will generate a directory sdk_dist with the headers and libraries.

You then need to use a riscv32 compiler to build for BadgeVMS, one way of doing that is by reusing the riscv32-esp-elf-* toolchain that comes with esp-idf, however any riscv32 compiler should work. But only GCC is tested. Example (with esp-idf compilers):

riscv32-esp-elf-gcc -O2 -fPIC -fdata-sections -ffunction-sections -flto \
   -fno-builtin -fno-builtin-function -fno-jump-tables -fno-tree-switch-conversion \
   -fstrict-volatile-bitfields -fvisibility=hidden -g3 -mabi=ilp32f \
   -march=rv32imafc_zicsr_zifencei -nostartfiles -nostdlib -shared \
   -Wl,--strip-debug -Wl,--gc-sections -e main --sysroot sdk_dist -isystem sdk_dist/include \
   hello.c -o hello.elf

This also works with for instance riscv64-linux-gnu-gcc as shipped by Fedora 42.

Linking with the SDK libraries

Due to limitations in the ELF loader in BadgeVMS, do not expose symbols in your program other than main, with the default flags above (-fvisibility=hidden) this is mostly taken care of, but if linking with an .a file, especially one not shipped with the SDK, things might go wrong.

In order to link properly with an .a file for BadgeVMS please use -Wl,--exclude-libs,libmylib.a

Weird things to keep in mind

  • UNIX paths do not work! Paths are in the form of DEVICE:[directory.subdirectory]filename.ext
  • The various GCC options above are not optional. BadgeVMS binaries are position independent ELF shared objects. Other types of binaries will not load.
  • No shared libraries, you there is no dlopen() either, all of your dependencies (that is, symbols that come from places other than what is included with the sdk) must be fully statically linked.