Commit graph

379 commits

Author SHA1 Message Date
Angus Gratton 191557db02 docs: Copy CMake docs to a separate set of directories
Required first step before merging back to mainline.
2018-08-13 15:37:03 +10:00
Ivan Grokhotkov 497b123958 unit-test-app: don’t include project.mk for ut- targets
If project.mk is included twice in recursive invocation of Make, some
variables defined on the first pass will not be redefined on the
second pass. Rather than cleaning up these variables before calling
Make recursively, don’t include IDF project.mk at all, if one of the
ut- targets is requested.
2018-08-01 08:59:02 +00:00
He Yin Ling 1884151ca8 CI: support test one case multiple times by @bot 2018-07-28 15:06:18 +08:00
He Yin Ling 2d31597fa9 tiny-test-fw: support ignore test cases in CI assign test stage 2018-07-28 15:04:14 +08:00
He Yin Ling 715dfac07e tiny-test-fw: fix exception during print debug info:
DUT log is unicode, might not be able to encode
2018-07-28 15:03:58 +08:00
He Yin Ling bf72ed92a9 CI: erase nvs partition before test:
Latest NVS partition bin can't be parsed by old IDF revision. Need to erase before test.
2018-07-28 15:03:30 +08:00
He Yin Ling fa9c836f02 tiny-test-fw: save DUT log in different thread:
We found some SD card on Raspberry Pi could have very bad performance.
It could take seconds to save small amount of data.
If the DUT receives data and save it as log, then it stops receiving data until log is saved.
This could lead to expect timeout. As an workaround to this issue,
``BaseDUT`` class will create a thread to save logs.
Then data will be passed to ``expect`` as soon as received.
2018-07-28 15:00:41 +08:00
He Yin Ling 609e39a620 tiny-test-fw: fix incorrect wait timeout in expect 2018-07-28 15:00:28 +08:00
He Yin Ling 3956fe30c0 tiny-test-fw: filter examples with test level 2018-07-28 15:00:16 +08:00
He Yin Ling 831e8d653f tiny-test-fw: print expect failure when test fails 2018-07-28 15:00:01 +08:00
Piyush Shah 6d0a9fe95e nvs_partition_generator: Modifications to enable using the utility as a Python library
And also use directly as an executable
2018-07-17 19:24:04 +05:30
Roland Dobai b8937e5522 idf_monitor: Fix console performance
51e42d8e92
introduced filtering options which handles the last (unterminated) line
with a delay. This introduced poor performance for console applications
when the user interacts with the ESP32 device in the same line because
there is an artificial delay for each key-press.

bb152030a0
decreased the delay but there are still delays for each key-presses.

The current fix makes only one delay per line instead of each
key-presses. When an unterminated line is detected then no more
"delayed" print is used for the given line.

Fixes https://github.com/espressif/esp-idf/issues/2054
2018-07-03 09:15:46 +02:00
Ivan Grokhotkov 26e1136fc5 esp_err_to_name.py: guess IDF_PATH if not set in environement
Fixes the issue that esp_err_to_name.py would fail when called in
documentation build process, when there was no IDF_PATH set.
2018-06-25 13:43:32 +08: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
Angus Gratton 73f6fb9fe7 Merge branch 'feature/spi_functions_in_iram' into 'master'
feature(spi_master): allow to place functions into IRAM to get higher efficiency

See merge request idf/esp-idf!2538
2018-06-19 07:25:12 +08:00
Angus Gratton bf10447b82 cmake: Fix issues when IDF_PATH is not set in environment
Support cases where IDF_PATH may be passed in on the cmake command line,
or inferred from a (hardcoded absolute or relative) path to project.cmake
2018-06-18 14:48:03 +10:00
Angus Gratton 43b6c76bba Merge branch 'feature/expansion_space_for_bootloader' into 'master'
partition_table: Moving to custom offset

