Commit graph

83 commits

Author SHA1 Message Date
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
Anurag Kar 1f6622b2d1 CMake : Secure Boot support added 2018-11-06 17:09:55 +05:30
Renz Bagaporo cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Sagar Bijwe 48fccbf5dd nvs_flash: Add support for nvs encryption 2018-09-24 11:25:21 +05:30
Roland Dobai 4465dc29bb partition_table: Fix encoding for Python 2.7.3
struct.pack can handle Unicode argument in latest Python 2.7 but cannot
(at least) in 2.7.3.
2018-09-20 12:01:54 +02:00
Ivan Grokhotkov f5e772242d Merge branch 'feature/py23_partition_table' into 'master'
partition_table: Add Python 2 & 3 support

See merge request idf/esp-idf!3290
2018-09-20 12:09:12 +08:00
Deomid Ryabkov d40bfd21dc Remove trailing spaces from parttool.py output 2018-09-18 16:49:30 +03:00
Roland Dobai 9dc024bc4c partition_table: Add Python 2 & 3 support 2018-09-18 14:10:55 +02:00
Konstantin Kondrashov 2a87f00942 partition_table: Check - partition names must be unique 2018-09-12 10:58:38 +08:00
Angus Gratton b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Roland Dobai f755a0371d Use check_python_dependencies everywhere as order-only-prerequisite 2018-09-03 11:42:10 +02:00
Angus Gratton a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Angus Gratton 49a910adfb cmake: partition_table: Use PYTHON interpreter when running parttool.py (fixes flasher args on Windows) 2018-08-29 20:22:55 +08:00
Angus Gratton cb158f1194 cmake: Account for missing partition CSV file at cmake runtime
Avoid either breaking menuconfig (if cmake fails), or producing bad build output (if cmake succeeds
but no flashing offsets, etc. were generated.)
2018-08-29 20:22:55 +08:00
Angus Gratton 7f06543817 cmake/partitions: Apply offset to partition table metadata correctly
Also warn if the parttool.py has an error
2018-08-29 20:22:55 +08:00
Angus Gratton 068a3e2f6a cmake: Fix flasher argument generation 2018-08-29 19:37:19 +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
Angus Gratton ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Angus Gratton 6dea5c9546 partition table: Remove hard-coded offsets from default partition tables
Makes them compatible with moving the partition table offset
2018-08-01 19:23:38 +10:00
Angus Gratton 28801449e3 partition_table: Hard error if CSV contains invalid/overlapping offsets
Based on report on forum here:
https://esp32.com/viewtopic.php?f=13&t=6382&p=27514

Previous versions were much more relaxed about what could be in the partition
table, erroring out avoids unexpected changes on upgrade like different
partition offsets.
2018-08-01 19:23:38 +10:00
Konstantin Kondrashov de2b1cb02a make: Add feature to cmd 'make flash' - reset ota_data partition
Add a command `make erase_ota` - erases otadata if it there is in the
partition table otherwise error 'Partition table does not have ota_data partition'.

Closes https://github.com/espressif/esp-idf/issues/1821
2018-07-25 11:22:15 +00:00
Angus Gratton 57b601ab7f secure boot: Pad to avoid data after the signature mapping into the address space
Because address space is mapped in 64KB pages, it was possible for unauthenticated data after the
app .bin to become mapped into the flash cache address space.

This problem is solved by 2 changes:

* "esptool elf2image --secure-pad" will pad the image so that the signature block ends close to the
  64KB boundary. Due to alignment constraints it will be 12 bytes too short after signing (but
  with flash encryption, these 12 bytes are still encrypted as part of the last block and can't be
  arbitrarily changed).
