Merge branch 'fix/coredump_sha_build_error_v5.2' into 'release/v5.2'

fix(esp-coredump): fix build error when mbedtls hardware sha disabled (v5.2)

See merge request espressif/esp-idf!33944
This commit is contained in:
Mahavir Jain 2024-10-01 18:02:34 +08:00
commit 3d2c12dc0a
3 changed files with 8 additions and 0 deletions

View File

@ -31,7 +31,9 @@ static void core_dump_sha256_start(core_dump_sha_ctx_t *sha_ctx)
static void core_dump_sha256_update(core_dump_sha_ctx_t *sha_ctx, const void *data, size_t data_len) static void core_dump_sha256_update(core_dump_sha_ctx_t *sha_ctx, const void *data, size_t data_len)
{ {
// set software mode of SHA calculation // set software mode of SHA calculation
#if CONFIG_MBEDTLS_HARDWARE_SHA
sha_ctx->ctx.mode = ESP_MBEDTLS_SHA256_SOFTWARE; sha_ctx->ctx.mode = ESP_MBEDTLS_SHA256_SOFTWARE;
#endif
mbedtls_sha256_update(&sha_ctx->ctx, data, data_len); mbedtls_sha256_update(&sha_ctx->ctx, data, data_len);
} }

View File

@ -47,6 +47,7 @@ TARGETS_DUAL_CORE = TARGETS_XTENSA_DUAL_CORE
CONFIGS = [ CONFIGS = [
pytest.param('coredump_flash_bin_crc', marks=TARGETS_ALL), pytest.param('coredump_flash_bin_crc', marks=TARGETS_ALL),
pytest.param('coredump_flash_elf_sha', marks=TARGETS_ALL), pytest.param('coredump_flash_elf_sha', marks=TARGETS_ALL),
pytest.param('coredump_flash_elf_soft_sha', marks=TARGETS_ALL),
pytest.param('coredump_uart_bin_crc', marks=TARGETS_ALL), pytest.param('coredump_uart_bin_crc', marks=TARGETS_ALL),
pytest.param('coredump_uart_elf_crc', marks=TARGETS_ALL), pytest.param('coredump_uart_elf_crc', marks=TARGETS_ALL),
pytest.param('coredump_flash_custom_stack', marks=TARGETS_RISCV), pytest.param('coredump_flash_custom_stack', marks=TARGETS_RISCV),

View File

@ -0,0 +1,5 @@
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y
CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_MBEDTLS_HARDWARE_SHA=n