MASTER BUILD PROMPT — RAK3312 + RAK14014 (ILI9341 + FT6336) — ESP-IDF-first
Copy/paste into Codex.
Project
- Core: RAK3312 (ESP32‑S3) + WisBlock base RAK19007
- Module: RAK14014 240×320 TFT + Touch
- TFT: ILI9341 (SPI)
- Touch: FT6336 (I2C)
- Framework: ESP-IDF (primary). PlatformIO wrapper allowed only if it calls
idf.py.
Mandatory Step 0: Determine Pin Mapping from Hardware Docs (web research required)
Before writing drivers, identify pin mapping from official docs and write docs/PIN_MAPPING.md with Sources URLs.
Pin Mapping Table Template (must fill in)
WisBlock Slot + Module
- Slot used: [SLOT_A / SLOT_B / SLOT_C / UNKNOWN]
SPI (ILI9341)
| Signal | WisBlock name | ESP32-S3 GPIO | Notes / Source |
|---|---|---|---|
| SCK | SPI_CLK | [GPIO??] | |
| MOSI | SPI_MOSI | [GPIO??] | |
| MISO | SPI_MISO | [GPIO??] | (if used) |
| CS | CS | [GPIO??] | |
| DC | IO? | [GPIO??] | |
| RST | IO? | [GPIO??] | |
| BL | IO? | [GPIO??] | backlight |
I2C (FT6336)
| Signal | WisBlock name | ESP32-S3 GPIO | Notes / Source |
|---|---|---|---|
| SDA | SDA | [GPIO??] | |
| SCL | SCL | [GPIO??] | |
| INT | IO? / INT | [GPIO??] | optional/required? |
| RST | IO? / RST | [GPIO??] | optional/required? |
| Addr | — | 0x[??] | address scan expected |
Sources (must include)
- RAK14014 datasheet URL
- RAK19007 baseboard slot/IO mapping URL
- RAK3312 GPIO / WisBlock IO mapping URL
Repo layout (required)
firmware/ESP-IDF app with modules:app_gate,bsp,spi_bus,i2c_bus,display_ili9341,touch_ft6336docs/SOP: ARCHITECTURE, DATA_FLOW, BRINGUP_PLAN, HANDSHAKE, CHECKLISTscripts/,tests/host/
Gates (implement Gate0–Gate3 first)
- Gate0: toolchain sanity
- Gate1: heartbeat
- Gate2: TFT bring-up (color fills + text + timing logs)
- Gate3: touch bring-up (FT6336 probe + x/y logs + crosshair)
Rules:
- On PASS: log
result=PASS gate=N ... - After PASS: do not auto-advance
Commands (expected)
idf.py set-target esp32s3idf.py buildidf.py -p [PORT] flash monitor