Skip to content

Commit

Permalink
fix: Change wrap triggered only when compressed ota is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
WangYuxin-esp committed Dec 12, 2023
1 parent 5e4b981 commit 7db59b2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions components/bootloader_support_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## v0.2.2 - 2023-12-12

### Fix:

* Change wrap to be triggered only when the CONFIG_BOOTLOADER_COMPRESSED_ENABLED is enabled.

## v0.2.1 - 2023-04-23

### Fix:
Expand Down
14 changes: 9 additions & 5 deletions components/bootloader_support_plus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(srcs "src/bootloader_custom_image_format.c"
set(requires "bootloader" "bootloader_support" "spi_flash")

if(BOOTLOADER_BUILD)
list(APPEND srcs "src/bootloader_custom_malloc.c"
"src/bootloader_decompressor_common.c"
list(APPEND srcs "src/bootloader_custom_malloc.c"
"src/bootloader_decompressor_common.c"
"src/bootloader_storage_flash.c")
else()
list(APPEND requires "app_update" "esp_partition")
Expand Down Expand Up @@ -38,7 +38,9 @@ if(BOOTLOADER_BUILD)
target_linker_script(${COMPONENT_LIB} INTERFACE "ld/${CONFIG_IDF_TARGET}/linker.lf")
endif()
else()
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=esp_ota_get_next_update_partition")
if(CONFIG_BOOTLOADER_COMPRESSED_ENABLED)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=esp_ota_get_next_update_partition")
endif()

# Force app_update to also appear later than bootloader_support_plus in link line
idf_component_get_property(app_update app_update COMPONENT_LIB)
Expand All @@ -52,7 +54,9 @@ else()

endif()

target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=esp_image_verify")
if(CONFIG_BOOTLOADER_COMPRESSED_ENABLED)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=esp_image_verify")
endif()

include(package_manager)
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})
4 changes: 2 additions & 2 deletions components/bootloader_support_plus/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.2.1"
version: "0.2.2"
targets:
- esp32c2
- esp32c3
Expand All @@ -13,4 +13,4 @@ dependencies:
cmake_utilities: "0.*"
xz: "1.*"
examples:
- path: ../../examples/ota/simple_ota_example
- path: ../../examples/ota/simple_ota_example

0 comments on commit 7db59b2

Please sign in to comment.