Commit graph

1020 commits

Author SHA1 Message Date
Liu Zhi Fu 659ec8facb esp32: add phy_printf
1. add phy_printf into libcore
2. update libphy.a which has important optimization for ht40 traffic
2016-11-18 21:11:54 +08:00
Xia Xiao Tian 4dcf3709b0 Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/nvs_flash/src/nvs_api.cpp
2016-11-18 20:53:59 +08:00
Ivan Grokhotkov 0b265dc2a7 nvs, spi_flash: handle case when source data is in DROM 2016-11-18 20:11:17 +08:00
Ivan Grokhotkov 541b142654 phy_init: reduce the amount of hardwired logic, add coexist init 2016-11-18 20:11:17 +08:00
Angus Gratton 6d4ab76db2 phy init data: Read PHY init data partition offset from menuconfig 2016-11-18 20:11:16 +08:00
Ivan Grokhotkov 4db29f74a0 add PHY init support 2016-11-18 20:11:16 +08:00
Ivan Grokhotkov a0feea8daa partition_table: update layouts, remove unused subtypes, sync with header file 2016-11-18 20:11:16 +08:00
Ivan Grokhotkov 6e97936bac nvs: allow nvs_flash_init to be called more than once
Also don’t assert in nvs_* functions if nvs_flash_init wasn’t called,
and make nvs_flash_init_custom an internal API for unit tests.
2016-11-18 20:11:16 +08:00
Ivan Grokhotkov 51021b06f8 nvs: initialize using layout from partition table 2016-11-18 20:11:16 +08:00
Yulong 3edcd29a83 compoent bt:debug the btc_gap_ble module, fix the adv len not long fix 2016-11-18 05:00:47 -05:00
Yulong 2f7288ff03 component bt:debug the scan result and add the resove adv data method to the gapapi 2016-11-18 03:43:51 -05:00
Wu Jian Gang 8ab4e11840 Merge branch 'feature/openssl' into 'master'
OpenSSL API examples

add openssl demo

See merge request !198
2016-11-18 15:50:50 +08:00
Angus Gratton 1cc0b3000b mbedtls hardware bignum: Expose ESP-only bignum API in wrapper mbedtls/bignum.h 2016-11-18 17:08:14 +11:00
Angus Gratton 36f29017b6 mbedtls hardware bignum: Support "RSA" interrupt for end of operation
Allows CPU to do other things which bignum operation is in
progress.
2016-11-18 15:53:00 +11:00
Angus Gratton 68d370542a mbedtls hardware RSA: Put into menuconfig, squash warnings
All combinations of enabling/disabling hardware acceleration no longer
show unused warnings.
2016-11-18 15:50:45 +11:00
Angus Gratton f87be70d51 mbedtls hardware RSA: Combine methods for calculating M' & r inverse
Remove redundant gcd calculation, use consistent terminology.
Also remove leftover debugging code
2016-11-18 14:10:20 +11:00
Dong Heng 6b687b43f4 mbedtls hardware RSA: Fix "mbedtls_mpi_exp_mod" hardware calculations 2016-11-18 14:09:59 +11:00
Tian Hao 37365cef95 component/bt : gatt server
1.add gatt server demo for user
2. some function didn't be tested
2016-11-18 00:30:35 +08:00
Yulong 645717b147 Merge remote-tracking branch 'origin/feature/btdm_arch' into feature/btdm_arch_debug1 2016-11-17 08:08:19 -05:00
Jeroen Domburg f3a44aa4db Merge with master; merge Doxygen config 2016-11-17 20:21:12 +08:00
Yulong 7548b8c622 component bt: Added the client demo to the bt project 2016-11-17 06:37:56 -05:00
Ivan Grokhotkov 3bbe41c34d Merge branch 'feature/docs_general_notes' into 'master'
Docs: new documentation and warnings cleanup

This change set

- adds a high-level description of application startup flow. Some parts are missing, but hopefully we can use this description as a base to expand on.
- adds a few notes about memory regions and their use in ESP-IDF.
- add SPI flash and partition APIs page
- fixes all Doxygen warnings in header files
- enables build failures on new Doxygen warnings

