# Flashing ## Prerequisites - [ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/latest/esp-idf-en-latest-esp32s3/esp32s3/get-started-esp32s3.html) **v5.x** installed and exported (`get_idf`) - USB cable to the DevKit **USB** port (USB‑JTAG / serial) - PN532 module wired per [PINOUT.md](PINOUT.md) ## Steps 1. Build the web assets (embeds into SPIFFS): ```bash cd web && npm install && npm run build:fw ``` 2. Configure & flash: ```bash cd firmware idf.py set-target esp32s3 idf.py menuconfig # set PN532 transport + GPIOs idf.py build flash monitor ``` 3. Connect to AP **PN532-Toolkit** / **nfc-toolkit**, browse to **http://192.168.4.1** or **http://pn532tool.local**. ## SPIFFS / UI missing? If `firmware/data/` is empty, the device serves a placeholder HTML. Always run `npm run build:fw` before `idf.py build` if you changed the UI. ## Flash size `partitions.csv` assumes **8MB** flash. For **4MB**, shrink `factory` / OTA / `storage` regions and disable dual OTA if needed.