Commit graph

386 commits

Author SHA1 Message Date
Angus Gratton 01e94998c4 Merge branch 'bugfix/mbedtls_sha384' into 'master'
Bugfix mbedtls sha384 clone()

mbedtls_sha512_clone() on a SHA-384 hash caused incorrect digest

Also adds additional mbedtls unit tests into the unit tests project (including one for this bug).

See merge request !252
2016-11-29 03:16:30 +08:00
Liu Zhi Fu 5b4361f60a esp32: update wifi lib to add tw8913 fix
dfe73737 - tw8913 wakeup first before scan
2016-11-28 20:11:43 +08:00
Liu Zhi Fu 9a3f9af2db esp32/lwip: some misc changes
1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5
2016-11-28 18:36:14 +08:00
Wu Jian Gang db1e86b3d9 Merge branch 'feature/modem_sleep' into 'master'
Feature/modem sleep



See merge request !251
2016-11-25 19:32:03 +08:00
Xia Xiaotian 55aa82f814 modem sleep: update wifi lib
1. add libwpa2.a
2016-11-25 19:06:52 +08:00
Wu Jian Gang 3f27c09728 Merge branch 'feature/wpa2_enterprise' into 'master'
Feature/wpa2 enterprise



See merge request !250
2016-11-25 18:46:29 +08:00
Xia Xiaotian 6e3b7f4ea2 wpa2 enterprise: change wpa2 enterprise APIs to esp_wifi_sta_wpa2_ent_XXX 2016-11-25 18:08:21 +08:00
Angus Gratton 88b264cfce mbedTLS SHA: Fix cloning of SHA-384 digests
Hardware unit only reads 384 bits of state for SHA-384 LOAD,
which is enough for final digest but not enough if you plan to
resume digest in software.
2016-11-25 19:26:30 +11:00
Xia Xiaotian 16f2b119eb Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/esp32/lib
2016-11-25 15:54:00 +08:00
Xia Xiaotian 1818af1c3e wpa2 enterprise: update wifi lib and add wpa2_printf 2016-11-25 13:26:30 +08:00
Xia Xiaotian 0dbc11e37d wpa2 enterprise: update wpa2 enterprise API comments 2016-11-25 11:03:33 +08:00
Wang Jia Lin 58d902eb78 Merge branch 'driver_merge_tmp/merge_timer' into 'master'
driver: timer

1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c

See merge request !237
2016-11-25 10:52:40 +08:00
Angus Gratton d0801fdbab Merge branch 'feature/sha_tls_integration' into 'master'
SHA acceleration integrated to mbedTLS incl. TLS sessions

Uses hardware SHA acceleration where available, fails over to software where not available.

Ref TW7112

See merge request !232
2016-11-25 10:12:29 +08:00
Angus Gratton 9f9d92b2df Merge branch 'bugfix/spi_flash_region' into 'master'
spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks

SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.

See merge request !249
2016-11-25 10:11:51 +08:00
Wangjialin a5ad8090cf Merge branch 'master' into driver_merge_tmp/merge_timer
# Conflicts:
#	docs/index.rst
2016-11-25 01:07:19 +08:00
Wang Jia Lin 35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Liu Zhi Fu 340b14f0b7 esp32: update wifi lib to contain bt/wifi coexist code 2016-11-24 21:37:46 +08:00
Xia Xiaotian 1cdd082a9e wpa2 enterprise: update wifi lib in master branch 2016-11-24 20:41:44 +08:00
Xia Xiaotian 4ea18083f7 wpa2 enterprise: add wifi lib 2016-11-24 19:46:37 +08:00
Xia Xiaotian b649b48eae Merge branch 'master' into feature/wpa2_enterprise
add lib
2016-11-24 19:35:30 +08:00
Ivan Grokhotkov c17ee8a914 Merge branch 'bugfix/unit_test_run' into 'master' 2016-11-24 18:29:32 +08:00
Ivan Grokhotkov 1bcd90d45d Merge branch 'feature/system_apis' into 'master'
system_* APIs cleanup

This changeset is mostly about cleaning up `system_*` APIs and moving them from libcore. It has dragged a few more changes along, however.

