From: Arno Moonen <arno.moonen@airios.eu>
Follows original message from Arno Moonen <arno.moonen@airios.eu>
While integrating the ESP-IDF into our existing CMake structure,
I've come across quite some hurdles. Most I've been able to fix
in our CMake files, however this one I could not.
Most of the targets created by the esptool_py component assume
that the EXECUTABLE IDF build property (which contains the name
of the CMake executable target) always equals the name of the
created binary.
This is however not always true. For instance, in our setup we use
CMAKE_EXECUTABLE_SUFFIX_C and CMAKE_EXECUTABLE_SUFFIX_CXX in our
toolchain file (both set to .elf). If we do add_executable(my_app),
the target binary file would actually be my_app.elf.
In order to fix this, I've updated it to use the TARGET_FILE generated
expression. That way we also no longer need the EXECUTABLE_DIR IDF build
property here.
I've fixed this on v5.0.1 (as that's the ESP-IDF version I'm currently
trying to integrate), but I assume it should be easy to apply the same
fix to newer versions and the master branch as well.
Note that this problem might exist in multiple places where EXECUTABLE
is being used. While going through the ESP-IDF code base, I even noticed
that a few places actually already seem to use the TARGET_FILE expression.
To be honest the property name might be somewhat confusing as well, as it
is actually the executable target.
Closes https://github.com/espressif/esp-idf/pull/12558
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
When SECURE BOOT V2 is enabled and CONFIG_SECURE_BOOT_SIGNED_BINARIES
is not set, sector-pad the bootloader image, which is required for an
external PKCS#11 interface to generate a signature.
For project with reduced component list, secure boot signing key
path was not getting correctly. This change sets the secure boot
signing key path explicitly based on the relevant config option.
Closes https://github.com/espressif/esp-idf/issues/9578
Close IDFGH-8075
9c46c98b4c have changed the default value
of ESPTOOLPY_FLASHSIZE_DETECT. As the side effect, existing
projects (having the option still enabled) started to discard the SHA256 digest.
Rename the ESPTOOLPY_FLASHSIZE_DETECT option so existing projects would
have the value disabled by default.
Closes https://github.com/espressif/esp-idf/issues/9148
Append elf2image args so that "--dont-append-digest" do not override earlier
flash settings.
This was observed in case of ESP32-C2 image build where image build was failing
with `CONFIG_ESPTOOLPY_FLASHSIZE_DETECT`.
Related from earlier commit: 9c46c98b4c
Fixes WORKING_DIRECTORY argument being passed with spaces escaped `\ `
which causes failure in run_cmd.cmake, since the WORKING_DIRECTORY is
interpreted as having a literal backslash character in it.
Updates the following with changes from verification branches:
* esp_rom linker files
* rtc_cntl and system reg and struct headers
Also updates:
* GDMA driver with new register layout
* esptool submodule commit
Changed optional value parameter 'encrypted' to a named parameter
called 'ALWAYS_PLAINTEXT'. This flag can be passed to:
- esptool_py_flash_target
- esptool_py_flash_target_image
Fix wrong identation.
- Add the function esptool_py_flash_to_partition to flash a binary
image to a named partition. If encryption is enabled, this function
will also determine if the partition needs to be encrypted or not
according the its type, subtype and flag in the CSV file (if any).
- Use idf.py encrypted-flash will now flash both encrypted and
non-encrypted file if any (spiffs for example) using esptool.py's
--encrypt-files option.
Closes IDF-2387
Relates to IDF-723
Relates to IDF-2231
Currently USB CDC Download requires the `--no-stub` option of `esptool`. This change inverts the Kconfig option to negative, so that it can be `selected` by other options or enabled in applications through `sdkconfig.defaults`.