Skip to content

Commit

Permalink
fix(psram): Add support for ESP32-C5 PSRAM
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jan 27, 2025
1 parent 09de42a commit 28bf580
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ esp32c5.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32c5.menu.JTAGAdapter.bridge.build.openocdscript=esp32c5-bridge.cfg
esp32c5.menu.JTAGAdapter.bridge.build.copy_jtag_files=1

esp32c5.menu.PSRAM.disabled=Disabled
esp32c5.menu.PSRAM.disabled.build.defines=
esp32c5.menu.PSRAM.enabled=Enabled
esp32c5.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM

esp32c5.menu.CDCOnBoot.default=Disabled
esp32c5.menu.CDCOnBoot.default.build.cdc_on_boot=0
esp32c5.menu.CDCOnBoot.cdc=Enabled
Expand Down
3 changes: 3 additions & 0 deletions cores/esp32/chip-debug-report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ static void printPkgVersion(void) {
#elif CONFIG_IDF_TARGET_ESP32P4
uint32_t pkg_ver = REG_GET_FIELD(EFUSE_RD_MAC_SYS_2_REG, EFUSE_PKG_VERSION);
chip_report_printf("%lu", pkg_ver);
#elif CONFIG_IDF_TARGET_ESP32C5
uint32_t pkg_ver = REG_GET_FIELD(EFUSE_RD_MAC_SYS2_REG, EFUSE_PKG_VERSION);
chip_report_printf("%lu", pkg_ver);
#else
chip_report_printf("Unknown");
#endif
Expand Down
2 changes: 2 additions & 0 deletions cores/esp32/esp32-hal-psram.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "esp32s3/rom/cache.h"
#elif CONFIG_IDF_TARGET_ESP32P4
#include "esp32p4/rom/cache.h"
#elif CONFIG_IDF_TARGET_ESP32C5
#include "esp32c5/rom/cache.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
Expand Down

0 comments on commit 28bf580

Please # to comment.