Commit graph

1180 commits

Author SHA1 Message Date
Ivan Grokhotkov f0547d58e4 esp_timer: add documentation, expose profiling option in Kconfig 2017-11-29 11:44:46 +08:00
Ivan Grokhotkov 067c0e1ffe Merge branch 'bugfix/cpp_unit_tests_not_executed_by_ci' into 'master'
CI: fix C++ unit test cases not executed by CI

See merge request !1589
2017-11-27 12:48:12 +08:00
Angus Gratton 7683bdbce2 Merge branch 'bugfix/monitor_windows10_crash' into 'master'
monitor: Fix Windows 10 crash since Fall Creators Update

See merge request !1567
2017-11-27 07:22:44 +08:00
Angus Gratton 02304ad83e Merge branch 'feature/freertos_backported_functions' into 'master'
freertos/backport and test v9.0.0 functions

See merge request !1515
2017-11-24 08:49:59 +08:00
He Yin Ling dd371289aa CI: fix C++ unit test cases not executed by CI 2017-11-23 17:14:23 +08:00
Darian Leung c1d101dd41 freertos/backport and test v9.0.0 functions
This commit backports the following features from FreeRTOS v9.0.0
- uxSemaphoreGetCount()
- vTimerSetTimerId(), xTimerGetPeriod(), xTimerGetExpiryTime()
- xTimerCreateStatic()
- xEventGroupCreateStatic()
- uxSemaphoreGetCount()

Functions backported previously
- xTaskCreateStatic()
- xQueueCreateStatic()
- xSemaphoreCreateBinaryStatic(), xSemaphoreCreateCountingStatic()
- xSemaphoreCreateMutexStatic(), xSemaphoreCreateRecursiveMutexStatic()
- pcQueueGetName()
- vTaskSetThreadLocalStoragePointer()
- pvTaskGetThreadLocalStoragePointer()

Unit tests were also written for the functions above (except for pcQueueGetName
which is tested in a separate Queue Registry MR). The original tlsp and del cb test case
was deleted and integrated into the test cases of this MR.
2017-11-23 14:18:09 +08:00
Angus Gratton f41431022b windows: Allow "make menuconfig" to work if ming32 gcc is also installed
Closes https://github.com/espressif/esp-idf/issues/1296
2017-11-23 14:31:04 +11:00
Angus Gratton 4d34251ff3 windows: Update precompiled env link & toolchain in setup script 2017-11-23 11:55:23 +11:00
Ivan Grokhotkov 6e1453e864 Merge branch 'feature/bot' into 'master'
CI: support customize test with @bot

See merge request !1502
2017-11-21 18:43:56 +08:00
Ivan Grokhotkov 2eae440646 unit-test-app: reduce startup delay, clean up 2017-11-20 17:51:27 +08:00
Ivan Grokhotkov 5117364c13 unit-test-app: don't print the list of tests by default
This reduces unit-test-app startup time when there are a lot of tests
included, speeding up unit tests in CI.
2017-11-20 17:51:27 +08:00
Angus Gratton 19598fa6d3 monitor: Fix Windows 10 crash since Fall Creators Update
Closes https://github.com/espressif/esp-idf/issues/1136
2017-11-20 17:47:43 +11:00
Alexey Gerenkov 692a890232 esp32: Adds Stack Smashing Protection Feature
These changes add posibility to enable GCC stack protector via menuconfig
for all source files in project.
2017-11-17 12:08:36 +03:00
He Yin Ling 9395a702ef test: check and collect performance via CI 2017-11-16 17:48:30 +08:00
Darian Leung d1853dbbc0 FreeRTOS/make Queue Registry and Run Time Stats configurable
This commit makes the configQUEUE_REGISTRY_SIZE and
configGENERATE_RUN_TIME_STATS configurable in menuconfig.

- configQUEUE_REGISTRY_SIZE can now be set in menuconfig.
- The functions vQueueAddToRegistry() and vQueueUnregisterQueue() were made
  SMP compatbile
- pcQueueGetName() was backported from FreeRTOS v9.0.0
- Added test case for Queue Registry functions

- configGENERATE_RUN_TIME_STATS can now be enabled in menuconfig. CCOUNT or
  esp_timer can be selected as the FreeRTOS run time clock in menuconfig as
  well, although CCOUNT will overflow quickly.
