Commit graph

300 commits

Author SHA1 Message Date
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
Angus Gratton 35f521afb6 cmake: Add toolchain version check 2018-04-30 09:59:20 +10:00
Angus Gratton 99a2359c5c confgen: Create config file if missing 2018-04-30 09:59:20 +10:00
Angus Gratton c671a0c3eb build system: Initial cmake support, work in progress 2018-04-30 09:59:20 +10:00
Angus Gratton a538644560 config: Add new Python & kconfiglib-based config management tool 2018-04-30 09:59:20 +10:00
Ivan Grokhotkov 48379b8bbe unit-test.py: increase timeout for test app start up 2018-04-26 18:52:45 +08:00
Ivan Grokhotkov c61c2a63d0 unity: flush test name before starting the test, use printf everywhere
Unit test runner expects to see the test name echoed after test
selection is made. If the unit test immediately goes into sleep mode,
UART output will not be complete, and test runner will not see the
test name. This flushes the stream buffer and waits for UART FIFO to
be empty before starting the test.

Additionally some parts of code used unity_printf and some used
printf. Since unity_printf was only useful during very early tests
when newlib was not available, replace all its usages with printf.
2018-04-26 18:52:45 +08:00
Angus Gratton fa3205737f partition_table: Check configured flash size fits in partition table
Check happens at build time, so flash size config may need to be changed.

Also fixes MD5_OPT undefined warning, closes https://github.com/espressif/esp-idf/issues/1867
2018-04-26 09:51:55 +10:00
Ivan Grokhotkov 907248b6a7 Merge branch 'feature/nvs_coverage' into 'master'
NVS: add power off recovery and coverage test into CI

See merge request idf/esp-idf!2246
2018-04-24 23:42:00 +08:00
Ivan Grokhotkov 4e982d4b18 Merge branch 'feature/idf_size_report_symbols' into 'master'
Feature/idf-size: report per-archive symbols and their sizes

See merge request idf/esp-idf!1956
2018-04-20 23:55:19 +08:00
Ivan Grokhotkov 6185e722c3 Revert "Merge branch 'feature/vfs_select' into 'master'"
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Ivan Grokhotkov 9d0751e2b1 ci: support jobs which don’t run unless triggered by name
By default, any job will run unless a filter is given, in that case
the filter will determine if the job should run or not. Some jobs do
not need to be run by default, and should only be triggered using the
bot. For such jobs, BOT_NEEDS_TRIGGER_BY_NAME can added to
environment variables.
2018-04-19 15:08:08 +08:00
Ivan Grokhotkov 88d0d6ffb0 Merge branch 'feature/vfs_select' into 'master'
Allow VFS file descriptors in select()

See merge request idf/esp-idf!2074
2018-04-19 15:06:02 +08:00
Ivan Grokhotkov 96b4a45cde Merge branch 'feature/remove_make_dependency_on_git' into 'master'
make: remove build system dependency on `git` using some hooks

See merge request idf/esp-idf!2211
2018-04-19 13:01:12 +08:00
Roland Dobai 6852d653bd Allow VFS file descriptors in select() 2018-04-17 11:25:30 +02:00
Ivan Grokhotkov 790049b3dd build: remove some debug lines printed when V=0
With V=0, build process would print “including .../Makefile.projbuild" lines, causing problems for print_flash_cmd target.
The issue was due to the way macro expansion works in make. To delay evaluation of info function until the execution of expanded block, two dollar signs are required.
Test for print_flash_cmd target added.
2018-04-17 08:04:38 +08:00
Mahavir Jain 4a7ca68596 tools/ci: add test case for build without dependency on git
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-13 17:15:17 +05:30
Ivan Grokhotkov bcbcdf6f99 build: fix excluding source files outside of component root
Since !2190, source files located outside of the component root
produce object files inside build directory. This change fixes
handling of COMPONENT_OBJEXCLUDE variable for such files. Tests are
added.
2018-04-12 14:28:54 +08:00
Roland Dobai 33480d1a2c Enable -Wwrite-strings when compiling IDF's own C files 2018-04-10 08:53:33 +02:00
Angus Gratton 53234ef2bc Merge branch 'refactor/rtc_split_module' into 'master'
bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.

See merge request idf/esp-idf!1848
2018-04-04 09:00:58 +08:00
Ivan Grokhotkov d7c8866896 Merge branch 'test/support_multi_stage_unit_test_case' into 'master'
unit-test-app: support multi stage unit test case

See merge request idf/esp-idf!2139
2018-04-03 18:20:16 +08:00
He Yin Ling fee844d22c unit-test-app: support multi stages test 2018-03-30 11:38:49 +08:00
Michael (Xiao Xufeng) cef8baf424 bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.
refactor structure of ``rtc_module.c`` to make it more clearly.

Closes https://github.com/espressif/esp-idf/issues/1517
2018-03-28 17:10:01 +08:00
Anton Maklakov f3d61015f7 build: Fix problems with building kconfig and generating sdkconfig
We had some problems:
    simultaneous compiling of kconfig in the same tree;
    attempt to use menuconfig in some examples and ut in batch mode (w/o interactive console)

Also increase debug abilities in CI:
    force non-interactive building;
    add variable DEBUG_SHELL to toggle verbosity of scripts
2018-03-28 10:39:20 +08:00
Angus Gratton 6acb38af4c Merge branch 'bugfix/idf_monitor_windows10' into 'master'
idf_monitor: Fix bug with Windows 10 sometimes printing a character twice

See merge request idf/esp-idf!1964
2018-02-27 06:21:53 +08:00
Angus Gratton 672f8b057e Merge branch 'feature/idf_size_sort_archives' into 'master'
Feature/idf size sort on size

