Commit Graph

83 Commits

Author SHA1 Message Date
Renz Christian Bagaporo
ffec9d4947 components: update with build system changes 2019-05-13 19:59:17 +08:00
Michael (XIAO Xufeng)
562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Angus Gratton
5136b76798 Merge branch 'feature/micro-ecc-only-in-bootloader' into 'master'
Use micro_ecc library only in bootloader

See merge request idf/esp-idf!4082
2019-04-04 14:26:48 +08:00
Mahavir Jain
816fe38f3a app_update: remove redundant (additional) check for signature verification
Call `esp_image_verify` takes care of validating image signature.
2019-04-01 15:47:01 +05:30
Renz Christian Bagaporo
7112b9492e make: fix undefined variables warning for PARTITION_TABLE_BIN
Closes https://github.com/espressif/esp-idf/issues/3136
2019-03-27 21:02:55 +08:00
Angus Gratton
1be147c457 Merge branch 'feature/allow_components_to_declare_images_to_flash' into 'master'
Allow components to present their own images to flash

See merge request idf/esp-idf!4148
2019-03-22 11:14:37 +08:00
morris
c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
morris
fae39dc326 merge esp_flash_data_types into esp_flash_partitions 2019-03-18 08:51:55 +00:00
Renz Christian Bagaporo
234de8de55 cmake: Allow components to present their own images to flash 2019-03-18 03:45:22 +08:00
Ivan Grokhotkov
ea52a19c00 build system: include SHA256 hash of ELF file into app_desc structure 2019-02-27 13:30:25 +08:00
Konstantin Kondrashov
e916cf52a3 bootloader: Add support of anti-rollback
Added:
* set a secure version in app/bootloader.
* description anti-rollback to ota part
* emulate the secure_version write and read operations
* efuse_em partition.
* a description about a rollback for native_ota_example.

Closes: TW26335
2019-02-14 18:51:43 +08:00
Angus Gratton
985e1c4c7f Merge branch 'bugfix/invoke_ota_operations_on_windows' into 'master'
Fix permission denied error on Windows for otatool, parttool

See merge request idf/esp-idf!4086
2019-02-05 09:15:22 +08:00
Ivan Grokhotkov
58b5394266 Merge branch 'bugfix/git_describe_always_for_cmake' into 'master'
tools: Add --always option to git describe for Cmake

See merge request idf/esp-idf!4107
2019-01-30 17:48:11 +08:00
Roland Dobai
37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
KonstantinKondrashov
00c1a40006 app_update: Fix a handling of version as string 2019-01-24 12:13:38 +08:00
Renz Christian Bagaporo
62f1f9f87a otatool, parttool: Fix permission denied error on Windows 2019-01-14 06:05:39 +08:00
Angus Gratton
78487123bf Merge branch 'feature/cut_len_for_header_struct' into 'master'
build: Add trimming PROJECT_VER and PROJECT_NAME vars

See merge request idf/esp-idf!3927
2018-12-21 07:45:22 +08:00
Angus Gratton
ad200227d2 Merge branch 'feature/add_rollback_flags' into 'master'
bootloader/app_update: Add a support of an app rollback.

See merge request idf/esp-idf!3547
2018-12-19 14:28:11 +08:00
Konstantin Kondrashov
51133083f6 app_update: Add EXCLUDE option
Added two options for PROJECT_NAME and PROJECT_VER variables to exclude them from the firmware image.

Closes: https://github.com/espressif/esp-idf/issues/2803
2018-12-18 15:58:47 +08:00
Konstantin Kondrashov
7b68e346fa build: Fix a warning from git describe
Fixed a fatal message when run `git describe`.
2018-12-18 15:58:22 +08:00
Supreet Deshpande
1d4bb7cc4d bugfix/ota_magic_byte_issue: Fix indent and replace constant by macro
Replace 0xE9 by ESP_IMAGE_HEADER_MAGIC.
2018-12-17 09:56:18 +05:30
Konstantin Kondrashov
dde1fd9b94 bootloader: Add support flags for rollback app
Added
* Set actual ota_seq if both ota are init or incorrect.
* Description of rollback
* UT tests

Closes TW15459
2018-12-11 11:54:21 +08:00
Konstantin Kondrashov
c0f5e58bdc build: Add trimming PROJECT_VER and PROJECT_NAME vars 2018-12-11 11:23:53 +08:00
Supreet Deshpande
55d5ee1e79 bugfix/ota_magic_byte_issue: Fixes OTA magic byte error
On enabling flash encryption, OTA fails with magic byte error in the second chunk
if the http data is split into two or more chunks and first chunk is less than 16.
2018-12-10 17:16:38 +05:30
Konstantin Kondrashov
d4cb14bc65 app_update: Fix esp_app_desc unused var for Cmake 2018-12-07 12:04:40 +08:00
Ivan Grokhotkov
e04fd42176 Merge branch 'feature/refactoring_ota_part' into 'master'
bootloader/app_update: Refactoring otadata part