- Run time stats collection (in vTaskSwitchContext) and generation (in
  uxTaskGetSystemState) have been made SMP compatible. Therefore
  vTaskGetRunTimeStats() now displays the run time usage of each task as a
  percentage of total runtime of both CPUs

Squash
2017-11-14 15:50:31 +08:00
Ivan Grokhotkov 7632c6a80c Merge branch 'test/UT_reset_check' into 'master'
Test/ut reset check

See merge request !1086
2017-11-10 11:30:46 +08:00
Ivan Grokhotkov d1f6030921 Merge branch 'bugfix/from_github' into 'master'
Bug fixes from Github

See merge request !1487
2017-11-10 11:13:04 +08:00
He Yin Ling c6f7a38536 CI: support customize test with @bot 2017-11-08 11:36:16 +08:00
houchenyao f80824a2d8 test: support test for UT cases expect to reset 2017-11-07 12:19:39 +08:00
Ivan Grokhotkov 6b420b2452 unit tests: add psram configuration 2017-11-06 11:23:15 +08:00
Angus Gratton 2c72223a4e Merge branch 'bugfix/protect_spiflash_regions' into 'master'
spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)

See merge request !1452
2017-11-04 12:40:21 +08:00
Angus Gratton 670733df9f spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)
Can be disabled or made into a failure result in kconfig if needed.
2017-11-03 15:52:27 -07:00
Krzysztof Bociurko 5827fd8c71 idf_monitor: Fixed a bug where pressing a key that doesn't encode into
a proper ASCII character, terminated the monitor with an exception
2017-11-03 16:47:30 +08:00
Ivan Grokhotkov 849ad9b37b tools/unit-test-app: fix build warning 2017-11-03 15:49:09 +08:00
He Yin Ling cd1223a25e CI: integrate example test to CI 2017-10-31 19:16:26 +08:00
He Yin Ling 47a9a4a614 test: add test fw for example test 2017-10-31 17:42:19 +08:00
Ivan Grokhotkov 59b7d98fec Merge branch 'feature/dfs' into 'master'
Dynamic frequency scaling

See merge request !1189
2017-10-22 12:34:11 +08:00
Darian Leung a6854b72cd freertos/make trace facility configurable
This commit makes configUSE_TRACE_FACILITY and
configUSE_STATS_FORMATTING_FUNCTIONS configurable in kconfig. Test cases fro the
functions enabled by the two configurations above have also been added.

Test cases for the following functions have been added...

- uxTaskGetSystemState()
- uxTaskGetTaskNumber()
- vTaskSetTaskNumber()

- xEventGroupClearBitsFromISR()
- xEventGroupSetBitsFromISR()
- uxEventGroupGetNumber()

- uxQueueGetQueueNumber()
- vQueueSetQueueNumber()
- ucQueueGetQueueType()

Test cases for the following functions were not required...

- prvListTaskWithinSingleList()
- prvWriteNameToBuffer()
- vTaskList()
2017-10-20 15:17:17 +08:00
Ivan Grokhotkov 90bbcbcdc0 unit tests: fix warnings, build with -Werror
- libsodium: silence warnings
- unit tests: fix warnings
- spiram: fix warnings
- ringbuf test: enable by default, reduce delays
2017-10-19 21:35:23 +08:00
He Yin Ling 0a5b678e58 CI: support test UT with different config by CI 2017-10-19 21:35:20 +08:00
Ivan Grokhotkov 3d150be4e1 unit-test-app: new targets for building different configurations 2017-10-19 21:35:19 +08:00
Ivan Grokhotkov bfeecd2b56 freertos: deprecate XT_CLOCK_FREQ
- freertos: add deprecated definition for XT_CLOCK_FREQ
- flash_ops: don't use XT_CLOCK_FREQ
- unity: don't use XT_CLOCK_FREQ
- hw_random: don't use XT_CLOCK_FREQ
- core_dump: don't use XT_CLOCK_FREQ
- app_trace: don't use XT_CLOCK_FREQ
- xtensa_init: init xt_tick_divisor
2017-10-18 14:19:19 +08:00
Ivan Grokhotkov 2b3325b1ab unit tests: fix ref_clock value obtained due to overflow 2017-10-18 14:19:15 +08:00
Angus Gratton 69e92ee320 unit tests: If heap tracing is enabled in sdkconfig, leak trace each test 2017-10-17 15:29:25 +08:00
Angus Gratton 6f07e0797d Unit tests: If a test fails due to corrupting memory, don't print a misleading source file name 2017-10-17 14:46:08 +08:00
Angus Gratton d20fbffae1 idf_monitor: Demangle C++ names 2017-10-17 14:46:08 +08:00
Angus Gratton 0a52dbccca Merge branch 'bugfix/spi_reset_race' into 'master'
periph_ctrl: Refactor to add periph_module_reset(), avoid potential race in SPI DMA workaround

