Commit graph

87 commits

Author SHA1 Message Date
Anton Maklakov 8dc340d2ea CI: Add script for synchronization of the local mirrors for submodules
You should use it manually when any submodule in the esp-idf has changed

    You can mark to exclude some of them in mirror-list.txt
2017-06-30 12:07:06 +08:00
Anton Maklakov 52445ee541 CI: Use local mirrors for submodules
The CI uses the mirror-submodule-update.sh for non-permanent reassignment
    of 3rdparty sub-modules to local mirrors (only for 'non-master' branches).
    List of the mirrors in mirror-list.txt

    You can use the script locally to speed up data retrieval on network problems

    check_submodule_sync job uses 'GIT_STRATEGY: clone' to check the availability of public sources
2017-06-30 12:06:02 +08:00
Angus Gratton f52519d7a2 CI: Use custom get_full_sources.sh script instead of gitlab-ci's strategies
Work around problems caused by failed submodule clones corrupting
    the working directory on the build runner.

    Add 10 retries for cloning submodules.
2017-06-30 12:05:17 +08:00
Anton Maklakov 35609de417 CI: Move the ci-related staff to a separate directory 2017-06-30 11:57:07 +08:00
Ivan Grokhotkov 9b955f4c9f Merge branch 'feature/sysview_via_apptrace' into 'master'
sysview via apptrace

See merge request !708
2017-06-29 08:40:13 +08:00
Angus Gratton 90f1d42a9b Merge branch 'feature/better_make_size' into 'master'
build system: Add idf_size.py tool for better "make size" output

See merge request !874
2017-06-28 06:11:56 +08:00
Alexey Gerenkov 8d43859b6a esp32: SEGGER SystemView Tracing Support
Implements support for system level traces compatible with SEGGER
SystemView tool on top of ESP32 application tracing module.
That kind of traces can help to analyse program's behaviour.
SystemView can show timeline of tasks/ISRs execution, context switches,
statistics related to the CPUs' load distribution etc.

Also this commit adds useful feature to ESP32 application tracing module:
 - Trace data buffering is implemented to handle temporary peaks of events load
2017-06-27 20:52:43 +03:00
Angus Gratton 5dca92377d test runner: Print test name when starting, print filter description
Makes it easier to run tests manually.
2017-06-26 15:38:46 +10:00
Angus Gratton 5055290baf build system: Add idf_size.py tool for better "make size" output & analysis
Add new "make size_components" and "make size_files" targets for analysing makeup of the ELF file.

Plain "make size" output now looks like this:

Total sizes:
 DRAM .data size:   11156 bytes
 DRAM .bss  size:   22304 bytes
Used static DRAM:   33460 bytes ( 294220 available, 10.2% used)
Used static IRAM:   80480 bytes (  50592 available, 61.4% used)
      Flash code:  421463 bytes
    Flash rodata:  103824 bytes
Total image size:~ 616923 bytes (.bin may be padded larger)
2017-06-21 15:43:22 +10:00
Ivan Grokhotkov b78a8ae035 unit-test-app: increase space for factory partition to 1280K 2017-06-15 18:15:36 +08:00
Angus Gratton 211580bf4f Add libsodium v1.0.12
Run some unit test cases based (poorly) around sodium's test infrastructure.

Increase in unity test task stack is due to signature tests, load a lot of data onto the stack.
2017-06-14 15:51:08 +10:00
Angus Gratton 5a1a8b4637 Merge branch 'bugfix/resume_task_cpu1_when_scheduler_disabled' into 'master'
Fix bug waking a task on CPU1 when scheduler is disabled

See merge request !819
2017-06-09 07:10:10 +08:00
Angus Gratton f40ae10a5d freertos: add test case for ISRs waking tasks when scheduler disabled 2017-06-05 16:12:20 +10:00
Anton Maklakov 91718cc776 unit-test-app: Fix incorrect CR+LF sequence.
This caused problems with handling output by grep, sed, etc
2017-06-05 10:51:48 +08:00
He Yin Ling 9b39be9559 CI: fix bug of duplicated unit test case ID:
need to compare if different file names has the same hash value.
use relative path to IDF to keep test case ID consist.
2017-06-03 11:38:05 +08:00
Anton Maklakov 144d345b3b unit-test-app: Fix capability to use !<filter> to inverse that filter 2017-06-01 12:23:14 +08:00
Ivan Grokhotkov 972d1d9242 Merge branch 'feature/ci_test_config_autogen' into 'master'
CI: auto generate configs for test jobs

Currently CI test jobs are static configured by several pre-generated config files.
This approach have several disadvantages:

1. not flexible to select test cases to run, which is important feature of @bot
2. difficult to update test as we need to pre-generate quite a lot files
3. need to maintain extra config files in IDF
4. not flexible to support new test apps or chips, can't use some new features of test bench

Therefore we'll add assign_test stage between build and test, to generate configs for test jobs.