See merge request idf/esp-idf!2263
2018-06-18 12:34:53 +08:00
Sagar Bijwe fd7b794e81 FATFS support without wear levelling
This change allows readonly FATFS to be mounted without wear levelling
support. This will provide the customers a simple way to mount FATFS images
generated on host and flashed onto the chip during factory provisioning.
Since NVS encryption is not supported yet and NVS entry size is limited,
the change will provide an easy alternative for securing the provisioning data
by just marking FATFS parition as encrypted.
2018-06-16 16:02:35 +08:00
Ivan Grokhotkov d9f8311b9d docs: add error codes reference 2018-06-15 15:49:24 +08:00
Michael (XIAO Xufeng) 9c23b8e596 feature(spi_master): allow to place functions into IRAM to get higher efficiency 2018-06-14 20:22:40 +08:00
Roland Dobai bb152030a0 Fix the console performance issue
The IDF monitor waits for one second before printing the last
unterminated line. This is necessary for the correct filtering.
However, this causes poor performance, for example, in the case of the
system/console example.

This fix reduces the waiting time which improves the response time of
the console example and doesn't seem to influence the monitor filter.

Closes https://github.com/espressif/esp-idf/issues/2054
2018-06-13 08:05:31 +02:00
Ivan Grokhotkov 7663782e8d unity: allow test task stack size to be configured 2018-06-11 23:26:56 +08:00
Ivan Grokhotkov 9b1876a458 unit-test-app: allow specifying subset of tests for configuration
For some test configurations, not all tests need to be run. This
change allows adding a comment in the configuration file of the
following form:

unit-test-app makefile will use it to determine which components to
build. If the comment is not present, all components will be built
(TESTS_ALL=1).

Also add test configuration for libsodium. It is a separate test
configuration due to the large binary size generated when building
libsodium tests.
2018-06-11 23:26:55 +08: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
Angus Gratton c99a30a167 Merge branch 'bugfix/wakeup_from_deep_sleep' into 'master'
esp32: Fix not the right time spent in a deep sleep

See merge request idf/esp-idf!2501
2018-06-08 10:40:47 +08:00
Angus Gratton be829afe6e Merge branch 'feature/cmake_confserver' into 'feature/cmake'
cmake: Add JSON configuration server for external config tool integration

See merge request idf/esp-idf!2410
2018-06-08 07:32:09 +08:00
Angus Gratton 6065d2fd08 kconfig: Add confserver.py to expose sdkconfig to clients 2018-06-07 14:23:08 +10:00
Konstantin Kondrashov 7e2a3da643 esp32: Fix not the right time spent in a deep sleep
Before entering the deep sleep, the RTC and FRC counters are synchronized. Updating the boot_time.
Added a unit test for this case.
Fixed warnings for MULTIPLE_STAGES

Closes https://github.com/espressif/esp-idf/issues/1840
2018-06-06 18:59:30 +05:00
Angus Gratton 46b723e5ed cmake: Fix COMPONENT_SRCEXCLUDE functionality 2018-06-06 16:27:44 +10:00
Roland Dobai 51e42d8e92 idf_monitor: add support for filtering options 2018-06-05 12:23:27 +02:00
Angus Gratton 8bb4c694ce cmake: Add COMPONENT_SRCEXCLUDE option 2018-05-31 14:46:39 +10:00
Angus Gratton fdccc19485 cmake build system test: Fix path to sdkconfig.h 2018-05-31 14:46:39 +10:00
Angus Gratton 6b9784cc45 Merge branch 'master' into feature/cmake_update 2018-05-31 14:46:23 +10:00
Ivan Grokhotkov 74928b9bcb ci: check for executable flag on source files 2018-05-29 20:07:45 +08:00
Angus Gratton c70f9db369 confgen: Don't write environment-loaded configuration items to sdkconfig 2018-05-29 16:34:45 +10:00
Angus Gratton 580cfeaaae idf.py: Print flashing steps at the end of each build 2018-05-29 16:34:45 +10:00
Angus Gratton f6cd55d2ac config: Rename mconf to mconf-idf & conf to conf-idf
These versions of conf/mconf are forked from the upstream, and the CMake system allows mconf-idf to
be installed externally on the path. So the best option is to rename.