See merge request !1349
2017-10-13 08:51:36 +08:00
Angus Gratton 5d8bd1aa9e Merge branch 'bugfix/libsodium_mbedtls_sha' into 'master'
libsodium: Fix mbedTLS SHA256 & SHA512 implementation, make optional

See merge request !1329
2017-10-13 08:50:24 +08:00
Angus Gratton d98934d56b doc: Fix mentions of Cygwin-style paths to Unix-style
Cygwin-style is really only /cygpath/xxx and IDF doesn't support these.

Closes https://github.com/espressif/esp-idf/pull/1033
2017-10-09 14:22:53 +11:00
Angus Gratton acff3c9c59 libsodium: Fix mbedTLS SHA256 & SHA512 implementation, make optional
* Only direct invocation of cypto_hash_sha256 & crypto_hash_sha512 produced correct output.
* Some remaining header file mixups, so changed approach to wrapping the state structures.
* Fixes https://github.com/espressif/esp-idf/issues/1044 (crypto_sign problems)
* Add option to disable mbedTLS implementation for SHA256 & SHA512 in libsodium
2017-10-06 11:51:55 +11:00
Angus Gratton 0dd9b899b7 periph_ctrl: Refactor to add periph_module_reset(), avoid potential race in SPI DMA workaround
Also refactor use of direct clock access in unit test ref_clock (probably not a real issue)
2017-10-02 17:48:16 +11:00
michael 7370f2913d test: update the format of TEST_ASSERT macro series in `unity.c` 2017-09-27 19:56:46 +08:00
Angus Gratton c4e65d6a95 Merge branch 'bugfix/build_kconfig_deps' into 'master'
build: make clean should remove all .d files in tools/kconfig

See merge request !1302
2017-09-22 12:42:37 +08:00
Angus Gratton 976135c3a8 Merge branch 'bugfix/build_system_regen_component_vars' into 'master'
build system: Fix bug requiring "make clean" after IDF updates or menuconfig changes

See merge request !1293
2017-09-22 12:42:00 +08:00
Angus Gratton a361a00405 build: make clean should remove all .d files in tools/kconfig
Causes a problem that can't be fixed by "make clean" if the
host OS headers have moved around.

ie https://esp32.com/viewtopic.php?f=13&t=3098&p=14487
2017-09-22 10:27:32 +10:00
Angus Gratton ab531c0b48 doc: Add steps to update Windows environment installations 2017-09-21 16:57:06 +10:00
Angus Gratton 53d12a6212 build system tests: Don't unix2dos .git files, build directories 2017-09-20 18:21:29 +10:00
Angus Gratton 85ce07e6fd build system: Fix bad partial builds after updates, sdkconfig changes
Fixes accidental regression merging 9903ea1c11.

Add test case for this kind of rebuilding.
2017-09-20 18:11:15 +10:00
Ivan Grokhotkov 01c0c4b661 unit-test-app: initialize partition table info before starting the test 2017-09-19 10:39:44 +08:00
Angus Gratton 0db01b4a4d windows: Update windows prereq script & precompiled environment download 2017-09-18 18:26:57 +10:00
Angus Gratton 61e3a5bd16 windows: Update toolchain & MSYS package download links 2017-09-13 17:27:47 +08:00
Angus Gratton e250dbb433 windows: Add workaround for "git submodule" stray output bug
TW10271
2017-09-13 17:27:47 +08:00
me-no-dev dd87deb278 Add SPIFFS Component to IDF 2017-09-11 19:56:40 +03:00
Angus Gratton 1c7b8aa3a5 Heap tracing support 2017-09-07 16:32:05 +10:00
Angus Gratton 64bfdf56bb Unit tests: enable comprehensive heap poisoning checks 2017-09-07 16:32:05 +10:00
Angus Gratton 5222428dde unit tests: Check heap integrity after each test, check for obvious leaks 2017-09-07 16:32:05 +10:00
Angus Gratton 4809c70899 Merge branch 'feature/register_heaps_runtime' into 'master'
heap: Support adding new heap regions at runtime