See merge request !201
2016-11-17 19:00:03 +08:00
Xia Xiao Tian e332407785 modem sleep: delete wifi modem sleep callback in idle task. 2016-11-17 18:08:35 +08:00
Jeroen Domburg d73448f57f Make sure task wdt also does the right thing when triggered when flash is disabled 2016-11-17 18:05:47 +08:00
Angus Gratton acafa9aaa8 Merge branch 'bugfix/secure_boot_fixes' into 'master'
Secure boot related fixes

Fix some issues (mostly build system) from the secure boot implementation

Also refactor the way submodule checks are applied to make them more reliable.

See merge request !207
2016-11-17 17:42:03 +08:00
Wu Jian Gang 6472f193ab Merge branch 'bugfix/tw8706_softap_join_ap_return_wrong' into 'master'
esp32: tw8706 softap join ap return wrong code

In softap/null mode, esp_wifi_connect will return ESP_ERR_WIFI_MODE

See merge request !216
2016-11-17 12:46:48 +08:00
Jeroen Domburg d116adf260 Add documentation 2016-11-17 12:09:08 +08:00
Liu Zhi Fu d19d7107d3 esp32: tw8706 softap join ap return wrong code
In softap/null mode, esp_wifi_connect will return ESP_ERR_WIFI_MODE
2016-11-17 11:56:22 +08:00
Wu Jian Gang 3366c98d39 Merge branch 'bugfix/tw8746_restore_cause_load_fail' into 'master'
nvs_flash: adjust the nvs_flash start sector number

Modify the nvs flash start sector from 6 to 9 because the partition table bin burn address is modified from 0x4000 to 0x8000

See merge request !215
2016-11-17 11:53:41 +08:00
Wu Jian Gang b0f3b730aa Merge branch 'feature/tw8743_menuconfig_add_L2toL3_copy_option' into 'master'
lwip: add option to memcopy packet from L2 to L3

Menuconfig add an option to copy the packet from layer2 (WIFI driver) to layer3 (LWIP), default not copy

