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 <petermm@gmail.com>
  • Loading branch information
petermm committed Feb 29, 2024
1 parent 84edf91 commit d07787e
Showing 1 changed file with 11 additions and 2 deletions.
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 d07787e

Please sign in to comment.