See merge request !1159
2017-09-07 10:18:21 +08:00
Deomid Ryabkov 9903ea1c11 Add --warn-undefined-variables to MAKEFLAGS
Fix warnings where undefined vars are used.

Make Kconfig emit "FOO=" for unset bool options
To ensure make variables are always defined, even if empty.

When writing auto.conf, include symbols disabled by dependency to make sure all make variables are always defined.

Fixes espressif/esp-idf#137

Cherry-picked from https://github.com/espressif/esp-idf/pull/138
2017-09-05 16:10:46 +10:00
Angus Gratton 5361c08989 heap: Support adding new heap regions at runtime
To facilitate this, the list of registered heap regions is now a linked list
(allowing entries to be appended at runtime.)
2017-09-05 14:07:02 +10:00
Angus Gratton f487bb19d7 Merge branch 'bugfix/ci_build_examples_more' into 'master'
CI build_examples: Fix build flakiness

See merge request !1191
2017-09-04 16:02:12 +08:00
Angus Gratton 867b20837f build system: Explicitly disallow 'clean' along with non-cleaning targets
Too hard to stage the dependencies so that all clean steps complete before any build steps begin. Also, using and then
deleting and then regenerating SDKCONFIG_MAKEFILE in one pass is really hard to manage successfully.
2017-09-04 17:40:15 +10:00
Angus Gratton 97efaab27b build system tests: Run inside PWD same as build_examples.sh 2017-09-04 17:40:15 +10:00
Angus Gratton 2544355301 build_examples: Small cleanups
* Override MAKEFLAGS via make not via shell variables
* Remove build_examples in gitlab-ci
* Don't use mktemp for any logs
2017-09-04 17:40:15 +10:00
Jeroen Domburg 34372a091c Add initial SPI RAM support. This adds support for an ESP-PSRAM32 chip connected to the default flash pins and GPIO 16 and 17. The RAM is mapped to address 0x3F800000, but otherwise ignored by esp-idf as of yet. 2017-09-04 12:05:49 +08:00
Ivan Grokhotkov 5666fc0a56 Merge branch 'feature/esp_timer_improvements' into 'master'
esp_timer improvements

See merge request !1172
2017-09-01 16:14:01 +08:00
Ivan Grokhotkov d2acf1ce77 sleep: add light sleep, factor out APIs common for deep/light sleep 2017-09-01 10:36:14 +08:00
Ivan Grokhotkov 9a2c62cf2b unity: add reference clock for use in unit tests 2017-09-01 10:34:36 +08:00
Ivan Grokhotkov 3d8390fa8a ci: put example log files on the build volume 2017-08-31 23:00:48 +08:00
Ivan Grokhotkov a25eb825e1 Merge branch 'bugfix/dport_protect_crypto' into 'master'
add protection for crypto registers in DPORT

See merge request !928
2017-08-30 11:45:35 +08:00
Ivan Grokhotkov 80486240c6 unity: log error codes as hex
Error codes are normally defined as hex numbers in header files, so
changing the assert macro to print them as hex as well.
2017-08-29 08:35:23 +08:00
Angus Gratton 0ea4cd67dd mbedtls: Remove "unsafe" warning, enable AES by default & make SHA/MPI optional 2017-08-25 16:08:03 +10:00
Ivan Grokhotkov b9cdbfea87 Merge branch 'test/UT_SDMMC' into 'master'
Enable SDMMC driver test cases

See merge request !1106
2017-08-24 14:41:39 +08:00
houchenyao cf64c7e9a6 unit test: add sd env and spi env for sdmmc 2017-08-22 21:01:34 +08:00
Ivan Grokhotkov 6f52cf0f9d Merge branch 'bugfix/ci_fix_getting_sources' into 'master'
CI: Fix the spell for more reliable getting the sources

See merge request !1127
2017-08-22 20:03:12 +08:00
Ivan Grokhotkov 141b1174c6 idf_monitor: send CR when ENTER is pressed
Other terminal emulators (screen, minicom) default to sending CR when
ENTER is pressed on the keyboard. Make behavior of idf_monitor
consistent with them.
2017-08-21 15:58:28 +08:00
Ivan Grokhotkov d7d6f1e376 idf_monitor: use cancellation and Console.getkey from pyserial 3.3.0+
Between 3.1.0 and 3.3.0, pyserial had thread cancellation implemented
using a select, which blocked on the stdin and an auxiliary pipe. When
thread had to be cancelled, a byte would be sent into the pipe,
unblocking stdin.