See merge request !211
2016-11-17 11:52:39 +08:00
Liu Zhi Fu 936b02216b docs/nvs_flash: update the nvs flash offset comment according review 2016-11-17 11:44:39 +08:00
Tian Hao a35e2d42f0 Merge remote-tracking branch 'remotes/origin/feature/btdm_arch_debug1' into feature/btdm_arch
1. merge to fix gap modify
2016-11-17 11:28:10 +08:00
Liu Zhi Fu f12be7ebd8 nvs_flash: adjust the nvs_flash start sector number
Modify the nvs flash start sector from 6 to 9
2016-11-17 11:22:20 +08:00
Liu Zhi Fu 5e428f21b6 lwip: default ESP_L2_TO_L3_COPY to 0 2016-11-17 10:53:00 +08:00
Liu Zhi Fu ceea97495f lwip:refractor to the description about this menuconfig option 2016-11-17 10:22:20 +08:00
Angus Gratton 84635a160e micro-ecc: Add submodule dependency
Closes github #100
2016-11-17 09:18:51 +11:00
Angus Gratton 24b4c17ead build system: Refactor SubmoduleCheck to work project-wide
Required at project level because some components use header files in
other components' submodules, and one component with a
submodule (esptool.py) doesn't have or need a component.mk.
2016-11-17 09:18:51 +11:00
Angus Gratton 637f6fb27e Merge branch 'master' into bugfix/example_warning_cleanup 2016-11-17 08:59:44 +11:00
Ivan Grokhotkov 13d4734399 docs: fix Doxygen warnings, fail CI build on Doxygen warnings 2016-11-16 22:44:22 +08:00
Tian Hao 94f26af17d component/bt : fix component.mk
delete coexist in lib, because the lib is in esp32/lib
2016-11-16 22:15:00 +08:00
Tian Hao aafaebefb4 component/bt : move blufi to new architecture btc task
1. move blufi to new architecture
2. delete some log trace
2016-11-16 22:11:59 +08:00
Liu Zhi Fu 0b2cea6e9f lwip: modify menuconfig comments according to review 2016-11-16 21:11:17 +08:00
Yulong a63383dd19 component bt:change the scan rsp callback & scan param setup 2016-11-16 06:50:44 -05:00
Jeroen Domburg a023b005c6 taskwdt fixes: better handling of empty/emptying wdt task list, lock task struct while feeding 2016-11-16 17:53:50 +08:00
Wangjialin 19d96d5b26 Merge branch 'master' into bugfix/uart_isr_switch_context 2016-11-16 17:11:18 +08:00
Tian Hao 9691fe9dae component/bt : init api
1. use future to redefine init api
2016-11-16 16:26:02 +08:00
Liu Zhi Fu 69dbc36a1c lwip: add option to memcopy packet from L2 to L3
Menuconfig add an option to copy the packet from layer2 (WIFI driver) to layer3 (LWIP), default not copy
2016-11-16 16:24:41 +08:00
Angus Gratton 8b7d1cdc27 ringbuf: Fix case where xTaskGetTickCount() overflows but task timeout point doesn't 2016-11-16 17:56:49 +11:00
Wangjialin 13b81debb3 Merge branch 'master' into bugfix/uart_isr_switch_context 2016-11-16 14:51:36 +08:00
Wangjialin 37cbb0bdea driver: bugfix/fix uart parity and frame error bug
1. modify definition for uart_parity_t
2. fix bugs in uart interrupt handler for parity err and frame err.
2016-11-16 14:44:06 +08:00
Liu Zhi Fu 7dbf01b210 esp32: softap supports bridge
Softap supports bridge, then the stations associated with esp32 softap can send/receive traffic from each other
2016-11-16 13:20:49 +08:00
Angus Gratton 60f29236f6 Build system: Raise warning level
Default esp-idf builds now show -Wextra warnings (except for a few:
signed/unsigned comparison, unused parameters, old-style C declarations.)

CI building of examples runs with that level raised to -Werror, to catch
those changes going into the main repo.
2016-11-16 15:57:34 +11:00
Tian Hao 8fed003ce5 component/bt : main api
1. use blufi check main api ok
2016-11-16 11:28:41 +08:00
Tian Hao 21d2b78105 component/bt : mv some define to btc
1. Actually,  btc & api are the same module thing. So the type defined in api header file can be included by btc c/h files.
    Besides, why btc & api should be separated, because that user may be aware of api and api refer defines/types, rather than other non-refer things.
    All defines/types that user won't use should be put in btc directory (and define with prefix "btc_"), and which will be used by user should be defined with prefix "esp_" .
2. rename attribute value(all is value, not data)
2016-11-16 02:10:37 +08:00
Wangjialin d7599ab16d driver: fix header file warnings for Doxygen. 2016-11-16 01:31:02 +08:00
Tian Hao 229df65cfc component/bt : cleanup id/uuid define
1. which named uuid is esp_bt_uuid_t type
2. which named id is xxx_id_t type, such as service_id_t char_id_t, include inst & uuid
3. share include directory
2016-11-16 00:34:48 +08:00
Tian Hao 521ef3f579 component/bt : new architectecture
1st compile ok
2016-11-15 20:56:15 +08:00
Dong Heng cf8c9770a0 Merge branch 'master' into feature/bignum_rsa 2016-11-15 16:39:29 +08:00
Dong Heng 4d25986aaa Merge branch 'master' into feature/openssl 2016-11-15 15:20:48 +08:00
Dong Heng dfaac25a37 feature/openssl: add openssl server demo and remove some check function 2016-11-15 15:04:21 +08:00
Wangjialin a8a51a2786 bugfix/uart_isr_switch_context: add switching context in uart ISR.
1. add switching context in uart ISR
2. remove duplicated #include in uart.c
3. modify example in uart.h(will later add examples to idf/examples)
2016-11-15 13:47:51 +08:00
Jeroen Domburg 0e69a2c446 Merge remote-tracking branch 'origin/master' into feature/better_idle_tick_hook_mechanism 2016-11-15 12:36:15 +08:00
Ivan Grokhotkov 1b25795f5d Merge branch 'feature/change_default_hostname' into 'master'
tcpip_adapter: add set hostname interface

