Skip to content

Add SD card support and optimized 16MB partition scheme for Cardputer ADV#8

Merged
Crashkeyz merged 5 commits intomainfrom
copilot/optimize-flashing-to-sd-card
Dec 26, 2025
Merged

Add SD card support and optimized 16MB partition scheme for Cardputer ADV#8
Crashkeyz merged 5 commits intomainfrom
copilot/optimize-flashing-to-sd-card

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

User reported out-of-memory errors when flashing Cardputer ADV firmware and unclear branch usage.

Changes

Partition scheme (default_16MB.csv)

  • 2×3.75MB app slots for OTA
  • 8.5MB SPIFFS
  • Eliminates flash overflow during firmware upload

SD card driver (drivers/cardputer_adv_driver.cpp)

  • Auto-detects and mounts microSD at boot
  • Creates /data directory for external storage
  • Configurable CS pin (GPIO_NUM_4) and SPI frequency (25MHz)
  • Graceful degradation when SD absent

Documentation

  • Branch recommendation: copilot/optimize-flashing-to-sd-card
  • SD card setup guide with code examples
  • Troubleshooting for common mount failures

Usage

#include <SD.h>

// After M5.begin(), SD card is available
File file = SD.open("/data/config.json", FILE_WRITE);
if (file) {
    file.println("{\"key\": \"value\"}");
    file.close();
}

Store assets and logs on SD to keep flash reserved for firmware only.

Original prompt

which branch do I use to make it work and can we make it so it flashes to the SD card because I think I'm running out of memory when thing to flash card puter adv firmware


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 26, 2025 05:28
Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
…ompatibility

Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
…ntation

Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize firmware flashing to SD card Add SD card support and optimized 16MB partition scheme for Cardputer ADV Dec 26, 2025
Copilot AI requested a review from Crashkeyz December 26, 2025 05:34
@Crashkeyz Crashkeyz marked this pull request as ready for review December 26, 2025 07:25
@Crashkeyz Crashkeyz merged commit ccab19f into main Dec 26, 2025
1 check failed
@Crashkeyz Crashkeyz deleted the copilot/optimize-flashing-to-sd-card branch December 26, 2025 11:17
@Crashkeyz Crashkeyz self-requested a review December 26, 2025 12:16
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.

2 participants