Commit Graph

159 Commits

Author SHA1 Message Date
KonstantinKondrashov
d1befe83ef otatool: Fix incorrect using otadata.seq&crc in switch_ota_partition cmd
Closes: https://github.com/espressif/esp-idf/issues/6773
2021-04-23 04:55:06 +00:00
Angus Gratton
fda565a5bf Merge branch 'bugfix/partition_table_depends_esptoolpy' into 'master'
esptool_py: Fix issue where build with limited components doesn't include esptool_py

Closes IDFGH-4876 and IDFGH-4874

See merge request espressif/esp-idf!12653
2021-03-31 01:30:33 +00:00
KonstantinKondrashov
b72ace60a5 otatool: Fix a crash when imported as external python lib
Closes: https://github.com/espressif/esp-idf/issues/6733
2021-03-25 11:52:56 +00:00
KonstantinKondrashov
95564b4687 secure_boot: Secure Boot V2 verify app signature on update (without Secure boot)
- ESP32 ECO3, ESP32-S2/C3/S3
2021-03-15 12:30:20 +00:00
Angus Gratton
9c03f04769 esptool_py: Add esptool_py as a dependency for any component that uses it
Many components uses esptool_py_flash_target function, they all should
explicitly requier the esptool_py component.

Related to https://github.com/espressif/esp-idf/issues/6670
2021-03-08 19:47:38 +11:00
KonstantinKondrashov
b7155a161b otatool: Fixes read_ota_partition cmd, required output arg
Closes: https://github.com/espressif/esp-idf/issues/6559
2021-03-04 06:02:54 +00:00
Mahavir Jain
3fa22ffa55
app_update: fix warnings in tests for ESP32-C3 build 2021-01-27 12:50:06 +05:30
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
Angus Gratton
a7da0c894b Merge branch 'feature/c3_master_flash_enc_support' into 'master'
flash encryption: merge C3 flash encryption changes to master

See merge request espressif/esp-idf!12040
2021-01-22 12:58:38 +08:00
Angus Gratton
fe8a891de9 Merge branch 'feature/support_esp32c3_master_cmake_secure_boot' into 'master'
bootloader/esp32c3: Support secure boot

Closes IDF-2115

See merge request espressif/esp-idf!11797
2021-01-21 08:42:49 +08:00
KonstantinKondrashov
98f726fa4b bootloader/esp32c3: Adds secure boot (not yet supported) 2021-01-19 20:51:13 +08:00
Marius Vikhammer
03fa63b0c9 bootloader: add flash encryption support for C3
Adds flash encryption support for C3 and updates docs for S2 & C3
2021-01-18 14:10:54 +08:00
Angus Gratton
317c882133 Merge branch 'bugfix/elf_sha256_first_byte_skip' into 'master'
app_update: fix incorrect first byte from esp_ota_get_app_elf_sha256

Closes IDFGH-4572

See merge request espressif/esp-idf!11981
2021-01-15 06:55:15 +08:00
Itay Perl
563bc5d19d app_update: fix incorrect first byte from esp_ota_get_app_elf_sha256
At -O2 optimization level, GCC seems to optimize out the copying of the
first byte of the checksum, assuming it is zero. This "miscompilation"
happens because the esp_app_desc struct is declared const, but then modified
post-compilation. Casting to volatile disables the optimization.

Closes: https://github.com/espressif/esp-idf/pull/6389
2021-01-14 17:10:49 +08:00
Angus Gratton
92ae75f955 Merge branch 'feature/support_serial_port_env_args_in_tools' into 'master'
Support port and baud env args for otatool targets

Closes IDFGH-3289

See merge request espressif/esp-idf!10812
2021-01-14 07:51:45 +08:00
morris
753a929525 global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
Renz Bagaporo
84d3b0f81d otatool: let fail early on exception
otatool gives a 'target has no otadata' error instead of the real cause
(because of wrong port specified, for example)
2020-12-17 11:25:32 +08:00
Renz Bagaporo
a926039575 esptool_py: simplify serial tool script 2020-12-17 11:25:32 +08:00
Renz Bagaporo
dec7b86721 app_update: support port and baud env variables for otatool targets
Closes https://github.com/espressif/esp-idf/issues/5280
2020-12-17 11:25:32 +08:00
Anton Maklakov
df544dee30 tools: Redirect some warnings to stderr 2020-12-15 12:41:20 +07:00
lucastcox
d5d722c66f app_update: Add definition for esp_ota_abort
Closes: https://github.com/espressif/esp-idf/issues/5329
Merges: https://github.com/espressif/esp-idf/pull/5331

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2020-12-03 14:49:52 +05:30
martin.gano
f4ea2dcb74 Tools: add Python 2 deprecation warning 2020-12-02 11:08:48 +01:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Michael (XIAO Xufeng)
3b2e8648eb bootloader: create public bootloader_flash.h header
Move non-public functions into bootloader_flash_priv.h header
2020-09-19 10:52:02 +08:00
Ivan Grokhotkov
b6467257b9 Merge branch 'feature/cmock_component' into 'master'
cmock as component replacing unity