Add the function for change the network interface's hostname

See merge request !170
2016-11-15 12:28:39 +08:00
Jeroen Domburg 9a2887c458 Add comments/headers according to merge request comments 2016-11-15 12:10:02 +08:00
Jeroen Domburg aa81f047f8 Merge remote-tracking branch 'origin/master' into bugfix/workaround_gpio_pullupdown_bug 2016-11-15 11:57:01 +08:00
Xia Xiao Tian 3bf5fb8ae7 Merge branch 'master' into feature/modem_sleep 2016-11-15 11:47:51 +08:00
liuhan fa1d5bfbc7 tcpip_adapter: add set hostname interface 2016-11-15 11:46:52 +08:00
Xia Xiao Tian adb4be859c wps: update wifi lib -- add wps lib 2016-11-15 11:19:15 +08:00
Jeroen Domburg 64a2f0ee0b Amend gpio driver to work around SoC bug with some pullups/pulldowns in the GPIO peripheral; mark existing function that does not always work as deprecated 2016-11-15 10:29:52 +08:00
Xia Xiao Tian c694c5134f modem sleep: add wifi power save callback to idle task 2016-11-15 10:28:36 +08:00
Xia Xiao Tian c625f0e906 Merge branch 'master' into feature/wps 2016-11-14 15:24:12 +08:00
Xia Xiao Tian 9a7db9ca85 add comments for system_event_sta_wps_er_pin_t 2016-11-14 14:34:09 +08:00
Angus Gratton c15024e629 Merge branch 'master' into feature/build_component_project_vars 2016-11-14 14:54:41 +11:00
Angus Gratton ea4005e673 Merge branch 'feature/esptool_secure_boot' into 'master'
Secure boot support

Also includes a lot of esptool.py changes (two new command line tools, espefuse.py and espsecure.py)
https://github.com/themadinventor/esptool/compare/feature/esp32_v20_refactor...feature/esp32_secure_boot?expand=1


See merge request !163
2016-11-14 11:32:04 +08:00
Angus Gratton 09c7ccfa2c bootloader: Fix unused variable errors when secure boot is disabled 2016-11-14 14:22:37 +11:00
Angus Gratton 0b4fe9dd6d secure boot: Add warnings this feature is not finished yet 2016-11-14 14:22:36 +11:00
Jeroen Domburg 045a53a7e5 Fix wdt idle hook 2016-11-14 10:20:49 +08:00
Dong Heng 734c1dd954 components/openssl: sync the code form esp8266 sdk 2016-11-14 09:40:12 +08:00
Angus Gratton 8691b54758 secure boot: Rename efuse option for UART bootloader to option for ROM interpreter 2016-11-14 11:08:42 +11:00
Angus Gratton bcdebda8e4 Build system: Don't shell-quote SEPARATOR variable or it evaluates as a bunch of wildcards! 2016-11-14 11:08:42 +11:00
Angus Gratton 5a5e19cd8b Bump esptool revision (espefuse.py fixes) 2016-11-14 11:08:42 +11:00
Angus Gratton e459f803da secure boot: Functional partition table & app signature verification 2016-11-14 11:08:42 +11:00
Angus Gratton fe66dd85f0 secure boot: Enable based on sdkconfig, remove "secure boot flag" from binary image 2016-11-14 11:08:42 +11:00
Angus Gratton ff1b2c6039 partition_table: Pad generated table to 0xC00 length, for easier signing 2016-11-14 11:08:42 +11:00
Angus Gratton 7402a1b973 partition_table: Move from 0x4000 to 0x8000
Also fix a bug with correctly padding bootloader image when length is
already a multiple of 16.
2016-11-14 11:08:42 +11:00
Angus Gratton 64f3893cb9 secure boot: Derive secure bootloader key from private key
Means only one key needs to be managed.
2016-11-14 11:08:42 +11:00
Angus Gratton b5de581399 Secure boot: initial image signature support 2016-11-14 11:08:42 +11:00
Jeroen Domburg 57009aaa7f Add a more scalable mechanism for the FreeRTOS tick- and idle hooks; idle handler now uses WAITI to reduce power 2016-11-11 19:20:54 +08:00
Jeroen Domburg f5cebd2666 Merge branch 'feature/per_cpu_interrupt_handlers' into 'master'
Per-CPU interrupt handlers and args