Includes changes to Windows installer for v1.1
2018-05-29 16:34:45 +10:00
Angus Gratton 61aff5162c mconf: Don't print a recommendation to use 'make' if CMake build system is in use
Also add some cmake dependencies to rebuild mconf if its source files change.
2018-05-29 16:34:45 +10:00
Angus Gratton be4956fe7c docs: Add some tips about setting the Python interpreter, and a specific check in idf.py
Don't show the "Python 2 interpreter" option in menuconfig when using CMake.

This is a stop-gap until we support Python 2 & 3 together in ESP-IDF (soon).

Closes https://github.com/espressif/esp-idf/issues/1924
2018-05-29 16:34:45 +10:00
Angus Gratton a1fac97f1a cmake: Fix set_default using value from environment
Fixes issue with idf.py passing through Python interpreter, as reported in
https://github.com/espressif/esp-idf/issues/1924
2018-05-29 16:34:45 +10:00
Angus Gratton cc104eb05b cmake: Add sdkconfig.h directory to include paths list not just compiler args
Also move into 'build/config/' subdir, remove creation of empty include/config dir.
2018-05-29 16:34:45 +10:00
Angus Gratton 2f4079ebb2 cmake: Hide serial port settings in menuconfig when using cmake 2018-05-29 16:34:45 +10:00
Angus Gratton 10eab26854 unit test app: Require 4MB flash
PSRAM config unit tests had outgrown the 0x14000 byte allocated factory size.
2018-05-25 12:16:26 +10:00
He Yin Ling 1a1514b69c unit-test-app: udpate CI related part to README 2018-05-24 03:40:03 +00:00
He Yin Ling a68b93d6f3 tiny-test-fw: show descriptive error when test case assignment fails:
Will give hint when any job failed to assign:

```
Please add the following jobs to .gitlab-ci.yml with specific tags:
* Add job with: psram, ESP32_IDF, UT_T1_1
* Add job with: psram, ESP32_IDF, UT_T1_1
```
2018-05-24 03:40:03 +00:00
He Yin Ling 3b24bc42d2 CI: assign unit test cases according to sdkconfig:
We have built unit-test-app with different configs.
Currently we use the config name as tags to match runners.
It's not easy to add new configs (need to update tags to existed runners).

Now we'll parse required test runner tags from `sdkconfig` file.
For example, if config enables `CONFIG_SPIRAM_SUPPORT`, then it requires `psram` tag.
This will make adding new configs easier.

In this commit we change the one behavior of assign test: match keys of
cases should be exactly the same with job tags. This fixes cases select
jobs include their tags, and jobs requires those tags can't be assigned.
2018-05-24 03:40:03 +00:00
Angus Gratton 035dc66cce Merge branch 'bugfix/esp_err_to_name_windows' into 'master'
gen_esp_err_to_name.py: Use normal file I/O instead of mmap()

See merge request idf/esp-idf!2425
2018-05-22 11:31:17 +08:00
Angus Gratton e8525396dd test: Allow per-unit-test timeouts
Work around for "(WL) write/read speed test" taking >30s in some configs
2018-05-21 12:27:10 +00:00
Angus Gratton b14bbd4205 gen_esp_err_to_name.py: Use normal file I/O instead of mmap()
mmap is different on Python for Windows
2018-05-21 17:34:18 +10:00
Roland Dobai 18e83bcd53 Allow VFS file descriptors in select() 2018-05-18 08:06:33 +02:00
He Yin Ling 9e7a69be88 example test: integrate wifi throughput test to CI 2018-05-15 13:42:27 +08:00
He Yin Ling 2b068f3ceb tiny-test-fw: fix misc bugs:
1. configs are not functional
    * decorator will be executed when search case, need to set default config before search case.
