Skip to content

Add support for RockBase NM-CYD-C5 (ESP32-C5, ST7789 320x240) - #37

Draft
clackups with Copilot wants to merge 24 commits into
mainfrom
copilot/add-support-for-nmtech-nm-cyd-c5
Draft

Add support for RockBase NM-CYD-C5 (ESP32-C5, ST7789 320x240)#37
clackups with Copilot wants to merge 24 commits into
mainfrom
copilot/add-support-for-nmtech-nm-cyd-c5

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Adds a new hardware model for the RockBase NM-CYD-C5 "Cheap Yellow Display" board: ESP32-C5 (RISC-V, Wi-Fi 6 + BLE 5), 2.8" ST7789 SPI color LCD (320x240), 16MB flash / 8MB PSRAM.

Kconfig

  • New DRAFTLING_MODEL_NM_CYD_C5 choice (depends on IDF_TARGET_ESP32C5)
  • New DRAFTLING_DISPLAY_ST7789 derived flag gating the new backend; wired into DRAFTLING_DISPLAY_COLOR, DRAFTLING_DISPLAY_HAS_BACKLIGHT, DRAFTLING_WAKEUP_GPIO, width/height

Display backend

  • New components/display/display_st7789.cpp using the upstream espressif/esp_lcd_st7789 managed component (esp_lcd_new_panel_st7789()), unlike the hand-rolled AXS15231B vendor sequence
  • No local framebuffer -- pushes RGB565 tiles directly via esp_lcd_panel_draw_bitmap()
  • LEDC PWM backlight, sleep/wake/deep-sleep-prepare hooks
  • New display_st7789_config_t struct-based init (mirrors the display_axs15231b_config_t pattern) since the panel needs more pins than the generic display_init() slots
display_st7789_config_t cfg = {};
cfg.spi_host = LCD_SPI_HOST;
cfg.cs = LCD_CS_PIN; cfg.dc = LCD_DC_PIN; cfg.rst = LCD_RST_PIN; cfg.bl = LCD_BL_PIN;
cfg.width = DISPLAY_WIDTH; cfg.height = DISPLAY_HEIGHT;
cfg.invert_colors = true; // IPS panel
display_st7789_init(&cfg);

Board wiring

  • New main/boards/nm_cyd_c5.h: display, MicroSD, and (unused) XPT2046 touch CS all share one physical SPI bus with separate CS lines. No battery monitor, no wake GPIO (no user buttons besides power) -- deep sleep wakes only via hardware RESET, matching M5Stack Tab5 precedent
  • main/main.cpp: new display-init branch; SD-init reuses the display's already-initialized SPI bus (mosi/miso/sck = -1)

Build config

  • sdkconfig.defaults.esp32c5: Quad-mode PSRAM (C5 silicon has no Octal support), BLE-only Bluedroid, WiFi tuning
  • sdkconfig.defaults.nm_cyd_c5: target + model selection
  • New nm_cyd_c5 preset in CMakePresets.json

Docs

  • README.md / AGENTS.md: added board entry, updated preset list and board counts

Known limitation

XPT2046 resistive touch is not wired up -- Draftling's touchscreen component currently only supports I2C capacitive controllers. The pin is reserved in the board header for future work; the board remains keyboard-driven like every other supported board.

Copilot AI linked an issue Aug 11, 2026 that may be closed by this pull request
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for NMTech NM-CYD-C5 Add support for RockBase NM-CYD-C5 (ESP32-C5, ST7789 320x240) Aug 11, 2026
Copilot AI requested a review from clackups August 11, 2026 19:36
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Copilot AI and others added 2 commits August 11, 2026 19:58
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
… support

Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Copilot AI and others added 3 commits August 11, 2026 22:33
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
… delay

Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Copilot AI and others added 2 commits August 11, 2026 23:45
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Co-authored-by: clackups <179045798+clackups@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add support for NMTech NM-CYD-C5

2 participants