Commit graph

653 commits

Author SHA1 Message Date
Liu Zhi Fu 7340a77689 esp32: remove libcrypto according to review comments 2016-11-08 15:28:20 +08:00
Liu Zhi Fu 178db4bdd9 esp32: merge bt/wifi coexist code
1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib
2016-11-08 13:30:35 +08:00
Ivan Grokhotkov 0762b050dd Merge branch 'feature/integrate_unit_test_to_ci' into 'master'
integrate unit test to CI



See merge request !167
2016-11-07 21:17:08 +08:00
Ivan Grokhotkov 314cbcdb67 Merge branch 'feature/wpa_supplicant_libcrypto_source' into 'master'
wpa_supplicant: replace pre-built crypto library with source code

This change replaces libcrypto.a pre-built library with source code from wpa_supplicant.
For now i've decided to keep the modified layout of source and header files which is used in the esp32_rtos_sdk_core project. This will make it easier to move other parts of wpa_supplicant from esp32_rtos_sdk_core into esp-idf. Once we move everything, we can rearrange the files and upgrade wpa_supplicant to latest version.

See merge request !177
2016-11-07 21:15:49 +08:00
Ivan Grokhotkov 8089afd453 build fix 2016-11-04 15:52:45 +08:00
Ivan Grokhotkov 2d88fc0329 wpa_supplicant: replace pre-built crypto library with source code 2016-11-04 14:58:47 +08:00
Ivan Grokhotkov 2fa00ebd90 ld scripts: fix overlap between bootloader and application IRAM ranges 2016-11-04 12:18:57 +08:00
Ivan Grokhotkov abecab7525 Merge branch 'feature/time_syscalls' into 'master'
implement time syscalls

This change adds optional support for libc time functions.
New menuconfig option allows selecting FRC1,  RTC, both, or none to be used for timekeeping.

- If only FRC1 timer is used, gettimeofday will provide time at
		  microsecond resolution. Time will not be preserved when going
		  into deep sleep mode.
- If both FRC1 and RTC timers are used, timekeeping will
		  continue in deep sleep. Time will be reported at 1 microsecond
		  resolution.
- If only RTC timer is used, timekeeping will continue in
		  deep sleep, but time will be measured at 6.(6) microsecond
		  resolution. Also the gettimeofday function itself may take 
		  longer to run.
- If no timers are used, gettimeofday function will return -1 and
		  set errno to ENOSYS. 

`times` function returns time derived from FreeRTOS ticks. It reports all as 'system' time, 'user' time is reported as zero.

`settimeofday` function may be used to set current time.

LwIP SNTP module is hooked up into the system through `settimeofday`/`gettimeofday`.

Example demonstrating this functionality is also added.

ref. TW6415

See merge request !168
2016-11-03 18:02:58 +08:00
Ivan Grokhotkov bc4f1c90a7 conver tabs to spaces in frc_timer_reg.h 2016-11-03 17:44:23 +08:00
Ivan Grokhotkov 299655e3be esp32: add choice for RTC clock source
For now only one option is supported: internal RC oscillator
2016-11-03 17:37:15 +08:00
Ivan Grokhotkov eb2c633cbf newlib: implement settimeofday, integrate LwIP SNTP, add SNTP example 2016-11-03 12:46:46 +08:00
He Yin Ling 47910466ce Set result "Succeed" for passed cases 2016-11-02 20:54:22 +08:00
He Yin Ling e56b745527 incorrect "/", should be "\" 2016-11-02 20:21:46 +08:00
He Yin Ling c12aeb1127 add case select by name mark " before case name 2016-11-02 20:12:43 +08:00
Yinling 2e319705ec forget to break when test succeed 2016-11-02 19:41:33 +08:00
Yinling fdff6b2b01 run unit test case by case name 2016-11-02 19:08:55 +08:00
Ivan Grokhotkov c534dedf2d newlib: implement time syscalls 2016-11-02 17:31:35 +08:00
Dong Heng 0aadc58b87 Merge branch 'master' into feature/openssl 2016-11-02 15:46:52 +08:00
Jeroen Domburg 3af7872839 Merge branch 'bugfix/small_fixes' into 'master'
OpenOCD doc fix, fix gdbstub