Unfortunately, this method suffers from a problem with using select on
a StreamReader (which represents the decoder wrapped around stdin).
In some cases, when the TTY sends an escape sequence in response to
an escape sequence received from serial, this escape sequence will not
be read from stdin until some key is pressed.

In https://github.com/pyserial/pyserial/commit/cab3dab, this method
was replaced with an TIOCSTI ioctl. This change makes sure we use the
new cancellation method even if the script is running with older
pyserial.
2017-08-21 15:58:28 +08:00
Anton Maklakov 618e56abf9 CI: Fix the spell for more reliable getting the sources 2017-08-21 11:52:49 +08:00
Kedar Sovani 8348a71847 ethernet: remove CONFIG_ETHERNET
1. Hello World application shows no footprint difference before and
after this change
2. examples/ethernet/ethernet application compiles properly (can't
test with my board)
2017-08-18 08:31:43 +05:30
Kedar Sovani 63c738de4c sdkconfig: Remove rest of the references to WIFI_ENABLED 2017-08-16 15:55:42 +05:30
Alexey Gerenkov c2c9149a24 esp32: Apptrace API enhancement
- User down buffer configuration support
 - bugfix: ring buf - avalable write size undeflow
 - SysView down buf support updated
2017-07-24 19:57:44 +03:00
Anton Maklakov 341cc8221c CI: Make the list of examples permanent between jobs
Because the results of the 'find' command are not sorted by name.
2017-07-20 16:46:49 +08:00
Angus Gratton b88c8d19fd Merge branch 'bugfix/project_makefile_recompile' into 'master'
build system: Updating project Makefile should trigger a full rebuild

See merge request !990
2017-07-20 10:10:00 +08:00
Angus Gratton 17adb40ca8 bootloader: Calculate SHA256 hash of image on every boot
Makes app image booting more reliable (256-bit rather than 8-bit verification.)

Some measurements, time to boot a 655KB app.bin file and run to app_main() execution.

(All for rev 1 silicon, ie no 340ms spurious WDT delay.)

80MHz QIO mode:
before = 300ms
after = 140ms

40MHz DIO mode:
before = 712ms
after = 577ms

40MHz DIO mode, secure boot enabled
before = 1380ms
after = 934ms

(Secure boot involves two ECC signature verifications (partition table, app) that take approx 300ms each with 80MHz CPU.)
2017-07-19 18:31:59 +10: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
Angus Gratton b7fc16a408 build system: Updating project Makefile should trigger a full rebuild
Project Makefile can set CFLAGS, macro defines, etc.
2017-07-13 10:51:24 +08:00
Angus Gratton c46e2edcae Merge branch 'bugfix/make_size_windows' into 'master'
make size: Fix map file parsing error on Windows

