Commit graph

310 commits

Author SHA1 Message Date
Jakob Hasse 78e4b0ff96 CXX: enable exceptions ESP32S2-beta
Closes IDF-1039

* Enabled test cases for -fno-exceptions to S2-beta again
* Added different reset tag for S2-beta
2019-12-10 10:23:00 +08:00
He Yin Ling c906e2afee test: update example and unit tests with new import roles:
tiny_test_fw is a python package now. import it using normal way.
2019-12-07 10:34:54 +08:00
Renz Christian Bagaporo e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation
Otherwise IRAM usage is too high in this example.
2019-11-28 09:20:00 +08:00
morris c3ee156df0 ethernet: move netif glue && add ref counter
1. move netif glue into single file
2. add reference counter for Ethernet driver
2019-11-27 10:36:32 +08:00
He Yin Ling 857d10a926 unit-test-app: print config name in test script 2019-11-23 20:40:23 +08:00
He Yin Ling 9665c6ef66 unit-test-app: fix test script error when handling multiple unit test configs in one config file:
If we have multiple configs, we need to flash DUT with different binaries. But if we don't close DUT before apply new config, the old DUT will be reused, so new config name will not be applied.
2019-11-23 20:40:23 +08:00
Angus Gratton ea29c101cd Merge branch 'bugfix/fix_iram_intr_alloc_test' into 'master'
ccomp_timer: fix broken unit test

See merge request espressif/esp-idf!6779
2019-11-22 08:41:50 +08:00
Ivan Grokhotkov 0e6e7f49be tiny-test-fw: add build config and target options 2019-11-21 15:36:06 +01:00
Renz Christian Bagaporo 6540877f23 test_utils: move ccomp timer interrupt allocation/free to init/deinit 2019-11-21 11:59:46 +08:00
Angus Gratton bc9267aa24 Merge branch 'feature/use_cpu_time_for_tests' into 'master'
Cache compensated timer

See merge request espressif/esp-idf!6087
2019-11-20 08:33:27 +08:00
Renz Christian Bagaporo df26ab13e2 test_utils: implement performance timer 2019-11-18 10:29:01 +08:00
Jakob Hasse cd730b94be C++: added unit tests for builtin type exceptions 2019-11-18 08:53:50 +08:00
Jiang Jiang Jian a9c1970c03 Merge branch 'bugfix/put_more_rx_code_to_iram' into 'master'
wifi: Put some rx code to iram

Closes WIFI-490 and WIFI-1041

See merge request espressif/esp-idf!6490
2019-11-15 10:58:22 +08:00
xiehang 5e7f43f3d1 esp_wifi: Put some rx code to iram 2019-11-13 11:44:23 +00:00
David Cermak b834c99148 examples: modify other examples and tests to use esp_netif instead of tcpip_adapter 2019-11-13 12:36:25 +01:00
Angus Gratton 5b33d6cf94 Merge branch 'feature/mbedtls_add_faster_modexp' into 'master'
mbedtls: Add a new (X^Y) mod M implementation (HAC 14.94)

Closes IDF-965

See merge request espressif/esp-idf!6418
2019-11-06 15:51:28 +08:00
KonstantinKondrashov 5ed8388f6b mbedtls: Add Montgomery exponentiation implementation (HAC 14.94)
It gave us a better performance of RSA operations. (2~11 times)

The old modexp implementation (Z = X ^ Y mod M) loaded all the data into
the hw registers and was waiting for completion, but due to
the hardware RSA implementation, the calculations always started with 4096 bit,
which took a lot of time.
Measurement results (measurements were made for keys: 2048, 3072 and 4096 bits)
(Old) - Sliding-window exponentiation (HAC 14.85):
keysize = 2048 bits
RSA key operation (performance): public [93206 us], private [280189 us]
keysize = 3072 bits
RSA key operation (performance): public [293614 us], private [858157 us]
 keysize = 4096 bits
RSA key operation (performance): public [653192 us], private [1912126 us]