See merge request idf/esp-idf!1957
2018-02-22 07:31:56 +08:00
Angus Gratton 3e83cfd77c idf_monitor: Fix bug with Windows 10 sometimes printing a character twice
Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from https://github.com/espressif/esp-idf/issues/1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637
2018-02-21 08:35:43 +11:00
Kedar Sovani c8ef747c0a idf_size: Report per-symbol size from the map file
Report as per the relevant sections output in the 'archives' output
2018-02-19 17:13:56 +05:30
Kedar Sovani c9e6ed7d60 idf_size: Sort output on total-size instead of filename 2018-02-19 11:50:46 +05:30
Roland Dobai 4322e31c98 Make it easier to look up error messages
tools/gen_esp_err_to_name.py generates
components/esp32/esp_err_to_name.c for lookup of the error codes from
all of the IDF project and easily identify all codes in one place
2018-02-15 14:19:03 +01:00
He Yin Ling 532107c958 Merge branch 'test/ut_script' into 'master'
test: use the tiny-test-fw to run the unit test in CI

See merge request idf/esp-idf!1558
2018-02-06 18:03:22 +08:00
Ivan Grokhotkov 7ade59db6a Merge branch 'bugfix/idf_monitor_fixes' into 'master'
idf_monitor bug fixes

See merge request idf/esp-idf!1889
2018-02-05 20:59:33 +08:00
houchenyao 5b8a9478a3 CI: new CI ut framework, and can run it in local PC 2018-02-05 06:58:22 +00:00
houchenyao cb3c88fb2f unit-test-app: use '-' to show test history 2018-02-05 06:58:22 +00:00
houchenyao 1e4508bc8d tiny-test-fw: fix dut for python2 and python3 2018-02-05 06:58:22 +00:00
Angus Gratton 11bf72aace Update cJSON to v1.7.1
* Fix buffer overflow issue in cJSON 1.6.0
* Change cJSON structure to git submodule

Closes https://github.com/espressif/esp-idf/issues/1577
2018-02-05 14:15:26 +08:00
Angus Gratton 4eab275a51 idf_monitor: Fix remaining case of Windows "console write fails" bug
Closes https://github.com/espressif/esp-idf/pull/1567
2018-02-01 14:05:56 +08:00
Angus Gratton 19d3d25ec2 idf_monitor: Aggressively clean up any interactive gdb session
At least on Linux, this can get stuck sometimes and cause terminal weirdness.
2018-02-01 14:05:53 +08:00
Angus Gratton 853736afe2 Toolchain: Update to version 1.22.0-80-g6c4433a
Includes updated prebuilt Windows MSYS2 environment.
2018-01-10 07:49:24 +00:00
Anton Maklakov b902d00fa0 CI: Fix an occasional error caused by reordering the commands along with 'tee' in the script 2018-01-05 12:46:34 +08:00
Anton Maklakov 20616fc0f5 CI: Fix a sporadic bug when building of the examples. Add logs to the artifacts 2017-12-28 19:20:48 +08:00
Angus Gratton b62e5a4b4e idf_monitor: Fix Windows 10 bug in cases where second console write also fails
Although in my tests the second write always passes, people have reported
different results.

Closes https://github.com/espressif/esp-idf/issues/1136 (again)
2017-12-15 16:45:44 +11:00
michael cb810ccbe1 feat(monitor): add pause feature. 2017-12-14 13:48:03 +08:00
michael a8f89009a4 feat(monitor): add new feature allowing disabling log display. 2017-12-14 13:48:03 +08:00
krzychb 78aa1ec704 Resolves: Warning '-s option given but default rule can be matched'. Closes https://github.com/espressif/esp-idf/issues/1338 2017-12-11 22:53:39 +01:00
Ivan Grokhotkov 82aeb18c3f Merge branch 'test/UT_master_slave_mode' into 'master'
unit-test-app: support multiple devices test cases

See merge request !1220
2017-12-11 15:22:51 +08:00
houchenyao 7a31b93fa3 unit-test-app: support multiple devices test cases:
current unit-test-app don't support test components need to communicate
with each other (like GPIO, SPI ...). Now we add multiple devices mode
to unit test app, support writing and running test with multiple DUTs.

please refer to `docs/api-guides/unit-tests.rst` for detail.
2017-12-07 13:57:26 +08:00
Ivan Grokhotkov 2b92119840 Merge branch 'bugfix/freertos_check_task_waiting_termination' into 'master'
Freertos Task Deletion backport and FPU documentation

See merge request !1591
2017-12-07 11:55:10 +08:00
Darian Leung 38afa32cfb freertos/fix SMP bug with Idle task clean up
This commit backports vTaskDelete() behavior from FreeRTOS v9.0.0  which
allows for the immediate freeing of task memory if the task being deleted
is not currently running and not pinned to the other core. This commit also
fixes a bug in prvCheckTasksWaitingTermination which prevented the
Idle Task from cleaning up all tasks awaiting deletion. Each iteration of the Idle
Task should traverse the xTasksWaitingTermination list and clean up all tasks
not pinned to the other core. The previous implementation would cause
prvCheckTasksWaitingTermination to return when encountering a task
pinned to the other core whilst traversing the xTasksWaitingTermination list.

The test case for vTaskDelete() has been updated to test for the bugfix and
backported deletion behavior.
2017-12-05 18:13:56 +08:00
Angus Gratton 579201bcdc Merge branch 'bugfix/windows_mingw32_gcc' into 'master'
windows: Allow "make menuconfig" to work if ming32 gcc is also installed

See merge request !1587
2017-12-04 06:22:33 +08:00
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