Custom Board Configurations

Create and customize board profiles for GhostESP.

Board configurations are stored in configs/sdkconfig.* files. Each file contains all Kconfig settings for a specific board.

Available Base Configs

Config FileTargetDescription
sdkconfig.default.esp32ESP32Original ESP32
sdkconfig.default.esp32s2ESP32-S2USB-enabled, no BLE
sdkconfig.default.esp32s3ESP32-S3USB OTG, BLE, PSRAM
sdkconfig.default.esp32c3ESP32-C3RISC-V, low cost
sdkconfig.default.esp32c6ESP32-C6RISC-V, Wi-Fi 6
sdkconfig.default.esp32c5ESP32-C5RISC-V, latest

Creating a New Board Profile

1. Copy a base config

Choose the closest matching chip family:

cp "configs/sdkconfig.default.esp32s3" "configs/sdkconfig.myboard"

2. Clean previous build

idf.py fullclean

3. Apply the config

cp "configs/sdkconfig.myboard" "sdkconfig"
cp "configs/sdkconfig.myboard" "sdkconfig.defaults"

4. Set the target

idf.py set-target esp32s3

5. Open menuconfig

idf.py menuconfig

Configure your hardware settings (see sections below).

6. Build and test

idf.py -p COM3 flash monitor

7. Save your config

After verifying everything works, copy back to your profile:

cp "sdkconfig" "configs/sdkconfig.myboard"

Key Configuration Sections

Ghost ESP Options

Navigate to Ghost ESP Options in menuconfig:

  • Device DetailsBUILD_CONFIG_TEMPLATE — Set your board name (e.g., “myboard”)
  • LED Options — Enable Neopixel or RGB LED, set data pins
  • Display Options — Enable screen, set resolution, touchscreen
  • SPI and MMC Configuration — SD card pins (SPI or 1-bit SDIO)
  • GPS Configuration — UART RX pin and baud rate
  • NFC Options — PN532 or Chameleon Ultra
  • NRF24 Options — SPI pins for NRF24L01 module
  • Misc Options — Joystick, battery ADC, BadUSB, ethernet, infrared

LVGL Display Driver

Navigate to Component config → LVGL → LVGL ESP Drivers → LVGL TFT Display controller:

  • Select your display controller (ILI9341, ST7789, GC9A01, etc.)
  • Configure SPI pins (MOSI, MISO, SCK, CS, DC, RST)
  • Set SPI clock speed

For touchscreens, configure under LVGL Touch Input.

Log Level

Navigate to Component config → Log output:

Set Default log verbosity to:

  • Info (recommended for debugging) — Standard operational messages
  • Warning (default) — Minimal output
  • Error — Only errors

Console Baud Rate

Navigate to Component config → ESP System Settings:

Set UART console baud rate (default: 115200)

Common Pin Assignments

FeatureConfig OptionTypical S3 Pins
SD SPI MOSISD_SPI_MOSI_PIN23
SD SPI MISOSD_SPI_MISO_PIN19
SD SPI CLKSD_SPI_CLK_PIN18
SD SPI CSSD_SPI_CS_PIN4
GPS RXGPS_UART_RX_PIN16
NRF24 MOSINRF24_SPI_MOSI_PIN14
NRF24 MISONRF24_SPI_MISO_PIN21
NRF24 SCKNRF24_SPI_SCK_PIN13
NRF24 CSNNRF24_CSN_PIN12
NRF24 CENRF24_CE_PIN11

Example: Adding a New ESP32-S3 Board

  1. Start with the S3 default:

    idf.py fullclean
    cp "configs/sdkconfig.default.esp32s3" "sdkconfig"
    cp "configs/sdkconfig.default.esp32s3" "sdkconfig.defaults"
    idf.py set-target esp32s3
    
  2. Open menuconfig and configure:

    • Set BUILD_CONFIG_TEMPLATE to “my_awesome_board”
    • Enable WITH_SCREEN and set TFT_WIDTH/TFT_HEIGHT
    • Configure display driver under LVGL settings
    • Set SD card SPI pins
    • Enable any extra features (GPS, NFC, etc.)
  3. Build and test:

    idf.py -p COM3 flash monitor
    
  4. Save when working:

    cp "sdkconfig" "configs/sdkconfig.my_awesome_board"
    

Troubleshooting

  • Build fails after config change: Run idf.py fullclean and rebuild
  • Menuconfig shows wrong target: Re-run idf.py set-target esp32s3
  • Config not applying: Ensure both sdkconfig and sdkconfig.defaults are copied