Instead (Old) - Sliding-window exponentiation (HAC 14.85) was implemented
(New) - Montgomery exponentiation (HAC 14.94) which showed
better performance on private and public keys.
keysize = 2048 bits
RSA key operation (performance): public [14504 us], private [149456 us]
keysize = 3072 bits
RSA key operation (performance): public [35073 us], private [392743 us]
keysize = 4096 bits
RSA key operation (performance): public [58650 us], private [787186 us]

For this reason, the old implementation was removed
and the MBEDTLS_HARDWARE_MPI option was turned on by default.

Why the MPI_INTERRUPT option is removed:
the old implementation used calculations on the hardware and
it took a lot of time (10ms - 500ms). And in order not to stand idle
while waiting for completion, an interrupt option was added.
This made it possible to carry out other tasks during the calculation,
and this one to block. The new method is free from such a drawback and
the maximum duration of one RSA HW operation does not exceed 70us (usually 2-70 μs).
This option is no longer needed.

Closes: IDF-965
2019-11-05 16:33:11 +08:00
Angus Gratton ad79772e7e Merge branch 'bugfix/cmake_sdkconfig_issues' into 'master'
cmake: fix sdkconfig related issues

Closes IDF-1086

See merge request espressif/esp-idf!6436
2019-11-04 18:30:49 +08:00
Renz Christian Bagaporo d43cc4fa4b cmake: allow multiple sdkconfig defaults to be specified 2019-11-03 16:43:58 +08:00
Michael (XIAO Xufeng) 748b79e94a ci: fix one ut issue when using Wrover-B module with newer ver of PSRAM
The workaround for PSRAM that will occupy an SPI bus is enabled only when:

1. used on 32MBit ver 0 PSRAM.
2. work at 80MHz.

The test used to only check 32MBit by the config option, but for PSRAM
on Wrover-B module seems to use a newer version of 32MBit PSRAM.  So it
expects the workaround to be enabled, but actually not.

This commit split the unit test into two parts:

1. check all SPI buses are available, for all configs except psram_hspi
and psram_vspi, run on regular runners (including Wrover and Wrover-B).
a hidden option is enabled so that the compiler knows it's not building
psram_hspi or psram_vspi.

2. check the specified bus are acquired, for config psram_hspi and
psram_vspi. This only run on special runner (legacy Wrover module).
2019-11-03 03:07:37 +00:00
Ivan Grokhotkov a088678dd4 unit-test-app: apply sdkconfig.defaults.esp32 for Make builds 2019-10-30 10:43:38 +01:00
Ivan Grokhotkov 142e49f4cc unit-test-app: fix chip-specific sdkconfig options
DEFAULT_CPU_FREQ and ULP_COPROC_ENABLED options have chip-specific
names, and should be set in a chip-specific sdkconfig.defaults file.
This commit also changes the default CPU frequency for ESP32S2 unit
tests to 240 MHz.
2019-10-30 10:41:30 +01:00
Angus Gratton 6e1aa985e7 ci: Increase INT_WDT_TIMEOUT_MS for PSRAM configs
This shouldn't be necessary, it's a workaround for a bug
in the config system.
2019-10-28 18:58:05 +11:00
Angus Gratton 8675a818f9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-22 13:51:49 +11:00
Ajita Chavan 56f73d7720 flash_ops: fix spi_flash_read with source buffer not from internal memory and size < 16
Closes https://github.com/espressif/esp-idf/issues/4010
2019-10-19 14:56:43 +08:00
Angus Gratton 496ede9bcd Merge branch 'master' into feature/esp32s2beta_merge 2019-10-15 14:59:27 +11:00
Hu Chao Ru fc018987eb add wifi init unit test cases 2019-10-11 13:00:57 +08:00
Ivan Grokhotkov cf7fe34cc2 ci: fix test assignment issue, rename env tag 2019-10-03 15:00:22 +02:00
Ivan Grokhotkov 5830f529d8 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-02 19:01:39 +02:00
Roland Dobai 5a916ce126 Support ELF files loadable with gdb 2019-09-24 07:19:50 +00:00
Angus Gratton f991f812ab unit test: Fix bug in idf.py ut-apply-config- targets
Bug was this sequence:

1. old sdkconfig file has some settings (maybe target=esp32s2beta)
2. idf.py builds a new sdkconfig.defaults file with full new settings
3. new settings includes something that conflicts with the old settings (for example,
CONFIG_IDF_TARGET=esp32 and BT_ENABLE=y)
4. confgen tries to apply the new "defaults" to the existing sdkconfig, settings end up a mix of both due to the conflicts

Fix is to generate the sdkconfig file directly.
2019-09-23 06:26:49 +02:00
Angus Gratton adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Angus Gratton 438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Sergei Silnov c57dfbc0b8 python: Fix yaml.load warnings
Since pyyaml 5.1 yaml.load without specifing loader is deprecated
Details: https://msg.pyyaml.org/load

To keep code compatible with older versions of pyyaml
and keep best perfomance CLoader with fallback to Loader is used.
2019-09-13 10:29:38 +00:00
Michael (XIAO Xufeng) eac802357a ci: support build esp32s2beta UT 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng) 3a9ae4acc6 ci: pass target from build stage to unit test 2019-09-04 10:53:25 +10:00
Ivan Grokhotkov 12c9d9a564 spi_flash: remove duplicate definition of spi_flash_unlock
The other (static) definition is in flash_ops.c, all references are
also in flash_ops.c.
2019-08-23 12:37:55 +08: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 afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
Ivan Grokhotkov 26800ed71e global: update note in the partition tables
The build system automatically determines offsets of partitions from
the partition table, so no manual changes are needed. Instead, add a
note that partition offsets may need to be updated when increasing
the bootloader size.
2019-07-27 10:28:16 +02:00
Sergei Silnov e36a76d940 idf_ext.py: don't rerun reconfig for tests when possible 2019-07-23 16:15:33 +02:00
He Yin Ling 663ed11509 unit-test-app: use stripped config name in test case ID:
We could split cases of same config into multiple binaries as we have limited rom space. So we should regard those configs like `default` and `default_2` as the same config.
2019-07-11 10:01:05 +08:00
Ivan Grokhotkov 41b6811f45 unit-test-app: split default, release, single_core configs 2019-07-10 22:44:11 +08:00
Angus Gratton 222146845c docs: Make CMake build system default, mark GNU Make as legacy option
All `-cmake` suffixes are removed
Where a GNU Make option is renamed, the `-legacy` suffix is used
2019-07-09 14:32:26 +10:00
Angus Gratton 47bbb107a8 build system: Use CMake-based build system as default when describing commands 2019-07-08 17:31:27 +10:00
He Yin Ling 81dd9d4e27 CI: use parallel attribute in CI config file 2019-07-03 16:53:34 +08:00
Sergei Silnov aecd0f9ae4 Add subcomand options that become global 2019-06-26 10:00:21 +02:00
Renz Christian Bagaporo e9bc46db71 tools: use new component registration api for unit test app 2019-06-21 19:53:29 +08:00
Ivan Grokhotkov a9157aaba9 Merge branch 'bugfix/ut_ci_test_fail_because_failed_to_reset' into 'master'
ci: fix random unit test CI failure

See merge request idf/esp-idf!5264
2019-06-20 16:08:51 +08:00
Darian Leung 037c079e9a esp32: Refactor backtrace and add esp_backtrace_print()
This commit refactors backtracing within the panic handler so that a common
function esp_backtrace_get_next_frame() is used iteratively to traverse a
callstack.

A esp_backtrace_print() function has also be added that allows the printing
of a backtrace at runtime. The esp_backtrace_print() function allows unity to
print the backtrace of failed test cases and jump back to the main test menu
without the need reset the chip. esp_backtrace_print() can also be used as a
debugging function by users.

- esp_stack_ptr_is_sane() moved to soc_memory_layout.h
- removed uncessary includes of "esp_debug_helpers.h"
2019-06-19 18:30:18 +08:00
suda-morris 3f7a571c90 fix errors when ci testing for esp32 2019-06-19 15:31:47 +08:00
Angus Gratton 484eb7cd07 Merge branch 'feature/mdns_unit_tests' into 'master'
mdns: add initial unit tests