See merge request idf/esp-idf!3544
2018-12-05 12:59:34 +08:00
Angus Gratton
36be9b36dd Merge branch 'bugfix/fix_menuconfig_for_windows' into 'master'
Fix various errors for menuconfig on Windows

Closes #50

See merge request idf/esp-idf!3848
2018-12-05 11:34:49 +08:00
Konstantin Kondrashov
f9522a0eb6 bootloader app_update: Refactoring otadata part 2018-12-05 11:20:03 +08:00
Anton Maklakov
deaecf164d make: fix unexpected operator warning 2018-12-05 07:54:59 +08:00
Konstantin Kondrashov
3b9cb25fe1 esp32: Add firmware version to app
Added a new structure esp_app_desc_t. It has info about firmware:
version, secure_version, project_name, time/date build and IDF version.
Added the ability to add a custom structure with a description of the firmware.

The esp_app_desc_t is located in fixed place in start of ROM secotor. It is located after structures esp_image_header_t and esp_image_segment_header_t.

app_version is filed from PROJECT_VER variable (if set in custom make file) or PROJECT_PATH/version.txt or git repo (git describe).

Add API to get app_desc from partition.
2018-12-03 16:52:04 +08:00
Renz Christian Bagaporo
5e08698039 make: use otatool and parttool for build 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo
bceec35d0e cmake: use otatool and parttool for build 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo
8ca6904d55 ota: implement otatool functionality 2018-11-28 15:57:20 +08:00
Renz Christian Bagaporo
37d30c7a6e cmake: separate app from idf lib project
mbedtls: import mbedtls using unmodified cmake file
2018-11-27 13:59:24 +08:00
Ivan Grokhotkov
6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Renz Bagaporo
cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Mahavir Jain
26845936b3 app_update: remove unrequired static attribute from mmap handle 2018-10-18 04:38:31 +00:00
Mahavir Jain
b3aff63db4 app_update: fix intermittent failure with firmware updates
Routine `spi_flash_cache2phys` sometimes return incorrect value,
resulting in failure in getting currently running ota partition.
This in turn aborts firmware update process.This issue was more
prominent with SPIRAM enabled cases.

Fix ensures proper cache guards during `spi_flash_cache2phys`, and
also for few other similar APIs.

In addition, `esp_ota_get_running_partition` has also been optimized
to save currently running partition for subsequent invocations.

Fixes https://github.com/espressif/esp-idf/issues/2451
2018-10-18 04:38:31 +00:00
Roland Dobai
baca21050f app_update: Make gen_empty_partition.py Python 2 & 3 compatible
Closes https://github.com/espressif/esp-idf/issues/2457
2018-09-24 12:16:16 +02:00
Renz Christian Bagaporo
d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton
b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Ivan Grokhotkov
2469718481 Merge branch 'bugfix/check_python_order_only_prereq' into 'master'
Use check_python_dependencies everywhere as order-only-prerequisite

See merge request idf/esp-idf!3174
2018-09-04 20:31:49 +08:00
Roland Dobai
f755a0371d Use check_python_dependencies everywhere as order-only-prerequisite 2018-09-03 11:42:10 +02:00
Angus Gratton
38c0626090 cmake app_update: Add "flash blank otadata" functionality to cmake 2018-08-31 12:30:14 +08:00
Angus Gratton
a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Angus Gratton
b364f23e17 secure boot: Support secure boot signatures without hardware secure boot
Allows OTA updates to be secured via signature checks, without requiring the overhead or complexity
of a full secure boot implementation.

Uses same signing mechanisms (build system and/or espsecure.py as Secure Boot).

Requires:
* [ ] More testing
* [ ] Documentation
2018-08-29 17:05:29 +08:00
Angus Gratton
6c95285bdb Merge branch 'bugfix/app_update_test' into 'master'
app_update: Change NUM_PIN_APP_TEST for unit test

See merge request idf/esp-idf!3050
2018-08-27 08:46:02 +08:00
Konstantin Kondrashov
4e28799709 app_update: Change NUM_PIN_APP_TEST for unit test
Fixed error when `make TESTS_ALL=1`
2018-08-24 16:52:27 +08:00
Angus Gratton
31ae3fe683 make: Use order-only prereq to check python dependencies 2018-08-23 08:28:57 +02:00
Roland Dobai
62cad3a7d7 Add python-future by using python requirements file 2018-08-23 08:28:57 +02:00