Up to now, the interrupt handlers and args were shared between CPUs, that is, if you set an interrupt handler on CPU0, CPU1 would invoke the same interrupt handler on that interrupt. This code gives every CPU its own space for interrupt handlers.

See merge request !192
2016-11-11 14:50:29 +08:00
Jeroen Domburg fdf3db1959 Comment fix 2016-11-11 12:26:42 +08:00
Xia Xiao Tian 7b77daaea4 wps: add blocking param for API esp_wifi_wps_start() 2016-11-11 10:51:33 +08:00
Xia Xiao Tian 8dc9e243ae wpa2 enterprise: add wpa2 enterprise API and crypto files 2016-11-11 10:38:57 +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
Liu Zhi Fu 2f6d71ff8c esp32: merge amsdu
esp32 now can support AMSDU
2016-11-10 21:12:22 +08:00
Jeroen Domburg eb067ce908 Merge branch 'driver_merge_tmp/merge_uart' into 'master'
Add UART driver

1. add uart.h and uart.c
2. add ESP_ERR_TIMEOUT in esp_err.h
3. add UART AHB FIFO address in uart_reg.h
4. modify xRingbufferSendFromISR return value in ringbuffer.c
5. add #include "soc/gpio_sig_map.h" in gpio.h

See merge request !146
2016-11-10 18:11:21 +08:00
Jeroen Domburg 07c30f22b5 Add core info to xt interrupt api 2016-11-10 18:04:23 +08:00
Jeroen Domburg 86d8f63005 Per-CPU interrupt handlers and args 2016-11-10 17:59:46 +08:00
Wangjialin 4f4c9030fd Fix uart tx bug, data pass(with flow control) through test ok. 2016-11-10 17:01:39 +08:00
Ivan Grokhotkov 3269653b94 Merge branch 'bugfix/nvs_lookup_failure' into 'master'
nvs: fix Page::findItem and Storage::findItem regression

When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found.
Incidentally, Storage::findItem reused itemIndex when starting search at next page.
So,
- if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index,
- first page has a few empty items at the end (but is marked full),
- next search looked up the item on the second page,
- index of the item on the second page was less than the cached index on the first page,

then the search would fail because cached starting index was reused.

This change fixes both sides of the problem:
- Page::findItem shouldn't modify itemIndex argument if item is not found
- Storage::findItem should not reuse itemIndex between pages

Two tests have been added.

ref. TW8406

See merge request !171
2016-11-10 16:58:39 +08:00
Angus Gratton 208e83def7 build system: Refactor component.mk to not need component_common.mk
New makefile component_wrapper.mk allows some variables to be set
before component.mk is evaluated. This properly fixes problems with
sdkconfig being hard to access in all phases of the build.

Including component_common.mk is no longer necessary and will print a
deprecation warning for components which use it.
2016-11-10 15:52:22 +11:00
Wangjialin 6fb2515a5d Merge branch 'master' into driver_merge_tmp/merge_uart
# Conflicts:
#	components/esp32/include/esp_err.h
2016-11-10 11:57:19 +08:00
Xia Xiao Tian c441d3630c change pin code value type and wps API comments. 2016-11-09 18:15:10 +08:00
Xia Xiao Tian 3b96f68afd 1. Add wps event processing.
2. Change wps API return type and value.
2016-11-09 17:27:12 +08:00
Angus Gratton 155f912433 build system: Don't build an sdkconfig for bootloader, share the top-level one
This works because all CONFIG variables are exported into child make processes.
2016-11-09 16:51:52 +11:00
Angus Gratton 830e5caf4d build system: Replace get_variable target w/ component_project_vars.mk generated makefiles
Reduces number of make invocations, allows variables exported in project
to be seen in all component make processes, not just the main ones.

