diff --git a/CHANGELOG.md b/CHANGELOG.md index ec754bf80..f9a585780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.6.0-rc.0] - Unreleased +### Added + +- `BOOTLOADER_OFFSET` for all current Esp32 models. + +### Fixed + +- `BOOTLOADER_OFFSET` was incorrect for Esp32-C6 and Esp32-S2. + +### Changed + ## [0.6.0-beta.1] - 2024-02-28 ### Added diff --git a/src/platforms/esp32/tools/CMakeLists.txt b/src/platforms/esp32/tools/CMakeLists.txt index aedcd3389..f39d2cb0b 100644 --- a/src/platforms/esp32/tools/CMakeLists.txt +++ b/src/platforms/esp32/tools/CMakeLists.txt @@ -23,15 +23,24 @@ project (ReleaseEsp32) ## Build image tools for target chip +# BOOTLOADER_OFFSET +# https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/bootloader.html + set(BOOTLOADER_OFFSET "0x1000") -if(${CONFIG_IDF_TARGET} STREQUAL "esp32s3") +if( ${CONFIG_IDF_TARGET} STREQUAL "esp32s2") + set(BOOTLOADER_OFFSET "0x1000") +elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32s3") + set(BOOTLOADER_OFFSET "0x0") +elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32c2") set(BOOTLOADER_OFFSET "0x0") elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32c3") set(BOOTLOADER_OFFSET "0x0") elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32c6") set(BOOTLOADER_OFFSET "0x0") -elseif( ${CONFIG_IDF_TARGET} STREQUAL "esp32s2") +elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32h2") set(BOOTLOADER_OFFSET "0x0") +elseif(${CONFIG_IDF_TARGET} STREQUAL "esp32p4") + set(BOOTLOADER_OFFSET "0x2000") endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mkimage.config.in ${CMAKE_BINARY_DIR}/mkimage.config)