Skip to main content

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)

SignalWisBlock nameESP32-S3 GPIONotes / Source
SCKSPI_CLK[GPIO??]
MOSISPI_MOSI[GPIO??]
MISOSPI_MISO[GPIO??](if used)
CSCS[GPIO??]
DCIO?[GPIO??]
RSTIO?[GPIO??]
BLIO?[GPIO??]backlight

I2C (FT6336)

SignalWisBlock nameESP32-S3 GPIONotes / Source
SDASDA[GPIO??]
SCLSCL[GPIO??]
INTIO? / INT[GPIO??]optional/required?
RSTIO? / RST[GPIO??]optional/required?
Addr0x[??]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_ft6336
  • docs/ SOP: ARCHITECTURE, DATA_FLOW, BRINGUP_PLAN, HANDSHAKE, CHECKLIST
  • scripts/, 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 esp32s3
  • idf.py build
  • idf.py -p [PORT] flash monitor