Add LILYGO T-Deck Pro (ESP32-S3FN16R8) build and OpenOCD flash support#94
Merged
Merged
Conversation
…config, startup code, and OpenOCD flashing Agent-Logs-Url: https://github.com/choco-technologies/dmod-boot/sessions/83abb048-9e6c-4d91-977c-0232a918ca28 Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Prepare project for T-Deck Pro firmware build
Add LILYGO T-Deck Pro (ESP32-S3FN16R8) build and OpenOCD flash support
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The project only supported ARM STM32 targets. This adds full build and OpenOCD flash support for the LILYGO T-Deck Pro — ESP32-S3FN16R8 (Xtensa LX7 dual-core, 240 MHz, 16 MB flash, 8 MB PSRAM) with built-in USB JTAG.
New architecture:
xtensa/lx7configs/arch/xtensa/arch.ld—elf32-xtensa-leoutput formatconfigs/arch/xtensa/cfg.cmake— setsDMBOOT_OBJCOPY_OUTPUT_FORMAT/DMBOOT_OBJCOPY_BINARY_ARCHfor Xtensaconfigs/arch/xtensa/lx7/tools-cfg.cmake— local toolchain override (checked before dmod submodule); configuresxtensa-esp32s3-elf-*, enables-mabi=call0 -mlongcallsNew MCU:
ESP32S3/esp32s3fn16r8configs/mcu/ESP32S3.cmake— 240 MHz, OpenOCD viaesp_usb_jtag.cfg+esp32s3.cfgconfigs/mcu/esp32s3/esp32s3fn16r8/mcu.ld— code in IRAM (0x40374000, 320 KB), data in DRAM (0x3FC88000, 416 KB); no ROM-bootloader cache setup required for direct JTAG loadNew board:
t-deck-proconfigs/board/t-deck-pro/board.cmake— setsTARGET=ESP32S3Startup code: Xtensa LX7
src/arch/xtensa/lx7/startup.S— reset handler in call0 ABI: disables interrupts (rsil), initialises.data/.bss, callslow_level_init_0/1thenmain()src/arch/xtensa/dmod_critical.c— nested critical sections viarsil/wsr PSBuild system changes
configs/arch/armv7/cfg.cmake— now explicitly setsDMBOOT_OBJCOPY_OUTPUT_FORMAT=elf32-littlearm(previously implicit)scripts/embed_binary.cmake,scripts/romfs.cmake,CMakeLists.txt— replace hard-codedelf32-littlearm/armobjcopy args with the arch-aware variablesCMakeLists.txt— checks for a localconfigs/arch/<arch>/<family>/tools-cfg.cmakebefore falling back to the dmod submodule, enabling the Xtensa toolchain to be configured without touching the submoduleUsage