Hello,
I’m trying to develop a very basic application using the NVS Flash encryption features on a ESP32 WROVER KIT.
I’m using:
- Platform: espressif32 version 1.11.2
- framework-espidf: I can’t find a versioning of this module. Is it maintained by Plateformio ? I’m asking this because I saw on the esp-idf Github that a new version 4.0 is out since last month and I was wondering how these updates are imported to Plateformio. How are these sources (esp-idf and Platformio framework-espidf) linked and updated ?
I activated the following options in my sdkconfig.h:
#define CONFIG_FLASH_ENCRYPTION_ENABLED 1
#define CONFIG_FLASH_ENCRYPTION_INSECURE 1
#define CONFIG_SECURE_BOOT_ALLOW_ROM_BASIC 1
#define CONFIG_SECURE_BOOT_ALLOW_JTAG 1
#define CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_ENCRYPT 1
#define CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_DECRYPT 1
#define CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE 1
#define CONFIG_NVS_ENCRYPTION 1
My problem is that the compilation of the bootloader fails:
.pio\build\esp-wrover-kit\bootloader\libbootloader_support.a(flash_encrypt.o):(.literal.encrypt_flash_contents+0x80): undefined reference to `esp_efuse_write_random_key'
.pio\build\esp-wrover-kit\bootloader\libbootloader_support.a(flash_encrypt.o):(.literal.encrypt_flash_contents+0x84): undefined reference to `esp_efuse_burn_new_values'
.pio\build\esp-wrover-kit\bootloader\libbootloader_support.a(flash_encrypt.o): In function `encrypt_flash_contents':
flash_encrypt.c:(.text.encrypt_flash_contents+0xcb): undefined reference to `esp_efuse_write_random_key'
flash_encrypt.c:(.text.encrypt_flash_contents+0xd1): undefined reference to `esp_efuse_burn_new_values'
flash_encrypt.c:(.text.encrypt_flash_contents+0xe2): undefined reference to `esp_efuse_burn_new_values'
flash_encrypt.c:(.text.encrypt_flash_contents+0x11b): undefined reference to `esp_efuse_burn_new_values'
flash_encrypt.c:(.text.encrypt_flash_contents+0x2ca): undefined reference to `esp_efuse_burn_new_values'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp-wrover-kit\bootloader.elf] Error 1
What am I missing ?
Note: New features for the Flash encryption has been added in the esp-idf 4.0 release (
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
). Is this related to my problem ?