ELF binaries for Xtensa-based ESP32-S3 that I can use while I develop NEK, the base of my custom OS for embedded devices
Find a file
2026-05-27 15:22:45 +02:00
.cargo feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
.zed feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
asm feat: add a small assembly file for return67 and update the Readme 2026-05-27 15:22:45 +02:00
src feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
.envrc feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
.gitignore feat: add a small assembly file for return67 and update the Readme 2026-05-27 15:22:45 +02:00
Cargo.lock feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
Cargo.toml feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
flake.lock feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
flake.nix feat: create tiny program that returns a constant value 2026-05-22 17:15:11 +02:00
README.md feat: add a small assembly file for return67 and update the Readme 2026-05-27 15:22:45 +02:00

NEK ELF Tests

Small tests to compile ELF binaries for the ESP32-S3 (Xtensa) for use during the development of NEK, the base for a custom OS for embedded systems.

About the asm directory

This is for some tests to create minimal executables with Assembly. You can compile the code with the following commands:

xtensa-esp32s3-elf-as asm/return67.S -o asm/return67.o
xtensa-esp32s3-elf-objcopy -O binary asm/return67.o asm/return67.bin

You should now have a .o file, which is the entire code, and a .bin file.
This .bin file is your executable, which you can copy into a raw buffer in IRAM (like .rwtext) in your ESP32 and run it directly.

You can inspect the output file with objdump if you want:

xtensa-esp32s3-elf-objdump -d asm/return67.o

Which should return something like this:

asm/return67.o:     file format elf32-xtensa-le


Disassembly of section .text:

00000000 <return67>:
   0:	004136      entry	a1, 32
   3:	324c      	movi.n	a2, 67
   5:	f01d      	retw.n

Just so you know, though, running cargo run --release and extracting its .text section with this command returns the exact same bytes:

# Remember to change `nek-elf-tests` to the actual path to the binary
xtensa-esp32s3-elf-objcopy -O binary -j .text nek-elf-tests return67.bin

So... yeah... it might be better to just write Rust lmao.