See merge request espressif/esp-idf!9859
2020-09-10 16:06:20 +08:00
Peter Hoddie
3a768f51c3 app_update: add support for incremental flash erase
This patch modifies the OTA implementation to incremental erase flash sectors
as they are written, rather than bulk erasing them all at once when OTA begins.

This solves several problems:
- The bulk flash erase can take so long that it triggers the watchdog timer.
  Disabling the watchdog is an undesirable risk.
- The bulk erase interferes with the responsiveness of the system to user input.
- Incremental erasing eliminates the need to pass the firmware image size to
  esp_ota_begin to avoid erasing more flash sectors than required.
- When installing an OTA received via HTTP, the size of the firmware image is
  known when the content-length header is received. Calling esp_ota_begin at that
  time causes a long delay to do the bulk erase which causes the TCP transfer
  speed to be measurably slowed when the transfer resumes after the erase.
  Incremental erasing eliminates this TCP slowdown.

Update:
Rework so erase optimization is only applied when image_size is set to
OTA_WITH_SEQUENTIAL_WRITES #5246

Merges https://github.com/espressif/esp-idf/pull/5246
2020-09-04 12:05:02 +05:30
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Supreet Deshpande
e640e148cf Secure boot v2 support for ESP32-S2 2020-07-27 00:01:10 +00:00
morris
a4d0033c03 esp_rom: extract common GPIO apis into esp_rom_gpio.h 2020-07-07 11:40:19 +08:00
morris
a34409cffc esp_rom: extract common CRC apis into esp_rom_crc.h 2020-06-23 16:40:14 +08:00
Shubham Kulkarni
6a1b3221c4 app_update: Add API to write data in a non contiguous manner 2020-05-28 10:18:55 +05:30
Shubham Kulkarni
c82a4d59ee esp_ota_ops.c: Fix size calculation to erase partition range for OTA image
Closes https://github.com/espressif/esp-idf/issues/4953
2020-03-31 14:58:32 +00:00
Ivan Grokhotkov
8aad738f02 Merge branch 'bugfix/ota_get_sha256_test_fail' into 'master'
app_update: fix test failure for get_app_elf_sha256 test

See merge request espressif/esp-idf!8096
2020-03-25 21:20:25 +08:00
Angus Gratton
62426a6c90 Merge branch 'refactor/use_new_component_registration_functions' into 'master'
CMake: Use new component registration function

See merge request espressif/esp-idf!8068
2020-03-25 08:02:42 +08:00
Marius Vikhammer
694c332cb2 app_update: fix test failure for get_app_elf_sha256 test
Commit fc03161f updated esp_ota_get_app_elf_sha256 to store and return
X number of bytes of the hash, but the test case still expected 64 bytes.

Updated test case to use CONFIG value for expected length.
2020-03-24 12:34:49 +08:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
KonstantinKondrashov
fc03161f70 app_update: Fix case when elf file SHA256 should be printed by panic handler while cache is disabled
Closes: IDF-1342
2020-03-10 20:26:03 +08:00
michael
1c7ffbaa19 app_update: rename ut name 2020-02-15 18:28:25 +08:00
KonstantinKondrashov
aa42177e19 app_update(s2): Enable app_update UTs
Closes: IDF-1007
2020-01-31 10:34:08 +00:00
morris
e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
Ivan Grokhotkov
c11f77cb1a Merge branch 'feature/use_underlying_cmake_targets_for_idf_py' into 'master'
CMake: Use underlying flash targets for idf.py

See merge request espressif/esp-idf!7067
2020-01-21 17:05:47 +08:00
KonstantinKondrashov
b49a657448 build: Add CONFIG_APP_PROJECT_VER to set the project version from Kconfig 2020-01-15 11:02:27 +00:00
Renz Christian Bagaporo
cc8bff703e esptool_py: create flash target functions 2020-01-15 03:36:47 +00:00
michael
4220752aed ut: Move tests back from "esp32" subfolder
DISABLED_FOR_TARGETS macros are used

Partly revert "ci: disable unavailable tests for esp32s2beta"

This partly reverts commit 76a3a5fb48.

Partly revert "ci: disable UTs for esp32s2beta without runners"

This partly reverts commit eb158e9a22.

Partly revert "fix unit test and examples for s2beta"

This partly reverts commit 9baa7826be.

Partly revert "efuse: Add support for esp32s2beta"

This partly reverts commit db84ba868c.
2020-01-06 17:13:53 +08:00
KonstantinKondrashov
6257828348 app_update: Add support esp32s2beta 2019-09-20 16:57:33 +10:00
Angus Gratton
adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Jiang Jiang Jian
d78831ab2b Merge branch 'bugfix/remove_v40_deprecations' into 'master'
Remove features deprecated before ESP-IDF V4.0

Closes IDF-507

See merge request espressif/esp-idf!5841
2019-09-19 16:07:01 +08:00
suda-morris
dd248ffc32 Add chip revision into image header
Check chip id and chip revision before boot app image

Closes https://github.com/espressif/esp-idf/issues/4000
2019-09-16 18:13:53 +08:00
Angus Gratton
438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Angus Gratton
f44d99b509 app_update: Remove deprecated "make erase_ota" target
Deprecated in v3.2
2019-09-13 09:44:07 +10:00