See merge request !738
2017-05-19 11:56:45 +08:00
Henrik Maier b95bef4d9b Update idf_monitor.py to make --toolchain-prefix argument work
--toolchain-prefix command line argument was not taken into account when specified

Merges https://github.com/espressif/esp-idf/pull/617
2017-05-18 10:47:19 +10:00
Angus Gratton ca4f5b9ee6 unit test runer: Add capability to use ![tag] to run all-tests-except-tag
Mostly useful for running ![ignore] to skip ignored tests.
2017-05-10 17:22:30 +10:00
Ivan Grokhotkov 04eb6f6129 Merge branch 'feature/save_esptool_flash_args' into 'master'
CI: save download config in CI build jobs:

IDF built app download config may change with some modification.
save the download configs for built APP in build stage.
then we can use the correct download config in test stage.

See merge request !676
2017-05-08 15:48:28 +08:00
He Yin Ling b045df6507 CI: remove auto assign case script for UT:
we'll now auto assign all test cases in assign_test_case job. remove the
duplicated functions in unit test script.
2017-05-08 11:44:45 +08:00
Ivan Grokhotkov 33b8b7855e Merge branch 'bugfix/spiflash_fatfs_fixes_and_tests' into 'master'
FATFS fixes and tests

This MR includes a set of fixes related to FATFS, SDMMC, and wear levelling:

- `esp_vfs_fat_spiflash_mount` uses `FM_SFD` flag when creating the partition. The volume layout (given in `VolToPart` variable) was not compatible with SFD mode, so mkfs was failing. This fixes the volume layout to use "autodetect" for both volumes. Merges https://github.com/espressif/esp-idf/pull/559.

- fix `prepend_drive_to_path`function, which didn't prepend drive to path (while consuming 2k of stack space)

- fix stack overflow in vfs_fat_link function which allocated two 4kbyte `FIL` structures on the stack

- fix support for having two FATFS instances (in flash and SD) mounted at the same time

- unit tests written for FATFS on SDMMC are made common between SDMMC and WL implementations; FATFS unit tests on WL will run during CI