Also makes a no-op build about 3x faster than it was.
2016-11-09 16:51:52 +11: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
Xia Xiao Tian bdd7fb7a13 Add wps API 2016-11-08 20:12:06 +08:00
Xia Xiao Tian 2dda3f57b5 remove light sleep and mac sleep 2016-11-08 19:57:32 +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
Angus Gratton 98a0387854 bootloader_support: Move secure boot code to bootloader_support 2016-11-08 11:13:54 +11: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
Wangjialin e452278194 Minor changes for driver
1. remove "\n" when calling ESP_LOGX APIs.
2. modify uart_event_t for uart rx data.
3. use MICRO for uart inverse value
4. add uart_tx_data_t for internal tx function.
2016-11-07 14:16:52 +08:00
Tian Hao 118984283a component/bt : blufi use api
1. use api
2. bluetooth init/deinit/enable/disable wrap api(1st version)
3. bluetooth deinit(free resource) still some problem
2016-11-07 02:16:00 +08:00
Tian Hao 3b489f04f0 component:bt : change adv api 2016-11-06 23:58:37 +08:00
Tian Hao 224acf37f6 component/bt : api category 2016-11-05 20:40:07 +08:00
Tian Hao 084248e211 component/bt : cleanup task evt 2016-11-05 19:57:53 +08:00
Tian Hao aa6fe04148 component/bt : cleanup the liscence header 2016-11-05 02:48:16 +08:00
Tian Hao acda125e8b Merge branch 'feature/btdm_prf_task' into feature/btdm_bluedroid
# Conflicts:
#	components/bt/bluedroid/profiles/core/bt_prf_sys_main.c
#	components/bt/bluedroid/profiles/core/bt_prf_task.c
#	components/bt/bluedroid/profiles/core/include/bt_prf_sys.h
#	components/bt/bluedroid/profiles/core/include/bt_prf_task.h
#	components/bt/bluedroid/profiles/esp/include/wx_airsync_prf.h
#	components/bt/bluedroid/profiles/esp/wechat_AirSync/wx_airsync_prf.c
#	components/bt/bluedroid/stack/btm/btm_sec.c
2016-11-04 19:32:47 +08:00
Yulong b83b0ed06a commpnent bt:Added the stop advertising to the bt project 2016-11-04 05:36:32 -04:00
Yulong 1544965b21 componet bt:debug the advertising issues,it can works in this version 2016-11-04 04:52:23 -04: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
Yulong 90d9f1a74e component bt:debug the profile task can work 2016-11-04 02:34:52 -04:00
Wangjialin 3ec23f1b83 Modify as Angus's suggestion:
1. Set XXX_TAG static, remove extern XXX_TAG in uart.h/ledc.h/gpio.h
2. I removed uart_set/get_print_port() functions, these functions are not well tested, I removed them for now.
3. Modify some function names for uart_read/write_bytes
4. Modify uart_write_bytes and uart_write_bytes_with_break.
2016-11-04 12:52:34 +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
Wangjialin 15474b9b7e Merge branch 'master' into driver_merge_tmp/merge_uart 2016-11-04 02:56:41 +08:00
Wangjialin a6b3be6734 Update UART driver
1. fix bug in ringbuffer.c:
    When return an dummy item, free_ptr might exceed rd_ptr, so the write_ptr would overwrite rd_ptr in this case.