See merge request !932
2017-07-12 17:31:49 +08:00
Anton Maklakov 3cd10899e6 CI: Work around problem with running the initial 'make clean' in parallel (#18)
Just don't pass '-j' to the 'make clean' command
2017-07-07 11:03:25 +08:00
Anton Maklakov f0b6256490 build: Fix test for the first time 'make clean' and error handling in build_examples
Now the tests do not pass

    Before we had incorrect code of the error code checking
    in build_examples.sh for that case and did nothing in test_build_system.sh.
2017-07-07 11:03:25 +08:00
Anton Maklakov 2a6b7794ab CI: Fix the unbound variables in scripts 2017-07-06 18:52:08 +08:00
Anton Maklakov 1b3594ade1 Merge branch 'bugfix/ci_wrong_getting_sources' into 'master'
Fix the getting sources

See merge request !953
2017-07-06 18:43:53 +08:00
Anton Maklakov f194a6bdba CI: Fix the getting sources
Fix the getting sources for a case if the required commit is missed
    in the remote submodule repository.

    Also add more diagnostic.
2017-07-06 16:48:07 +08:00
Angus Gratton fd9d889e62 mbedtls unit tests: Allow for longer timeout using software SHA
Hardware SHA runs SHA operations faster than software...
2017-07-06 15:54:01 +08:00
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
Angus Gratton a8f08dc5da make size: Fix map file parsing error on Windows
Closes https://github.com/espressif/esp-idf/issues/739
2017-06-29 12:54:13 +10: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
Ivan Grokhotkov 8911e666a0 Merge branch 'feature/docs_partition_ota_flash' into 'master'
Partition/SPI/OTA docs & OTA new functionality

* Update partition, SPI flash & OTA docs to reflect functionality changes
* Refactor OTA implementation to perform checks mentioned in API doc
* Add new functions to OTA API: esp_ota_get_running_partition() & esp_ota_get_next_update_partition() functions
* Add spi_flash_cache2phys() & spi_flash_phys2cache() functions to support esp_ota_get_running_partition()


See merge request !513
2017-03-03 11:27:01 +08:00
Angus Gratton f29768c404 Build system: Add new BATCH_BUILD flag to disable interactive parts of the build
Mostly useful for Eclipse (where accidentally running interactive
config hangs the build), but also good for CI and other automated
build systems.
2017-02-22 11:59:37 +11:00
Angus Gratton c0f155f6ff kconfig: Ignore Windows host-compiled executables 2017-02-22 11:59:37 +11:00
Angus Gratton 8dede8f8a4 Eclipse: Process Windows paths correctly using cygpath
Includes splitting the Windows Eclipse setup doc into a separate page,
as it has so many additional steps.

Addresses github #17 and #166
https://github.com/espressif/esp-idf/issues/17
https://github.com/espressif/esp-idf/issues/166
2017-02-22 11:59:37 +11:00
Angus Gratton d28ee9a25e build system: Account for Windows behaviour of make wildcard for some dirs
See github #166
2017-02-22 11:59:37 +11:00
Angus Gratton f687725e97 unit tests: Use a unit test app partition table, configure spi_flash to use data partition 2017-02-22 10:26:04 +11:00
Angus Gratton 473f2cff51 kconfig: Remove gperf 3.1+ incompatible kconf_conf_id forward declaration
Forward declaration was unused. gperf 3.1+ changed parameter type from
'unsigned int' to 'size_t'.
2017-02-14 10:01:44 +11:00
antti 0501507d6b CI: add script for parsing unit test cases for CI from test files
Add python script that parses list of unit test cases for CI from component test folder

Modify .gitlab-ci.yml to run this script as part of build unit tests stage
2017-01-18 17:08:20 +08:00
Ivan Grokhotkov 5b2888e113 unity: fix testcase initializer for compiling with C++ 2017-01-06 14:56:02 +08:00
Jeroen Domburg 6f0a494cae Add testcase, fix executable memory allocated in shared dram/iram region 2016-12-15 15:03:22 +08:00
Angus Gratton f1390fa7c9 Merge branch 'bugfix/conf_across_mountpoints' into 'master'
Create temp config in the same dir as target

Fixes case where SDK and app are on different mounts

(In our usage of kconfig, dirname is the empty string & basename is the full path to sdkconfig)

Github pull request https://github.com/espressif/esp-idf/pull/151


See merge request !309
2016-12-15 07:07:27 +08:00
Deomid Ryabkov 6380245d3d Create temp config in the same dir as target
Fixes case where SDK and app are on different mounts
2016-12-12 16:16:14 +00:00
Jeroen Domburg bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Jeroen Domburg cb9ef19d3b Also add intr_alloc magic to rtc code 2016-12-08 12:57:57 +08:00
Jeroen Domburg ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Angus Gratton b98405f9d9 esp32: ReformatReformat panic.c (remove tabs, etc) 2016-12-07 13:25:56 -08:00
Ivan Grokhotkov a35e4f5923 Merge branch 'feature/unit_test_app_tweaks' into 'master'
unit-test-app: Don't auto-display menu after test run finishes

Previous code would sometimes display menu multiple times, depending on UART activity.

See merge request !253
2016-12-07 10:28:19 +08:00
Angus Gratton 69df54a28c unit-test-app: Don't auto-display menu after test run finishes
Previous code sometimes menu multiple times, depending on UART activity.
2016-12-06 11:25:31 -08:00
Ivan Grokhotkov ab3677d64c initial support for generation of ULP coprocessor code 2016-12-01 20:26:47 -08:00
Angus Gratton a902e2a9de mbedtls tests: Add additional MPI (bignum), SHA tests 2016-11-25 19:21:49 +11:00
antti 15d96eccdb add build all unit tests in project.mk and update doc 2016-11-23 11:42:12 +08:00
antti d390449371 add unit tests to esp-idf
rename nvs host test folder, modify .gitlab-ci.yml

remove unit-test-app build

re-format unit test files

remove extra newlines in project.mk

some refactoring for unit test part in project.mk

add build files of unit-test-app in gitignore

add README.md for unit test app

correct headings in README.md

remove files and make minor tweaks in unit test app

update .gitlab-ci.yml to use unit test app

delete unused lines in component_wrapper.mk

delete periph_i2s.h and lcd test

add text floating point in components/esp32/test/Kconfig

correct idf test build paths in .gitlab-ci.yml
2016-11-22 14:45:50 +08:00
Angus Gratton 341593f7d2 build system: Remove need for $(Q) macro in recipes, use --silent in MAKEFLAGS instead 2016-11-11 12:32:47 +11:00
Ivan Grokhotkov c8a43508e5 Merge branch 'bugfix/osx_menuconfig_build' into 'master'
Allow OS X to build without libintl

https://github.com/espressif/esp-idf/pull/42

I have tested this with the following configurations:
- OS X with Xcode command line tools, no macports, no homebrew
- OS X with Xcode command line tools and homebrew
- OS X with Xcode IDE and macports

All three work with this change, without it the first two had issues.

See merge request !172
2016-11-07 12:55:47 +08:00
Ivan Grokhotkov b6dd8a55cd Fix build with macports/pkgconfig, silence format string warnings on OS X
Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space).
-Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs.
2016-11-07 12:27:53 +08:00
Sandeep Mistry e96d4a0a32 Allow OS X to build without libintl 2016-11-03 21:40:52 +08:00
Ivan Grokhotkov b717e44eb2 tools: add code formatter rules for Eclipse
Generated with Eclipse Neon, should work in earlier versions as well.