- `system_deep_sleep` deprecated, new name is `esp_deep_sleep`
- `system_efuse_read_mac` deprecated, new name is `esp_efuse_read_mac`
- `system_read/write_rtc_mem` removed (reason: we use linker to place code/data into RTC memory now)
- `system_get_sdk_version` deprecated. Returns "master" for now. Support for compile-time and runtime version detection will be done in a separate MR.
- `system_get_time` and variations have been deprecated. `gettimeofday` should be used instead.
- `system_restart` deprecated, new name is `esp_restart`. Rewritten code to work correctly from any of the cores.
- `system_restore` deprecated, `esp_wifi_restore` should be used instead.
- `system_get_rst_info` removed (it wasn't in a header file)
- RTC library has been updated to latest version
- Logging output from `libfoo.a` goes through `foo_printf` function now, where `foo ` is any of the library names. For libraries other than rtc and phy, this is a temporary measure, until we finish switching to esp_log library and clean up all uses of printf/ets_printf.
- ESP-IDF build will fail if any of the libraries have printf/ets_printf reference.
-  Added `esp_random` function which gets values from HW RNG. I have added code which makes sure the value is not polled too often (allows at least 16 APB cycles). Also added a header file for HW RNG (just one register).
- Moved random number generation functions used by wpa library into wpa_supplicant component.

See merge request !234
2016-11-24 18:22:50 +08:00
Xia Xiaotian 422e95db9c system_apis: update wifi lib and librtc.a
1. some refractor to debug info in wifi lib(da6280b3)

2. fix bug of hung at phy_int in librtc.a(1bb9ce1d)
2016-11-24 17:55:37 +08:00
Angus Gratton be53a6950c spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks
SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.
2016-11-24 18:05:06 +11:00
Wangjialin f97f198c9d driver: improve pulse counter code
1. Modify some comments in pcnt.h
2. Modify api/pcnt.rst
3. Improve example code.
4. Add status definitions in pcnt_reg.h
2016-11-24 12:01:21 +08:00
Wangjialin 6db1482cd5 Merge branch 'master' into driver_merge_tmp/merge_pcnt
# Conflicts:
#	components/driver/include/driver/periph_ctrl.h
2016-11-23 18:15:54 +08:00
Wangjialin c533099e08 driver: timer
1. minor modifications
2. use TIMG_WDT_INT_ENA_M instead of BIT(2) in wdt.c
3. add doc/api/timer.rst
2016-11-23 17:23:21 +08:00
Xia Xiaotian f7aeef7111 Merge branch 'master' into feature/wpa2_enterprise 2016-11-23 16:34:01 +08:00
antti ca76f53283 remove fp unit test Kconfig 2016-11-23 16:22:34 +08:00
Xia Xiaotian f7fb8b264f wpa2 enterprise: update wpa2 enterprise APIs 2016-11-23 15:29:01 +08:00
Ivan Grokhotkov 50f178c1ce esp32: add some implementation comments 2016-11-23 12:55:49 +08:00
Ivan Grokhotkov 137c027274 Merge branch 'feature/integrate_unit_tests' into 'master'
Integrate unit tests into build system

This MR moves unit tests from esp-idf-tests repository into 'test' subdirectories of respective components.

Tests are run using a runner app in tools/unit-test-app.

This needs a bit of cleanup:

1. remove extra newlines added to makefiles,
2. re-format unit tests code which has tabs
3. write a document on using this test app
4. maybe some refactoring in project.mk

I think 1&2&4 need to be done in this MR, while 3 may be done in a follow-up one.

See merge request !221
2016-11-23 12:13:39 +08:00
Wangjialin a3c4a70ba3 driver: add hardware timer code.
1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c
2016-11-23 02:15:27 +08:00
Ivan Grokhotkov df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
Ivan Grokhotkov cf6fc7c741 Add API for random number generator 2016-11-22 21:14:37 +08:00
Ivan Grokhotkov 46a39b1e0f catch log output from WiFi libs 2016-11-22 21:14:36 +08:00
Ivan Grokhotkov 8b2f933a51 Implement system_* APIs in IDF 2016-11-22 21:14:36 +08:00
Ivan Grokhotkov 2393d829de remove legacy definitions from esp_types.h 2016-11-22 21:14:36 +08:00
Angus Gratton dfcb241850 mbedTLS SHA Acceleration: Add missing esp_sha_lock_engine() function 2016-11-22 20:57:01 +11:00
Angus Gratton 2561b68af8 hwcrypto: Fixes for disabling one hardware unit causing reset of a different unit
ROM functions reset related units, but this can have problems in a
multithreaded environment.
2016-11-22 20:42:38 +11:00
Angus Gratton c48612e516 mbedTLS SHA acceleration: Allow concurrent digest calculation, works with TLS
SHA hardware allows each of SHA1, SHA256, SHA384&SHA512 to calculate digests
concurrently.

Currently incompatible with AES acceleration due to a hardware reset problem.

Ref TW7111.
2016-11-22 20:42:38 +11: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
Liu Zhi Fu 4bf0465dab esp32: fix random pkt cause esp32 watchdog
This change fixes the ESP32 watchdog issue. When the MPDU of AMPDU is longer than 1600B,
esp32 will check whether the last 4B is DEADBEEF, if it's not DEADBEEF, it will assert
and the assert will cause esp32 watchdog. The solution is to init the last 4B to DEADBEEF
when malloc new ebuf for the packet longer than 1600B.
2016-11-22 11:46:10 +08:00
Wangjialin 6a1dbc3f1c add RMT driver and example 2016-11-22 00:57:19 +08:00
Wu Jian Gang 07fc868ea6 Merge branch 'feature/ipv6_api' into 'master'
Ipv6 interface:add branch for ipv6 interface



See merge request !199
2016-11-21 19:43:51 +08:00
Wangjialin 1cc1d9d721 driver: Add PCNT code
1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.
2016-11-21 18:17:07 +08:00
Xia Xiaotian 1ca82de638 Merge branch 'master' into feature/wpa2_enterprise
Conflicts:
	components/esp32/component.mk
	components/wpa_supplicant/component.mk
2016-11-21 18:09:13 +08:00
Angus Gratton 7681dbec93 Merge branch 'feature/bignum_rsa' into 'master'
hwcryto bignum support for RSA operations

Supporting RSA with hardware bignum directives.

Configurable via menuconfig to enable/disable, and to choose between busywaiting and interrupt driven completion.

May still be some performance tweaks possible.

TW7111

See merge request !92
2016-11-21 17:46:21 +08:00
Xia Xiao Tian 39e924b664 Merge branch 'master' into feature/modem_sleep 2016-11-21 16:54:11 +08:00
Xia Xiao Tian a485af0e2d wpa2: change "station to sta" in wpa2 API 2016-11-21 14:17:52 +08:00