Skip to content

Commit

Permalink
Add all Esp32-x BOOTLOADER_OFFSET
Browse files Browse the repository at this point in the history
Esp32-S2 Offset was not correct - this PR adds all offsets as documented here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/bootloader.html

Signed-off-by: Peter M <[email protected]>
  • Loading branch information
petermm committed Mar 1, 2024
1 parent f9eaea9 commit f895c41
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions src/platforms/esp32/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f895c41

Please sign in to comment.