- Fixes a few typos in the OpenOCD docs
- Fix compiling with gdbstub as panic handler

See merge request !165
2016-11-02 10:27:26 +08:00
Wangjialin e1f0c98ef5 Modify gpio.h and ledc.h 2016-11-01 22:35:42 +08:00
Ivan Grokhotkov f18c1f13b1 Merge branch 'feature/deepsleep_stub_linker' into 'master'
Deep sleep: Any source named rtc_wake_stub* is linked as RTC wake stub code

Also move esp_deepsleep.h documentation out to docs/deep-sleep-stub.rst

See merge request !142
2016-11-01 22:27:13 +08:00
Ivan Grokhotkov b8e940d645 Merge branch 'bugfix/nvs_write_failure' into 'master'
Fix spi_flash_write regression and nvs error recovery

In the previous set of changes related to spi_flash, new alignment checks were added. One of these checks, word alignment of `src` buffer in `nvs_flas_write`, was unnecessary.  ROM `SPIWrite` function can handle unaligned source buffers.

This change caused an error to be returned to nvs for some legitimate write operations. Due to a bug in nvs, further write operations were possible, while the internal state of `Page` instance was broken. In WiFi functional tests, this inflicted havoc on the nvs partition, creating multiple duplicate items in the affected page. Because multiple duplicate items per page were never supposed to be handled during page load, duplicates were not removed. Thankfully this caused an assert at a later point in the loading process, otherwise this bug would be very difficult to detect.

This change set fixes the original spi_flash regression, handling of `INVALID` state of `nvs::Page`, and handling of duplicate items.

See merge request !161
2016-11-01 22:26:37 +08:00
Ivan Grokhotkov fe64ea95b4 Merge branch 'feature/tw8155_optimize_tx_flow_control' into 'master'
Feature/tw8155 optimize tx flow control

1. Remove TX flow control in LWIP
2. Make the return value of esp_wifi_internal_tx consistent with LWIP error code

See merge request !164
2016-11-01 22:26:15 +08:00
Yinling 5784586041 integrate unit test to CI 2016-11-01 19:30:42 +08:00
Jeroen Domburg 8c1d1e19c2 OpenOCD doc fix, fix gdbstub 2016-11-01 15:41:10 +08:00
Liu Zhi Fu edf5b10344 esp32: update wifi lib
146f5962 - Make the return value of esp_wifi_internal_tx consistent with LWIP error code so that
the up-layer can detect the out-of-memory error and take action accordingly, such do flow control.
2016-11-01 15:34:30 +08:00
Liu Zhi Fu f0cd38a079 lwip: remove tx flow control code 2016-11-01 15:25:46 +08:00
Dong Heng 12e78e9590 components/openssl: add more debug stream output function 2016-11-01 15:16:14 +08:00
Dong Heng bc710e5b88 components/openssl: refacetor the SSL debug function
Add the "ssl_opt.h" file to make user able t add its platform interface
2016-11-01 14:59:50 +08:00
Dong Heng 8d1f360ca6 components/openssl: ssl port use esp32_idf default 2016-11-01 13:10:56 +08:00
Dong Heng 16a4d56fe5 components/openssl: remove some platform interface 2016-11-01 13:09:54 +08:00
Dong Heng fc6b52574a components/openssl: refactor the SSL port function and debug function 2016-11-01 13:07:10 +08:00
Krzysztof 12efd96fb4 Corrected documentation style
This is for better visuaization with Sphinx
2016-11-01 01:21:18 +08:00
Krzysztof 079f5faad8 Fixed confused Sphinx
Sphinx failed to phrase esp_log_timestamp
reorderdering esp_log_write and esp_log_timestamp fixed this issue
2016-11-01 01:21:18 +08:00
Krzysztof f6118c67b0 Fixed desription of logging library 2016-11-01 01:21:18 +08:00
Krzysztof 2d56953ee4 docu makup update 2016-11-01 01:21:18 +08:00
Krzysztof fa002b4909 Fixed headers to match python doc standard 2016-11-01 01:20:04 +08:00
Krzysztof 1263cd340e Add missing annotations 2016-11-01 01:20:04 +08:00
Krzysztof f05cd619f4 Sample cleaning of markup 2016-11-01 01:20:04 +08:00
Liu Zhi Fu 92b663d9f2 lwip: optimize tx flow control
1. Remove tx flow control for TCP
2. Remove tx flow control for UDP temporary
3. Return the error code when call esp_wifi_internal_tx()
2016-10-31 21:26:33 +08:00
Ivan Grokhotkov abea6c50f1 nvs_flash: delete all duplicate entries in a page while loading
Due to previous flash write bug it was possible to create multiple duplicate entries in a single page.
Recovery logic detected that case and bailed out with an assert.
This change adds graceful recovery from this condition.
Tests included.
2016-10-31 21:10:47 +08:00
Wu Jian Gang c7f8d206ed Merge branch 'bugfix/tw8242_fix_tcp_rx_abnormal_issue' into 'master'
lwip: fix tcp rx abnormal issue(tw8242)

