fix(esp_rom): fixed esp-rom not compiling in g0 build

CONFIG_BOOTLOADER_OFFSET_IN_FLASH comes from the bootloader kconfigs and
is not available in g0 builds.
This commit is contained in:
Marius Vikhammer
2026-05-13 14:20:29 +08:00
committed by Konstantin Kondrashov
parent 7d5df005d2
commit 6a40bfcfcb
3 changed files with 6 additions and 1 deletions

View File

@@ -90,3 +90,7 @@ config ESP_ROM_HAS_OUTPUT_PUTC_FUNC
config ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY
bool
default y
config ESP_ROM_BOOTLOADER_OFFSET_FLASH
hex
default 0x2000

View File

@@ -28,3 +28,4 @@
#define ESP_ROM_CLIC_INT_TYPE_PATCH (1) // ROM api esprv_intc_int_set_type configuring edge type interrupt (old revisions)
#define ESP_ROM_HAS_OUTPUT_PUTC_FUNC (1) // ROM has esp_rom_output_putc (or ets_write_char_uart)
#define ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY (1) // ROM mem/str functions are not optimized well for misaligned memory access.
#define ESP_ROM_BOOTLOADER_OFFSET_FLASH (0x2000) // Bootloader offset in flash determined by the ROM bootloader

View File

@@ -112,7 +112,7 @@ uint32_t esp_rom_get_bootloader_offset(void)
#if CONFIG_IDF_TARGET_ESP32P4 && CONFIG_ESP32P4_REV_MIN_FULL < 300
// For early revisions of ESP32-P4 does not recovery bootloader feature.
// Return the default bootloader offset.
return CONFIG_BOOTLOADER_OFFSET_IN_FLASH;
return ESP_ROM_BOOTLOADER_OFFSET_FLASH;
#else
static uint32_t offset_of_active_bootloader = UINT32_MAX;
if (offset_of_active_bootloader == UINT32_MAX) {