* By default, secure boot now requires all app partitions to be a multiple of 64KB in size.
2018-07-17 15:33:47 +10:00
Angus Gratton cee6d7d5a9 docs: Add more ReST-isms in secure boot & flash encryption docs
(Original version of these docs were in Markdown.)
2018-07-16 11:52:52 +10:00
Angus Gratton 0a02d824fc partition_table: Warn if the partition table name doesn't match type & subtype 2018-06-22 17:51:34 +10:00
Angus Gratton 6acf28db90 gen_esp32part: Fix input/output handling, regression when Python 3 was supported
Also remove misleading help about using stdin (was broken) and --display argument (doesn't exist).
2018-06-22 11:27:09 +10:00
Angus Gratton 05fe65c7d9 partition_table: Use names not numeric values in default OTA example partition 2018-06-22 11:15:41 +10:00
Angus Gratton 077469c823 partition_table: Support same fallback logic as bootloader for default boot partition
Generates correct "make flash" command even when partition table has no factory partition.

Also adds unit tests for parttool.py

Closes https://github.com/espressif/esp-idf/issues/2086
2018-06-22 11:14:22 +10:00
Angus Gratton d0b8f2865f docs: Switch base URL from esp-idf.readthedocs.io to docs.espressif.com 2018-06-19 11:23:33 +00:00
Konstantin Kondrashov 3e0ac4db79 partition_table: Expanding the space under the bootloader
Allows you to move the partition table, it gives more space for the bootloader.
Added a new utility - parttool.py. This utility can search for the offset and/or size of the partitions by name and type/subtype. Use for getting APP_OFFSET and PHY_DATA_OFFSET.
The linker(esp32.bootloader.ld) made changes that allow you to write a custom bootloader code more.

TW14125
2018-06-08 18:47:29 +05:00
Marcin Jaworski 5bc1bf4add Fix PartitionDefinition comparison in Python 3
Merges https://github.com/espressif/esp-idf/pull/2018
2018-06-04 17:18:41 +10:00
Angus Gratton cfa8ed15c0 partition table: Set partition table offset via variable 2018-05-29 16:34:45 +10:00
Angus Gratton 381be65472 cmake: Build all examples in CI
Includes some fixes for compile errors/warnings in examples.
2018-04-30 10:18:33 +10:00
Angus Gratton 1cb5712463 cmake: Add component dependency support
Components should set the COMPONENT_REQUIRES & COMPONENT_PRIVATE_REQUIRES variables to define their
requirements.
2018-04-30 09:59:20 +10:00
Angus Gratton 88df8fd293 cmake: Use cmake_lint project, tidy up all CMake source files 2018-04-30 09:59:20 +10:00
Angus Gratton cb99531d15 cmake: Generate PHY init data partition as part of the build 2018-04-30 09:59:20 +10:00
Angus Gratton 674d398c93 cmake: Add partition table, and .bin file targets 2018-04-30 09:59:20 +10:00
Angus Gratton 3ae4822115 cmake: Add partition table generation 2018-04-30 09:59:20 +10:00
Angus Gratton c671a0c3eb build system: Initial cmake support, work in progress 2018-04-30 09:59:20 +10:00
Angus Gratton 8fbdad5b0c partition table: Fix regression with make 3.81
"undefine" was added in make 3.8.2

Namespace the global partition table option variables to minimise scope leakage.
2018-04-26 12:07:27 +10:00
Angus Gratton fa3205737f partition_table: Check configured flash size fits in partition table
Check happens at build time, so flash size config may need to be changed.

Also fixes MD5_OPT undefined warning, closes https://github.com/espressif/esp-idf/issues/1867
2018-04-26 09:51:55 +10:00
Roland Dobai 4017cf3516 partition_table: Optionally disable the MD5 checksum in partition tables 2018-02-22 07:46:41 +01:00
Roland Dobai cf7a4cc650 Protect partition table by MD5 checksum 2018-02-05 11:36:03 +01:00
Anton Maklakov 301751ede0 build system: Fix undefined variables
make/project.mk:315: warning: undefined variable `CC'
    make/project.mk:316: warning: undefined variable `LD'
    make/project.mk:317: warning: undefined variable `AR'
    make/project.mk:62: warning: undefined variable `MAKECMDGOALS'
    components/partition_table/Makefile.projbuild:24: warning: undefined variable `quote'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'BOOTLOADER_DIGEST_BIN'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'SECURE_BOOTLOADER_KEY'
2017-12-28 19:21:34 +08:00
Ivan Grokhotkov b52e3fae64 build system: fix warning about undefined variable 'quote' 2017-10-19 21:35:23 +08:00
Deomid Ryabkov 1ea082a053 Expand vars before splitting fields
This allows making entire partition table line a variable.

Merges https://github.com/espressif/esp-idf/pull/841
2017-09-05 16:23:54 +10:00
Ivan Grokhotkov fb43948413 Update several Kconfig files to make help texts compatible with ReST 2017-08-22 14:34:19 +08:00
Angus Gratton d664e32394 build system: Use component.mk for all components, refactor bootloader build
For config-only components, component.mk should now contain "COMPONENT_CONFIG_ONLY := 1"

Also refactored some of the generation of linker paths, library list. This required cleaning up the way the bootloader
project works, it's now mostly independent from the parent.
2017-07-19 09:10:48 +10:00
Jeroen Domburg 6c2b4854e1 Add test for partition mmap straddling 64K page issue 2017-07-06 18:22:43 +08:00