- fix inconsistent definition of PATH_MAX and ARG_MAX (TW12207, TW12104, https://github.com/espressif/esp-idf/issues/289)

See merge request !732
2017-05-05 17:03:17 +08:00
Ivan Grokhotkov a428af8c9f unit tests: change type of flash_test partition to ‘fat’
This change makes the spi_flash test partition usable for WL and FATFS
tests.
2017-05-05 15:21:37 +08:00
Angus Gratton 72c7941b5e Unit tests: Add FreeRTOS timer tests 2017-05-05 14:38:15 +10:00
He Yin Ling 2b273388dd CI: save download config in CI build jobs:
IDF built app download config may change with some modification.
save the download configs for built APP in build stage.
then we can use the correct download config in test stage.
2017-05-02 13:17:56 +08:00
Angus Gratton 66726ec166 freertos: Enable vTaskSuspend()/vTaskResume() API
Adds relevant unit tests.

TW11878
2017-04-26 12:50:20 +10:00
Ivan Grokhotkov b540322dc1 Merge branch 'feature/wear_levelling' into 'master'
wear levelling

This MR adds wear levelling component. It presents an interface similar to the interface of spi_flash and esp_partition. Inside, it stores data inside a partition to in a way that reduces worst case number of erase cycles for any given sector.

Also included are APIs similar to the ones provided for SDMMC to mount FAT filesystem on top of the wear levelling partition. A simple example shows how this API can be used.

Ref TW10338.

See merge request !567
2017-04-25 19:46:11 +08:00
Alexey Gerenkov 55f1a63faf esp32: Adds functionality for application tracing over JTAG
- Implements application tracing module which allows to send arbitrary
   data to host over JTAG. This feature is useful for analyzing
   program modules behavior, dumping run-time application data etc.
 - Implements printf-like logging functions on top of apptrace module.
   This feature is a kind of semihosted printf functionality with lower
   overhead and impact on system behaviour as compared to standard printf.
2017-04-17 23:26:29 +03:00
Ivan Grokhotkov 8f76fe1d7f move Catch framework header into tools directory 2017-04-17 11:01:18 +08:00
Angus Gratton b99d5df922 unit tests: Shrink unit test partition table so tests can run on 2MB of flash 2017-04-13 17:55:49 +10:00
He Yin Ling 6a759e7cef CI: fix bug in generating UT CI runner config:
the first case ID in filter is incorrect. Should put test case ID but
not test case itself to the filter.
2017-04-10 15:35:32 +08:00
He Yin Ling 678a7b53f7 CI: revise unit test parser 2017-04-06 19:09:16 +08:00
antti bda63abb40 CI: modify unit test parser to parse unit test cases from build files
Previously test cases were parsed from test files
2017-04-06 17:40:55 +08:00
Angus Gratton 45581dbaca freertos: Delay context switch from queue/task APIs until exiting critical section
Closes #374: https://github.com/espressif/esp-idf/issues/374
2017-04-04 10:10:08 +10:00
Angus Gratton 987631b9a0 windows: Don't expand PATH when generating setup
Ref #467 https://github.com/espressif/esp-idf/issues/467
2017-03-30 12:09:50 +11:00
Angus Gratton 16ef01dc69 Merge branch 'bugfix/windows_setup' into 'master'
Windows setup improvements

* Tweak Makefile to significantly reduce startup time on Windows (also reduced on other platforms, but less obvious.)
* Revise windows setup installation script to fix various issues, use latest toolchain.
* Tweak Windows config docs

See merge request !597
2017-03-28 10:49:08 +08:00
Angus Gratton f5aee6a6e6 windows config: Update Windows setup script, pre-installed image, instructions.
Add notes about MSYS2 package mirrors & HTTP proxies for users in China.

Closes #260 https://github.com/espressif/esp-idf/issues/260
Closes #281 https://github.com/espressif/esp-idf/issues/281
Closes #200 https://github.com/espressif/esp-idf/issues/200
Closes #430 https://github.com/espressif/esp-idf/pull/430
Accomplishes similar goals to #264 https://github.com/espressif/esp-idf/pull/264
2017-03-27 11:02:49 +11:00
Ivan Grokhotkov 710c853adc Merge branch 'bugfix/spi_flash_lock_period' into 'master'
SPI flash operations lock for shorter periods

Based on bug report here:
https://esp32.com/viewtopic.php?f=13&t=1489&p=6816#p6773

Long SPI flash erase (and possibly write/read) cycles block all tasks on both CPUs for an extended period, and can lead to WiFi dissassociation (and general priority inversion.)

This MR inserts preemption breaks into large operations (all erases, writes every 8KB, reads every 16KB).

Overhead of a single spi_flash_guart_start()/spi_flash_guard_end() cycle measured at approx 67us (assuming no preemption.)

See merge request !600
2017-03-24 15:55:42 +08:00
Angus Gratton e88226c256 idf_monitor: Use ANSI color codes for all output we inject into stderr 2017-03-23 10:41:14 +08:00
Angus Gratton 8352e7e9ec unit test: Measure test wall time with CCOUNT, so it includes time w/ interrupts off 2017-03-22 15:35:54 +08:00
Angus Gratton 5f3b9876b8 idf_monitor: Fix issues using Ctrl-F/Ctrl-A/gdb with older pyserial
Previously error was "AttributeError: 'Console' object has no attribute 'cancel'"
2017-03-21 16:08:06 +08:00
Angus Gratton e477ce93e9 idf_monitor: Small fixes (baud rate, EOL, /dev/tty.X on macOS, Ctrl-T on failure)
* "make monitor" not passed the configured baud rate
  Closes #436 https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows
  Ref 02fdf8271d (commitcomment-21369196)
2017-03-21 16:00:32 +08:00
Angus Gratton 02fdf8271d Merge branch 'feature/idf_monitor' into 'master'
Expand  'make monitor' support

New 'make monitor' idf_monitor tool for better monitor output. Running 'make monitor' will now:
* Automatically look up code addresses via addr2line and print function, source file, line number in terminal.
* Can reset the ESP32 by typing Ctrl-T Ctrl-R.
* Can run "make flash" by typing Ctrl-T Ctrl-F.
* Can run "make app-flash" by typing Ctrl-T Ctrl-A.
* If gdb stub starts, monitor will automatically run gdb and connect. When gdb exits, ESP32 resets and monitor resumes.
* Exit is still Ctrl-[

Have some more features I'd like to add (log output to file, crash dump support) but I think this is at the point of being useful.


See merge request !565
2017-03-15 10:41:08 +08:00
Angus Gratton 2156408d45 Merge branch 'feature/aws_iot_sdk' into 'master'
Amazon AWS IoT SDK

Amazon IoT SDK component, plus two examples derived from their Linux samples.


See merge request !132
2017-03-14 10:21:08 +08:00
Angus Gratton da660b234c AWS IoT Device SDK Support
Use device cert/key embedded in firmware, or loaded from filesystem.
2017-03-13 17:23:29 +08:00
antti 1e2c5cc151 fix unit test app to print tests in the same order they are given in files 2017-03-13 12:06:49 +08:00
Angus Gratton 1544544f8a tools: New idf_monitor 'make monitor' tool for smarter monitor output 2017-03-13 09:31:45 +08:00
Angus Gratton fd8703bd2a Merge branch 'bugfix/unit_test_parser_only_dirs' into 'master'
unit tests: Make UnitTestParser ignore non-directories inside 'components' dirs

Tiny fix to UnitTestParser script behaviour, if you happen to have any stray files in your "components" directories.

See merge request !561
2017-03-09 06:58:02 +08:00
Angus Gratton e014d268fe unit tests: Make UnitTestParser ignore non-directories inside 'components' dirs 2017-03-07 10:16:52 +11:00
Ivan Grokhotkov 66552c228c unit-test-app: default to 4MB flash 2017-03-04 14:56:41 +08:00