Commit Graph

136 Commits

Author SHA1 Message Date
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
Michael (XIAO Xufeng)
76a3a5fb48 ci: disable unavailable tests for esp32s2beta 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng)
9baa7826be fix unit test and examples for s2beta 2019-09-04 10:53:25 +10:00
Renz Christian Bagaporo
a4ee680bbf app_update: use build system api to get partition_table dir 2019-09-03 19:47:53 +08:00
KonstantinKondrashov
30953ba9c4 app_update: Fix UTs for FACTORY_RESET and APP_TEST 2019-08-23 10:21:06 +00:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton
24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
Anton Maklakov
75c0066f93 Fix remaining -Wstrict-prototypes warnings 2019-08-01 16:28:56 +07:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
KonstantinKondrashov
17791d5384 app_update: Add [timeout=90] 2019-07-17 10:28:50 +08:00
Roland Dobai
3552ca4d6a app_update: Add the baud option into otatool 2019-07-10 15:09:46 +02:00
Roland Dobai
3f47269211 app_update: Fix argument of ParttoolTarget 2019-07-10 15:09:46 +02:00
Renz Christian Bagaporo
94e0569c2b make, cmake: pass config esptool args for otatool invocation
Closes https://github.com/espressif/esp-idf/issues/3135
2019-07-05 02:26:00 +00:00
Renz Christian Bagaporo
2360d882d9 parttool, otatool: accept esptool args 2019-07-05 02:26:00 +00:00
Renz Christian Bagaporo
179259f195 components: restore dependency of extra bins on flash target 2019-06-28 10:50:52 +08:00
Hemal Gujarathi
a68c7c21e1 Improve flash encryption documentation and add Development & Release modes
This MR improves existing flash encryption document to provide simplified steps
Adds two new modes for user: Development & Release
Adds a simple example
Supports encrypted write through make command
2019-06-25 23:41:18 +00:00
Renz Christian Bagaporo
9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Angus Gratton
78b7b137ad Merge branch 'feature/otatool_parttool_python_api' into 'master'
otatool, parttool Python API

See merge request idf/esp-idf!5077
2019-06-13 10:31:29 +08:00
Renz Christian Bagaporo
3882e48e8a cmake: use new signature form of target_link_library to link components
!4452 used setting LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES to link
components built under ESP-IDF build system. However, LINK_LIBRARIES does
not produce behavior same as linking PRIVATE. This MR uses the new
signature for target_link_libraries directly instead. This also moves
setting dependencies during component registration rather than after all
components have been processed.

The consequence is that internally, components have to use the new
signature form as well. This does not affect linking the components to
external targets, such as with idf_as_lib example. This only affects
linking additional libraries to ESP-IDF libraries outside component processing (after
idf_build_process), which is not even possible for CMake<v3.13 as
target_link_libraries is not valid for targets not created in current
directory. See https://cmake.org/cmake/help/v3.13/policy/CMP0079.html#policy:CMP0079
2019-06-11 18:09:26 +08:00
Renz Christian Bagaporo
3836aa9ae6 partition_table,app_update: use config partition table offset 2019-06-11 13:17:14 +08:00
Renz Christian Bagaporo
1de627e68a app_update: implement Python API for otatool 2019-06-11 13:17:14 +08:00
suda-morris
84b2f9f14d build and link hello-world for esp32s2beta 2019-06-11 13:07:37 +08:00
Konstantin Kondrashov
399d2d2605 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
2019-06-03 14:15:08 +08:00