Skip to content

fix(build): adapt sdkconfig for ESP32-P4 partition and driver adjustments#22

Closed
Ghost64847 wants to merge 2 commits intoHighCodeh:mainfrom
Ghost64847:fix/p4-c5-firmware-link-guard
Closed

fix(build): adapt sdkconfig for ESP32-P4 partition and driver adjustments#22
Ghost64847 wants to merge 2 commits intoHighCodeh:mainfrom
Ghost64847:fix/p4-c5-firmware-link-guard

Conversation

@Ghost64847
Copy link
Copy Markdown

@Ghost64847 Ghost64847 commented Mar 22, 2026

Description

Adapt the current firmware environment for ESP32-P4, including sdkconfig updates, partition resizing, and ST7789 display driver tweaks.

Changes included according to CHANGELOG standard:

  • st7789: adjust backlight LEDC frequency to 4000Hz
  • partitions: resize storage partition to 3M and assets partition to 4M
  • build: adapt sdkconfig for ESP32-P4 (update IDF initialization to v5.5.3, 16MB flash, 360MHz CPU, PSRAM support & leak workarounds)

Related Issue: Fixes #22


Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings during build.
  • I have tested this change on physical hardware. (Please specify which target below)

Hardware Testing Details

  • Target: ESP32-P4
  • Environment: ESP-IDF v5.5.3
  • Test Result: Successfully built with the new partition map and sdkconfig changes, tested with ST7789 backlight adjusted to 4000Hz.

@anarchyysm
Copy link
Copy Markdown
Member

I’m going to close these two PRs for now just to help keep the project organized. Please take a look at these tips for your future contributions:

  1. Target the dev branch: Please submit your PRs to the dev branch instead of main. All new updates go through dev first. By targeting main directly, we run into merge conflicts and duplicate updates because dev is currently ahead of main.
  2. Hold off on the ST7789 driver: Please avoid making changes to the ST7789 driver for the time being. We are still deciding whether to stick with this specific display or switch to a different model.
  3. Flash Memory Settings: Do not modify the flash space or partition tables. Our hardware utilizes 32MB of flash, not 16MB, so the current configurations must remain as they are.

Thanks for the hard work! I'm looking forward to your updated PRs on the dev branch. :D

@anarchyysm anarchyysm closed this Mar 24, 2026
@Ghost64847 Ghost64847 deleted the fix/p4-c5-firmware-link-guard branch March 24, 2026 22:56
@Ghost64847
Copy link
Copy Markdown
Author

I am very sorry for causing trouble for this project. I realised that I made a mistake in the Flash Memory Settings, so I reverted my subsequent changes. But there is one thing I need to report. When #define BL_LEDC_FREQ 5000, an ### ESP_ERROR_CHECK failed occurs: esp_err_t 0xffffffff (ESP_FAIL) at 0x40024ea0
--- 0x40024ea0: init_backlight_pwm at /Users/Gray/Desktop/TentacleOS/firmware_p4/components/Drivers/st7789/st7789.c:46
file: "./components/Drivers/st7789/st7789.c" line 46
func: init_backlight_pwm
expression: ledc_timer_config(&ledc_timer)

abort() was called at PC 0x4ff0ba7d on core 0
--- 0x4ff0ba7d: _esp_error_check_failed at /Users/Gray/espidf/esp-idf_5_5_3/v5.5.3/esp-idf/components/esp_system/esp_err.c:49
Setting breakpoint error. When #define BL_LEDC_FREQ 4000, there will be no errors.

@anarchyysm
Copy link
Copy Markdown
Member

weird, here i can use 5000 and works fine, maybe its something new in idf v5.5.3 who doesnt have on v5.5.1. Im going to test it and i return to you soon ok?

@Ghost64847
Copy link
Copy Markdown
Author

Okay, I'm glad you noticed this issue.

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