In tcp_alloc(), initialize per_soc_tcp_wnd before initializing recv_wnd because recv_wnd depends on per_soc_tcp_wnd. 

See merge request !160
2016-10-31 20:28:11 +08:00
Ivan Grokhotkov d9cdc7de58 nvs_flash: don't allow more operation to be done on page in PageState::INVALID
Currently a restart is required to recover a page from invalid state.
The long-term solution is to detect such a condition and recover automatically (without a restart). This will be implemented in a separate change set.
2016-10-31 19:48:28 +08:00
Liu Zhi Fu 2b722ea468 turn on per socket tcp window by default 2016-10-31 19:43:18 +08:00
Liu Zhi Fu 19f61332a9 make build pass when disable per soc tcp window 2016-10-31 19:38:47 +08:00
Ivan Grokhotkov 413f2c00f6 nvs_flash: introduce write failures after each word written
Previously the test bench would check failure recovery by introducing error after each write operation.
This makes checks a bit more extensive (and much longer) by failing after every word written. Surprisingly, this change didn't expose any bugs.
2016-10-31 19:17:25 +08:00
Ivan Grokhotkov 269332f473 nvs_flash: use CRC-32 routine compatible with ROM version
Host tests used different flavour of CRC-32, which made it impossible to load NVS partition dumps created on the chip
2016-10-31 19:11:40 +08:00
Ivan Grokhotkov 2119b98469 spi_flash: remove unnecessary src pointer alignment check in spi_flash_write
ROM SPIWrite routine can work with unaligned sources, so this check is unnecessary.
Furthermore, it breaks nvs_set_str and nvs_get_blob when data pointer is unaligned.
Also fix stray backslash in COUNTER_STOP macro
2016-10-31 19:08:56 +08:00
Wu Jian Gang d7b4197ade Merge branch 'feature/tw8221_softap_supports_max_10_stations' into 'master'
esp32/tcpip_adapter: softap supports max 10 stations

The max number of stations softap supports is modified from 8 to 10

See merge request !158
2016-10-31 18:09:03 +08:00
Liu Zhi Fu a5552b1e21 lwip: fix tcp rx abnormal issue(tw8242)
In tcp_alloc(), initialize per_soc_tcp_wnd before initializing recv_wnd because recv_wnd depends on per_soc_tcp_wnd.
2016-10-31 17:50:09 +08:00