Skip to content

BOOT_PIN constant for all ESP32 SoC - Arduino v3.1.x (includes ESP32-P4) #10701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cores/esp32/esp32-hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ void arduino_phy_init();
void initArduino();
#endif

// defines a constant that can be used to map BOOT pin for each different ESP32 SoC
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
const uint8_t BOOT_PIN = 0;
#elif CONFIG_IDF_TARGET_ESP32P4
const uint8_t BOOT_PIN = 35;
#else
// All other series C and HSoC use GPIO 9 as BOOT PIN
const uint8_t BOOT_PIN = 9;
#endif



typedef struct {
int core; // core which triggered panic
const char *reason; // exception string
Expand Down
Loading