This file can be imported
- into the workspace via Preferences > C++ > Code Style > Formatter > Import
- or into the project via Project Preferences > C++ General > Formatter > Import

Configuration options in Eclipse are not exactly the same as in astyle.
There may be some discrepancy between the format astyle and Eclipse will produce.
If anyone notices that, please let me know.
2016-11-03 18:41:00 +08:00
Ivan Grokhotkov 6602d6b7f2 docs: add style guide
This adds initial code style guide. Only section on code formatting is written, other sections to be added later.
Also adds scripts to format code using astyle.
2016-11-03 18:41:00 +08:00
Ivan Grokhotkov f5f625ead5 kconfig: fix build on macOS
macOS version of sed doesn't recognize \r as special character.
Replacing with \x0D substitution which works everywhere.
2016-09-20 11:31:46 +08:00
Angus Gratton cdd1b95b6e config system: Support Windows when CRLFs used for eol markers
Includes a test in test_build_system.sh to prevent regressions w/
CRLFs in text files.

Fixes Github #10
2016-09-16 18:07:58 +10:00
Angus Gratton 7c58c1e06b Build system: Allow components to add to the global CFLAGS via Makefile.projbuild
Used by mbedTLS to set MBEDTLS_CONFIG_FILE in all components.

This change sets CFLAGS/etc at the project level and then exports those
variables for components, rather than setting them independently each time
a component Makefile is invoked.
2016-09-09 11:08:19 +10:00
Angus Gratton 3e9a76f04d eclipse_make.sh: Fix printing of make directory 2016-09-08 13:39:09 +10:00
Angus Gratton 144ebe5d53 Move bin/eclipse_windows_make.sh to tools/windows_eclipse_make.sh
Moving as bin directory is going away soon
2016-09-08 13:39:09 +10:00
Angus Gratton f853f94335 Use IDF_PATH instead of SDK_PATH for the environment variable pointing to esp-idf
This will require a matching change in all projects using ESP-IDF.
2016-08-19 15:01:49 +08:00
Angus Gratton 9ec0e1545d Standardise remaining uses of SDK to ESP-IDF 2016-08-19 15:01:15 +08:00
Angus Gratton 9e0c80688b Fix gen_esp32part.py locations & documentation (thanks @wujiangang\!) 2016-08-18 21:42:37 +08:00
Ivan Grokhotkov bd6ea4393c Initial public version 2016-08-17 23:08:22 +08:00