Commit graph

672 commits

Author SHA1 Message Date
Xia Xiao Tian 8dc9e243ae wpa2 enterprise: add wpa2 enterprise API and crypto files 2016-11-11 10:38:57 +08:00
Ivan Grokhotkov fcba7e278d Merge branch 'bugfix/github_issues' into 'master'
Fixes for github issues

This MR contains a bunch of small fixes for issues raised on Github and esp32.com forum:

- vfs doesn't check error code returned by open syscall
- spi_flash doesn't work when built in release mode
- duplicate definition of O_NONBLOCK when combining LwIP socket.h with sys/fcntl.h
- wrong order of creation of standard streams
- `_times_r` returning incorrect values, causing `clock`to return double of the actual time
- driver/gpio.h: comment fix
- wifi event handlers: fix incorrect MAC address printed by logging statements
- move some functions out of IRAM when compiling for bootloader

Please check commit descriptions for links to issues/forum posts and more details.


See merge request !183
2016-11-09 10:12:25 +08:00
Angus Gratton 0dff62051f Merge branch 'bugfix/compile_with_no_timers' into 'master'
newlib: fix compilation error when no timers are enabled in menuconfig

I have checked that three options (RTC/RTC+FRC1/FRC1) work, but didn't check "None" option.
This adds some missing ifdef blocks to remove "unused function/variable" warnings and fixes the use of `__errno_r` in a non-reentrant function.

See merge request !174
2016-11-09 09:21:23 +08:00
Ivan Grokhotkov cc072f1d8a wpa_supplicant: clean up unused variable warning 2016-11-08 20:26:12 +08:00
Angus Gratton c5793521a0 build system: Fix bootloader-flash target
ESP32 forum thread: http://esp32.com/viewtopic.php?f=2&t=407&p=1902#p1902
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 81b18aa8d5 bootloader: move some functions out of IRAM when building in bootloader mode
Fixes https://github.com/espressif/esp-idf/issues/80
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 1e4f185d29 wifi: use MACSTR and MAC2STR in logging statements
Fixes https://github.com/espressif/esp-idf/issues/49
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov f142da3ced driver/gpio: fix interrupt type names in comment block
https://github.com/espressif/esp-idf/issues/56
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov d29935b9ce newlib: fix _times_r syscall implementation
tms_cstime should only take system time in child processes into account, so has to be zero.
https://github.com/espressif/esp-idf/issues/81
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 6dd3681115 fix order of creation of standard streams
With existing order, file descriptors assigned to stdin, stdout, stderr didn't match standard assignment.
https://github.com/espressif/esp-idf/issues/67
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 3f8d9d71e2 lwip: fix duplicate definition of O_NONBLOCK
LwIP will define O_NONBLOCK in sockets.h if it isn't defined yet.
If sys/fcntl.h is included after socket.h, there will be duplicate definition.
Work around by including sys/fcntl.h into lwipopts.h.

https://github.com/espressif/esp-idf/issues/75
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov aa0cd0ab47 spi_flash: add missing volatile qualifier for lock flags
http://esp32.com/viewtopic.php?f=14&t=419&p=1901
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 13b3c916f3 vfs: check error code returned by FS driver open function
Fixes https://github.com/espressif/esp-idf/issues/78
2016-11-08 20:17:08 +08:00
Wu Jian Gang cdebf24954 Merge branch 'feature/tw8193_add_wifi_api_detail_return_code' into 'master'
esp32/make: add detailed return error code for wifi APIs

1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API

See merge request !187
2016-11-08 19:48:11 +08:00
Liu Zhi Fu 8dee0a3f6d esp32: modify the code according to review comments
1. Adjust error code definition
2. Refractor the comments for esp_wifi_internal_tx
2016-11-08 19:25:03 +08:00
Ivan Grokhotkov 414e5ce1d5 Merge branch 'bugfix/rmt_mem_struct' into 'master'
Only fix rmt_mem_t struct definition error.

Modify the struct definition according to technical_reference_manual. 
Tested.

```
typedef volatile struct {
    struct {
        union {
            struct {
                uint32_t duration0:    15;
                uint32_t level0:       1;
                uint32_t duration1:    15;
                uint32_t level1:       1;
            };
            uint32_t val;
        } data[64];
    } chan[8];
} rmt_mem_t;
```

See merge request !186
2016-11-08 18:47:53 +08:00
Liu Zhi Fu cb5f7690a4 esp32/make: add detailed return error code for wifi APIs
1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API
2016-11-08 18:12:14 +08:00
Liu Zhi Fu 7340a77689 esp32: remove libcrypto according to review comments 2016-11-08 15:28:20 +08:00
Wangjialin 1418f886eb Only fix rmt_mem_t struct definition error. 2016-11-08 14:19:31 +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 8bdcf0c5f7 newlib: fix compilation error when no timers are enabled in menuconfig 2016-11-04 10:55:25 +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