esp-idf/components/bootloader_support
Mahavir Jain 4aaf02b093
bootloader_support: fix stringop-overflow warning with PERF compiler optimization
This commit fixes build issue because of function `bootloader_common_reset_rtc_retain_mem`
getting inlined with compiler optimization level set to `PERF` (-O2).

Build failure log:
-----------------

In function 'bootloader_common_reset_rtc_retain_mem',
    inlined from 'bootloader_common_update_rtc_retain_mem' at /h/esp-idf/components/bootloader_support/src/bootloader_common_loader.c:183:13:
/h/esp-idf/components/bootloader_support/src/bootloader_common_loader.c:159:5: error: 'memset' writing 16 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  159 |     memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-05 10:42:11 +05:30
..
bootloader_flash bootloader_flash: Some bootloader flash functions are not put in IRAM 2022-08-29 17:24:05 +08:00
include Bootloader: retained memory can now be kept after reboot when custom data enabled 2022-08-31 03:23:30 +00:00
private_include refactor (bootloader_support, efuse)!: remove target-specific rom includes 2022-07-13 10:29:02 +08:00
src bootloader_support: fix stringop-overflow warning with PERF compiler optimization 2022-09-05 10:42:11 +05:30
test build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
test_apps/rtc_custom_section Bootloader: retained memory can now be kept after reboot when custom data enabled 2022-08-31 03:23:30 +00:00
.build-test-rules.yml Bootloader: retained memory can now be kept after reboot when custom data enabled 2022-08-31 03:23:30 +00:00
CMakeLists.txt esp_app_format: Fixed build errors and resolved dependencies 2022-08-17 10:59:31 +05:30
README.rst Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00

Bootloader Support Component
============================

Overview
--------

"Bootloader support" contains APIs which are used by the bootloader but are also needed for the main app.

Code in this component needs to be aware of being executed in a bootloader environment (no RTOS available, BOOTLOADER_BUILD macro set) or in an esp-idf app environment (RTOS running, need locking support.)