2. fix DUT encode/decode errors
    * python3 serial don't support write string/unicode, need to convert to bytes first.
    * python2 string could failed to encode/decode non-acsii chars
3. fix bug that log folder not created
4. fix bug that test suite name is not correctly passed:
    * the keyward arg should be `test_suite_name` not `test_name`
5. fix bug that test stopped on failed case
6. fix DUT `read` don't return all data cache
    * `_DataCache.get_data` should first copy all data from queue to data cache and then return to user.
7. fix bug that `expect_all` failed even all expected item passed
8. optimize error info for expect
    * print pattern for regular expression when match failed
9. fix bug that set default config doesn't work
2018-05-15 03:29:31 +00:00
He Yin Ling 98d1f05ab5 tiny-test-fw: add utilities:
1. Attenuator: control programmable attenuator
2. PowerControl: control APC PDU to power on/off devices
3. LineChart: use matplotlib to draw line chart
2018-05-15 03:29:31 +00:00
He Yin Ling 3b3a915552 tiny-test-fw: implement env.get_pc_nic_info:
this method is used to get mac/ipv4/ipv6 address for one NIC
2018-05-15 03:29:31 +00:00
Ivan Grokhotkov e9cbf96bd1 mbedtls: re-add version 2.9.0 as a submodule 2018-05-09 23:15:28 +08:00
Angus Gratton 526496ba20 ci: Allow bot to control branch used for esp-idf-template 2018-05-08 14:44:25 +08:00
Angus Gratton 6f31674b28 cmake: Add ESPORT/ESPBAUD environment variables to idf.py & docs 2018-05-07 18:45:49 +08:00
Angus Gratton c7f19e76d7 docs: Move main docs to cover CMake
Add "GNU Make build system" doc with "cheat sheet" for moving to new system
2018-05-07 18:45:49 +08:00
Angus Gratton 8453806a8c idf.py: Fix 'idf.py monitor' build & flash targets 2018-05-04 16:05:25 +10:00
Ivan Grokhotkov 0d65f3b7f9 Merge branch 'bugfix/light_sleep_fixes' into 'master'
light sleep fixes

See merge request idf/esp-idf!2242
2018-05-02 20:09:36 +08:00
Angus Gratton 9ec14decce cmake: Fix idf_size.py merge errors 2018-05-01 17:27:39 +10:00
Angus Gratton c7307de63e cmake: Automatically pull in winpty for menuconfig, monitor if needed 2018-05-01 17:27:39 +10:00
Angus Gratton c42b791aaa cmake: Use prebuilt mconf on Windows
Closes https://github.com/espressif/esp-idf/issues/1905
2018-05-01 17:27:39 +10:00
Angus Gratton 99e02d4e42 windows: New ESP-IDF Tools Installer
Working on 64-bit Windows only due to Ninja binary.
2018-04-30 10:18:33 +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 858b95a924 cmake: Add build system tests 2018-04-30 09:59:20 +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 56902f0054 cmake: Write configuration & component metadata to project_description.json 2018-04-30 09:59:20 +10:00
Angus Gratton f1d3bfc0c7 cmake: Add new flasher_args.json file for IDE parsing, document metadata files better 2018-04-30 09:59:20 +10:00
Angus Gratton 2a3e2b8eed doc: Use confgen.py to build docs from same code path as config generation 2018-04-30 09:59:20 +10:00
Angus Gratton b44c8b125f cmake: Style cleanup, add cmake linter to gitlab CI 2018-04-30 09:59:20 +10:00
Angus Gratton 2ea359ad0c cmake: Cleanups to work with Windows 2018-04-30 09:59:20 +10:00
Angus Gratton 6bdc49b6e4 cmake: set CCACHE_BASEDIR & CCACHE_NOHASHDIR when using ccache
Dramatically improves build performance when building multiple
projects in different directories.
2018-04-30 09:59:20 +10:00
Angus Gratton 9d88d13f77 cmake: convert_to_cmake.py script for converting IDF GNU Make projects 2018-04-30 09:59:20 +10:00
Angus Gratton 2816cf1d67 cmake: Change data_file_to_c to data_file_embed_asm for objcopy compatibility
Now generates _binary_filename_start / _binary_filename_end as well as more useful naming.
2018-04-30 09:59:20 +10:00
Angus Gratton 12be399762 cmake: Add link-time dependencies for linker script files
Requires some hackery around limitations in CMake's LINK_DEPENDS
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 15d5e88618 cmake: Automatically include ccache if it's on the path 2018-04-30 09:59:20 +10:00
Angus Gratton 9f8cdd3572 cmake: Add "Preview release" getting start guide & build system documentation 2018-04-30 09:59:20 +10:00
Angus Gratton 95e17d6d92 cmake: Allow GetGitRevisionDescription to take arbitrary directory paths 2018-04-30 09:59:20 +10:00
Angus Gratton 7d9ba66f83 idf.py: Add reconfigure command 2018-04-30 09:59:20 +10:00
Angus Gratton 4d7bc8e8ba idf.py: Improve status output, error message output 2018-04-30 09:59:20 +10:00
Angus Gratton abef220b13 cmake: Allow selecting toolchain file based on config
Refactor IDF "project" functionality under a wrapping of the default
"project" command, so we can tweak it a bit...

