LTO shifts compilation to the final link, allowing for more aggressive optimisations.
AR & RANLIB need to use their gcc equivalents to enable this, and will otherwise behave identically if LTO data is not in the objects.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
The order of partitions should also be taken into account as the factory partition may be
allocated for a bootloader (e.g. Adafruit's custom partition file with a UF2 bootloader) and
appear after ota_0 used for app
- Added several new boards (including Nano ESP32) // Resolves#1162
- Added DFU upload method via dfu-util for the new Arduino Nano ESP32
- Updated IDF version to v4.4.5 for mixed Arduino/IDF projects
For better results a partition with either `factory` or `ota_0` subtype should be used instead of selecting the biggest partition size with the type `app`.
If both partitions are set, then the partition with the `factory` subtype is used by default.
opi needs to be flashed in mode `dout` to work. Changed flash mode for `qout` since it can be flashed in `dio`.
This is the way espressif now does in IDF
This approach is less intrusive than merging the entire application into one binary
implemented in #006d64e8b268e479703a0aac7eed8bef1ebea587
In this implementation we safely copy the required bootloader binary to the
build directory, adjust the headers via esptoolpy and the "merge_bin" command
according to --flash-size and --flash-mode arguments.
Resolves#872
Arduino core v2.0.4 contains updated bootloader images that have innacurate default headers. This results in bootloops if firmware is flashed via OpenOCD (e.g. debugging or
uploading via debug tools). For this reason, before uploading or debugging we need to merge all binaries (firmware, bootloader, partitions, etc.) via esptoolpy so that
the image headers will be adjusted according to --flash-size and --flash-mode arguments.
Note that this behavior doesn't occur if uploading is done via esptoolpy, as esptoolpy overrides the binary image headers before flashing.
- Add extra data to "projenv" as well so that the extra data it can be overridden after the BuildProgram routine
- Use the new INTEGRATION_EXTRA_DATA env variable instead of IDE_EXTRA_DATA