2. Delete UART tx task in buffer mode. UART ISR will copy the data from tx buffer to fifo.
2016-11-04 02:48:25 +08:00
Wangjialin 9ed7c4f8bc fix ringbuffer bug. 2016-11-03 23:30:54 +08:00
Ivan Grokhotkov e314f42b0c nvs: fix Page::findItem and Storage::findItem regression
When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found.
Incidentally, Storage::findItem reused itemIndex when starting search at next page.
So,
- if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index,
- first page has a few empty items at the end (but is marked full),
- next search looked up the item on the second page,
- index of the item on the second page was less than the cached index on the first page,
then the search would fail because cached starting index was reused.

This change fixes both sides of the problem:
- Page::findItem shouldn't modify itemIndex argument if item is not found
- Storage::findItem should not reuse itemIndex between pages

Two tests have been added.
2016-11-03 20:18:30 +08:00
Wangjialin 8282c73ac2 debug ring buffer error. 2016-11-03 18:28:36 +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
Tian Hao 1540469598 component/esp32 component/bt : seperate phy init 2016-11-03 16:28:04 +08:00
Yulong c377650cdd component bt:Added the profile task to the bt project 2016-11-03 04:27:44 -04: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
Yulong cdd65095e3 component bt:Change the wx_airsync_prf to the new API function 2016-11-02 06:48:17 -04:00
Yulong bc604d14ff component bt: Change the battery function to the new API function 2016-11-02 06:14:02 -04: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
Yulong a0007ceb79 component bt:Change the HIDD profile function to the new api function 2016-11-02 03:45:00 -04:00
Angus Gratton aceb6517c0 Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00
Yulong 2cea783ca1 component bt:Added the app_button event process function to the bt project 2016-11-02 02:21:31 -04:00
yulong 97c75a88ae component bt:Change the button profile function to the new API function 2016-11-02 02:05:30 -04: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
Angus Gratton 04beb8baba Add documentation for bootloader secure boot stage 2016-11-02 10:41:59 +11:00
Angus Gratton 4ba1b73eba build system: Add espefuse/espsecure support for secure boot 2016-11-02 10:41:59 +11:00
Angus Gratton cf732bb663 esp32: efuse_reg add bit values for read & write disable flags 2016-11-02 10:41:59 +11:00
Angus Gratton f10cc7dc8e bootloader: Refactor secure boot digest generation 2016-11-02 10:41:59 +11: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
yulong bc834820bb Merge remote-tracking branch 'origin/feature/btdm_api' into feature/btdm_wechat_prf 2016-11-01 07:16:54 -04:00
Tian Hao d472ff5856 Merge branch 'master' into feature/btdm_bluedroid
1.update esptool submodule
2.new esp32 lib and new phy lib
3.new bt lib
4.soc.h add comment
2016-11-01 17:53:59 +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
Tian Hao 66b31b89ac Merge branch 'feature/btdm_gap' into feature/btdm_bluedroid
# Conflicts:
#	examples/07_blufi/components/bluedroid_demos/app_project/SampleClientProject.c
#	examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c
#	examples/07_blufi/components/bluedroid_demos/include/bt_app_common.h
2016-11-01 14:19:38 +08:00
Tian Hao cb33e2a5ae Merge branch 'feature/btdm_blufi' into feature/btdm_bluedroid
# Conflicts:
#	components/bt/bluedroid/bta/dm/bta_dm_pm.c
#	components/bt/component.mk
#	examples/07_blufi/components/bluedroid_demos/app_core/bt_app_core.c
#	examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c
2016-11-01 14:01:49 +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
yulong c85be70b9f component bt:Add the CLASSIC_BT_INCLUDED Macro to the project 2016-11-01 00:07:34 -04:00
wangmengyang a8b2608dd9 component/bt: merge SDP client and SDP server example to a single demo 2016-11-01 11:54:01 +08:00
Wangjialin ce9e73cd19 merge master 2016-11-01 10:34:13 +08:00
Wangjialin 8d6b782327 Modify UART driver:
1. Add a ring buffer for UART TX.
    If the buffer size is set to zero, driver will not use a buffer. But we need a task to send data from buffer to fifo. I tried directly copy data in ISR, but the code looked too long for ISR.
2. Modify the format in uart.h
2016-11-01 09:22:09 +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