Will need more testing in other environments.
2018-04-30 09:59:20 +10:00
Angus Gratton 04a944598f cmake: Export compile_commands.json as part of build 2018-04-30 09:59:20 +10:00
Angus Gratton efb5928934 idf.py build & flash tool
Generate flasher args files & .json project info file as part of cmake build
2018-04-30 09:59:20 +10:00
Angus Gratton 7eaf2f4bdb kconfig: Allow out of tree building, build under cmake build directory 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 0bdc12256e cmake: Add "size" target, update idf_size.py for different linker behaviour 2018-04-30 09:59:20 +10:00
Angus Gratton 1f8e07fd8f cmake: Add sdkconfig.defaults support 2018-04-30 09:59:20 +10:00
Angus Gratton be962a9444 cmake: Re-run cmake if submodule commits change or a submodule is deinit-ed 2018-04-30 09:59:20 +10:00
Angus Gratton 4f1a856dbf cmake: Remove defaults for COMPONENT_SRCDIRS, COMPONENT_SRCS, COMPONENT_ADD_INCLUDEDIRS
* Philosophical: "explicit is better than implicit".
* Practical: Allows useful errors if invalid directories given in components as the defaults aren't
  always used. Also trims the -I path from a number of components that have no actual include
  directory.
* Simplifies knowing which components will be header-only and which won't
2018-04-30 09:59:20 +10:00
Angus Gratton 3fac2b2ddc cmake: Refactor bootloader_subproject into the bootloader component itself 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 ce6748873d cmake: Add embedding files in components support
Add subscribe_publish AWS example and fixes to allow it to build.
2018-04-30 09:59:20 +10:00
Angus Gratton 134f2238bd cmake: Refactor main cmake project logic 2018-04-30 09:59:20 +10:00
Angus Gratton 7f29593a7d cmake: Bootloader subproject & "clean" cleanup 2018-04-30 09:59:20 +10:00
Angus Gratton 067a19ad88 cmake: Move global IDF-specific compiler/linker options out of the toolchain file
Should restore compatibility with cmake pre-v3.7
2018-04-30 09:59:20 +10:00
Angus Gratton f04525095f cmake: Move third-party cmake modules to their own directory 2018-04-30 09:59:20 +10:00
Angus Gratton 68e75dd0df cmake: Detect missing or out of date submodules during cmake pass 2018-04-30 09:59:20 +10:00