See merge request idf/esp-idf!5088
2019-06-19 14:43:51 +08:00
He Yin Ling 304e7119ce ci: fix random unit test CI failure:
we use `-` command to check if DUT reset pass. If we input `-` command
during DUT bootup, DUT could only receive `\n` and print test cases.
Print test cases could take long time and lead to reset check timeout.
Now we will add delay after reset, and enlarge reset check timeout to
solve this problem.
2019-06-18 12:22:00 +08:00
Ivan Grokhotkov 7680f520f9 unit-test-app: disable CONFIG_MBEDTLS_HARDWARE_MPI for esp32s2beta 2019-06-13 01:43:38 +08:00
Ivan Grokhotkov 25a383c521 test_utils: update for esp32s2beta 2019-06-12 16:10:11 +08:00
David Cermak e6801912c5 mdns: added initial suite of api unit tests 2019-06-12 08:18:25 +02:00
Roland Dobai 22d070e0af spi_flash: Rename long Kconfig options 2019-06-12 08:03:07 +02:00
Ivan Grokhotkov 4b0b2c6fda Merge branch 'feature/action_specific_flags' into 'master'
idf.py: add support for action specific options

Closes IDF-501, IDFGH-1276, and IDFGH-1275

See merge request idf/esp-idf!5029
2019-06-07 00:44:09 +08:00
Sergei Silnov 20156f9702 idf.py: Add support for action specific options
Changes argument parsing mechanism from argparse to a new one, that provides better support for extensions and options that are only applicable to specific subcommands,

Breaking changes:

1. All global options should go before subcommands, i.e. `idf.py build -C ~/some/project` will not work anymore, only `idf.py -C ~/some/project build` is acceptable
2. To provide multiple values to an option like `--define-cache-entry` it's necessary to repeat option many times, i.e. `idf.py -D entry1 entry2 entry3` will not work, right way is: `idf.py -D entry1 -D entry2 -D entry3`
At the moment there are 3 options like this:  `--define-cache-entry` in base list and `--test-components` and `--test-exclude-components` in the unit test extensions
3. Drops `defconfig` and `bootloader-clean` subcommands

Closes https://github.com/espressif/esp-idf/issues/3570
Closes https://github.com/espressif/esp-idf/issues/3571
2019-06-03 13:07:02 +02: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
Roland Dobai 1ad2283641 Rename Kconfig options (components/bootloader) 2019-05-21 09:32:55 +02:00
Roland Dobai a1bddb923b Rename Kconfig options (components/bt) 2019-05-21 09:09:01 +02:00
Roland Dobai 0ae53691ba Rename Kconfig options (components/esp32) 2019-05-21 09:09:01 +02:00
Roland Dobai e9f1011b1b Rename Kconfig options (components/driver) 2019-05-21 09:09:01 +02:00
Roland Dobai 64c2aa15aa Rename Kconfig options (components/freertos) 2019-05-21 09:09:01 +02:00
Roland Dobai c5000c83d2 Rename Kconfig options (root) 2019-05-21 09:09:01 +02:00
Sachin Parekh e6a714480d unit-test-app: freertos_compliance config added
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
Sachin Parekh d803465ec6 ref_clock: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
He Yin Ling b75400294a test: collect unit-test performance items and save to report 2019-04-19 14:39:44 +08:00
Ivan Grokhotkov bb4f5617ab test: clean up "leaks" tags from most unit tests 2019-04-16 20:07:40 +08:00
Konstantin Kondrashov 5021129e71 Add support a [leaks] tag for UT 2019-04-12 09:31:23 +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
He Yin Ling 0a3975e80d test: handle exception by unit test script:
unit test script will detect exception, we don't need to let test fail
when exception happened.
2019-03-19 11:24:08 +08:00
He Yin Ling 1a9f019d2a unit-test-app: increase factory partition size 2019-03-10 06:21:37 +00:00
He Yin Ling 323a790f01 test: fix CI UT job pass even ut app bootup fail 2019-03-10 06:21:37 +00:00
Konstantin Kondrashov 91676b8620 build_system: Add support efuse 2019-02-28 07:31:29 +00:00
Ivan Grokhotkov d3724dc35d esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-26 02:01:29 +00:00
Renz Christian Bagaporo c6b07eec54 ci: copy flasher_args.json to unit test output folder 2019-02-14 08:33:46 +00:00
Roland Dobai 37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
He Yin Ling 431653bba8 unit-test: fix 2 issues in unit test script:
1. Gitlab will only regard failure (not error) as failed case. Use log
failure instead of log error, to display all error msg in test result
2. fix failed case not recognized by test script when failed during
reset DUT
2019-01-10 09:51:17 +00:00
He Yin Ling 783cb692e8 unit-test-app: support passing parameter with signals 2019-01-10 09:51:17 +00:00
Roland Dobai bfa9610f58 tools: Fix the Python coding style 2018-12-19 11:56:24 +01:00
Angus Gratton 0a27cfa850 unit_test.py: Allow importing tiny-test-fw from IDF_PATH as well as TEST_FW_PATH 2018-12-18 14:09:05 +11:00
He Yin Ling b0154cbf58 unit-test-app: fix the RegEx to detect test case:
tags are not correctly parsed if eol do not contain `\r`
2018-11-29 23:06:16 +08:00
Ivan Grokhotkov bbeb62547e fatfs: add option to prefer ext. RAM for internal buffers 2018-11-29 19:26:46 +08:00
He Yin Ling 1c65f18422 Merge branch 'test/enhanced_junit_test_result' into 'master'
test: enhanced junit test result

See merge request idf/esp-idf!2766
2018-11-26 16:35:08 +08:00
He Yin Ling ef9eaddd88 ci: assign unit test cases in sequence of config and name 2018-11-26 10:07:41 +08:00
He Yin Ling 5b3d09d5c8 test: fix unit test script code style warnings 2018-11-26 10:07:41 +08:00
He Yin Ling 644571f78b test: generate junit test report according to executed cases 2018-11-26 10:07:41 +08:00
Ivan Grokhotkov 5aa7abb216 Merge branch 'bugfix/spiram_80m_clk_config' into 'master'
clk: fix regression in clock setting for SPIRAM with 80MHz config

See merge request idf/esp-idf!3724
2018-11-25 22:25:19 +08:00
Mahavir Jain bd3806193d unit-test-app: keep CONFIG_SPIRAM_BANKSWITCH_ENABLE enabled only for psram_8m config 2018-11-20 18:54:12 +05:30
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 Christian Bagaporo 364f98b67e cmake: fix for parsing unit test config 2018-11-16 12:00:39 +00:00
Ivan Grokhotkov 7b86247428 unit-test: use TEST_GROUPS to filter tests for psram_vspi and psram_hspi 2018-11-15 12:27:05 +00:00
Ivan Grokhotkov 09e4321e97 unit test: allow filtering tests for configs using TEST_GROUPS 2018-11-15 12:27:05 +00:00
Ivan Grokhotkov 621e316725 Merge branch 'feat/psram_support_hspi' into 'master'
esp32: support to use hspi to output clock for 4M psram

See merge request idf/esp-idf!3377
2018-11-06 20:34:41 +08:00
Ivan Grokhotkov e4b68c49f2 Merge branch 'bugfix/py3_ci_enable' into 'master'
Enable Python 3 bot tests in master

See merge request idf/esp-idf!3615
2018-11-05 19:49:32 +08:00
Ivan Grokhotkov 761d44bd36 Merge branch 'bugfix/xts_compile_err' into 'master'
mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled

See merge request idf/esp-idf!3506
2018-11-05 16:58:38 +08:00
Roland Dobai d4ba3bd2eb idf_ext.py: Fix Python 3 compatibility issue 2018-11-05 08:11:02 +01:00