Commit graph

1421 commits

Author SHA1 Message Date
Liu Zhi Fu 1b38494df4 bootloader: modify bootloader dram start address to 0x3fff0000
Modify bootloader dram_seg from address 0x3ffc0000 to 0x3fff0000, len from
0x20000 to 0x10000. Please be notified that this is just a workaround for
fixing app data overwrite bootloader data issue!
2017-01-06 13:44:09 +08:00
Wu Jian Gang e2d05d8592 Merge branch 'feature/wifi_deinit' into 'master'
wifi: add wifi rx buffer number config in menuconfig



See merge request !370
2017-01-06 13:32:25 +08:00
XiaXiaotian 7853893731 wifi: add wifi rx buffer number config in menuconfig 2017-01-06 10:12:27 +08:00
Ivan Grokhotkov ded13ac8e6 Merge branch 'feature/btdm_blufi' into 'master'
Feature/btdm blufi

This is new BLUFI for config wifi connection through bluetooth.


See merge request !359
2017-01-05 21:54:45 +08:00
Tian Hao 9017c408ac component/bt : use new lib, optimize BT power 2017-01-05 20:41:15 +08:00
Wu Jian Gang c9ef32a0f2 Merge branch 'feature/low_rate' into 'master'
add WiFi low rate feature



See merge request !358
2017-01-05 20:34:50 +08:00
Tian Hao 24af07fd13 component/bt : new blufi
1. new blufi protocol
2. new blufi demo
3. support security
4. support sta/ap/sta_ap
5. support wpa-enterprise
2017-01-05 20:22:35 +08:00
Wang Jia Lin ad1d4500f9 Merge branch 'feature/ledc' into 'master'
driver: ledc update

1. add fading functions.
2. clear up ledc.h
3. update api doc.
4. add ledc example

See merge request !347
2017-01-05 20:05:13 +08:00
wangmengyang 2e7748d625 component/bt: modify bluetooth API
1. VHCI api and doxygen
2. Controller api and doxygen
3. bluedroid init/enable api and doxygen
4. cleanup demo codes
2017-01-05 20:02:06 +08:00
me-no-dev 0feb3633fc add menuconfig option to enable SO_RCVBUF 2017-01-05 13:17:52 +02:00
qiyueixa 7778273314 esp32: update wifi libs
1. add wifi low rate feature
2017-01-05 18:43:09 +08:00
qiyueixa 5677149833 esp32: add wifi low rate feature
1. add low_rate_enable flag to scan results to identify if AP low rate is enabled.
2. add WIFI_PROTOCOL_LR for users to enable low rate feature.
2017-01-05 18:22:07 +08:00
Wangjialin 6b5e734901 driver: ledc - update fading functions, add example and doc
1. add fading functions.
2. clear up ledc.c and ledc.h
3. update api doc.
4. add ledc example
5. edit ledc.rst and add readme for example code.
6. add s_ prefix for static global values.
7. add mutex for fade functions
8. minor changes according to the comments.
2017-01-05 17:57:52 +08:00
Tian Hao d6fcec73b2 component/bt : add macro for adv_data_flag
1. add macro for adv data flag
2. add docs for doxygen
2017-01-05 17:53:33 +08:00
Tian Hao daf58e3852 component/bt : fix advertising bug
1. adv data flag
2. default adv data not BR/EDR in demo
2017-01-05 17:53:33 +08:00
Ivan Grokhotkov f867e0671e Merge branch 'feature/btdm_gatt_api' into 'master'
Feature/btdm gatt api

GATT upstream api changed. 
Actually, feature/btdm_blufi based on this branch.

See merge request !366
2017-01-05 16:43:01 +08:00
Dong Heng 8c7dfef317 examples/10_openssl_server: fixup SSL server with method of specific version
1. add method of any version supporting at OpenSSL and add API in header file
2. change OpenSSL server context method to be method of any version

Fixes http://esp32.com/viewtopic.php?f=14&t=696.
2017-01-05 15:57:25 +08:00
Tian Hao ee318d42ae Merge branch 'master' into feature/btdm_gatt_api 2017-01-05 15:25:03 +08:00
Liu Zhi Fu d98b99f4f0 lwip: rework according review comments 2017-01-05 12:22:49 +08:00
Liu Zhi Fu be994740b4 Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf into feature/throughput_optimization_phrase_1 2017-01-05 11:37:56 +08:00
Liu Zhi Fu 0fb2ab9f5c lwip/freertos/esp32: add throughput optimization related code
1. Update wifi lib which contains ampdu and other optimizations
2. Add throughput code debug code
3. Other misc modification about throughput optimization
2017-01-05 11:37:08 +08:00
Yinling 6c41080fd9 CI: update known issues 2017-01-04 19:27:58 +08:00
Angus Gratton 63e9806d85 esp_random: XOR the RNG register value several times before returning it
Probably unnecessary, but avoids returning internal RNG state as-is.
2017-01-04 17:07:12 +11:00
Angus Gratton 3922ce47b2 bootloader: Enable early boot RNG entropy source
This reverts commit ceb8566970.
2017-01-04 17:07:12 +11:00
Angus Gratton 83442526e0 bootloader: Allow custom baud rate on UART 0 2017-01-04 16:24:12 +11:00
Angus Gratton 2e3ca1c2f7 bootloader: Boost bootloader CPU to 80MHz
Partially needed to use RNG, also useful to improve boot performance.
2017-01-04 16:07:19 +11:00
Wang Jia Lin bf3093feca Merge branch 'driver_merge_tmp/merge_i2c' into 'master'
driver: i2c code

1. add i2c master code
2. add i2c slave code
3. add i2c example code

See merge request !318
2017-01-03 16:44:08 +08:00
Yinling b9a6d276a2 CI: update known issues 2017-01-03 14:06:50 +08:00
Yinling c47bc43afd CI: fix bug that restore initial condition fail:
in STA+AP mode, when STA is reconnecting to external AP, its AP
interface is not connectable. do disconnect on STA interface first
2017-01-03 14:06:50 +08:00
Angus Gratton 2407faf6c6 Merge branch 'feature/print_halt_abort' into 'master'
panic handlers: Print the PC address where abort() was called, don't dump registers



See merge request !338
2017-01-03 13:44:34 +08:00
Angus Gratton 19fa6e254d Merge branch 'feature/make_monitor' into 'master'
Add 'make monitor' target as used in arduino-esp32



See merge request !355
2017-01-03 08:43:49 +08:00
Angus Gratton 5e96070c27 linker script: Remove KEEP from RAM-resident sections
Reduce RAM usage when not all data/bss sections in source files were used.
2017-01-03 11:02:12 +11:00
Angus Gratton 03551ec2da build system: Add 'make monitor' target from arduino-esp32
Originally added to arduino-esp32 by @me-no-dev. It's so useful, we
want it in esp-idf as well! :)
2017-01-03 10:59:10 +11:00
Angus Gratton 7883a5bae5 Merge branch 'feature/esptool_reset_options' into 'master'
esptool: Add new options to reset before/after, detect flash size

Also fixes bugs with reading MAC, chip id.

See merge request !331
2017-01-03 07:48:10 +08:00
Wangjialin 9c7cc86793 1. modify i2c_set_pin function
2. update example comments and other minor changes
3. rename API:  i2c_cmd_link_create/i2c_cmd_link_delete (+4 squashed commits)

Squashed commits:
[2e0ac3e] 1. coding style: add one space after condition key words.
2. modify i2c.h, use gpio_num_t instead of int, improve comments of return values
3. add i2c index in index.rst
4. add readme for i2c example
[4991d92] update i2c.doc
[88b672e] driver: i2c

1. add mux and spin lock to run in a thread-safe way.
2. modify example code
[4eb15fe] driver: i2c code

1. add i2c master code
2. add i2c slave code
3. add i2c example code
4. add DRAM_ATTR for I2C array
2017-01-03 00:57:19 +08:00
liuhan d0b10ba2dd components/coap: Add libcoap port for ESP32 platform 2016-12-30 15:05:26 +08:00
liuhan 2b41c1b8b2 components/coap: Add libcoap library as submodule 2016-12-30 15:05:26 +08:00
Angus Gratton 3783e28f0e bootloader: Check all partitions fit inside configured flash size 2016-12-30 14:19:46 +11:00
Angus Gratton 76e61ded30 bootloader: Call esp_partition_table_basic_verify() as part of standard boot
Was previously only verified during flash encryption.
2016-12-30 14:19:46 +11:00
Angus Gratton d245f016ea esptool: Add new options to reset before/after, detect flash size 2016-12-30 14:19:46 +11:00
Chen Wu d0fccbce15 examples: Add OTA demo 2016-12-29 17:37:17 +08:00
Tuan PM 5462d98e5a Add i2s driver 2016-12-29 17:29:14 +08:00
Wang Jia Lin 8bcd341fca Merge branch 'buffix/uart_frm_err_parity_err_mismatch' into 'master'
bugfix: uart event mismatch

Fix bug of uart frame error and parity error interrupt mismatch in driver code, which will cause the corresponding interrupt can not be cleared correctly, and will finally cause a interrupt watch dog.

See merge request !335
2016-12-29 13:15:48 +08:00
Ivan Grokhotkov 48c4a10827 Merge branch 'feature/gpio_intr_function' into 'master'
GPIO driver: add per-pin interrupt handlers

1. add ISR handler apis so that users of different layers can hook their own isr handler on different GPIO.
    Audio project has different software layers, they need different gpio isr handler for layer instead of processing all GPIO interrupts in one handler.
    If this kind of calling a handler from isr is not proper, please kindly point out.
2. add gpio example code.
3. update gpio doc.

See merge request !345
2016-12-29 12:36:04 +08:00
Wu Jian Gang 0b79a108b8 Merge branch 'feature/add_ip_frag_option' into 'master'
lwip: add ip frag and reassembly option in menuconfig

add ip frag and reassembly option in menuconfig

See merge request !348
2016-12-29 11:26:06 +08:00
Wangjialin ade7ee2092 gpio_driver: add per-pin interrupt handlers
1. add ISR handler apis so that users of different layers can hook their own isr handler on different GPIO.
    Audio project has different software layers, they need different gpio isr handler for layer instead of processing all GPIO interrupts in one handler.
    If this kind of calling a handler from isr is not proper, please kindly point out.
2. add gpio example code.
3. improve gpio.rst
4. add readme for gpio example

Squashed commits:
[278e50f] update: GPIO
1. coding style, add a space between conditional or loop keyword and an opening paren.
2. modify some return value and doc
3. use printf in example code
Squashed commits:
[efb23bb] minor change of comment
2016-12-29 11:16:32 +08:00
Angus Gratton 1c08cf2f79 Merge branch 'bugfix/uart_intr_config' into 'master'
uart_intr_config should return ESP_OK on success

Github PR #170 https://github.com/espressif/esp-idf/pull/170

See merge request !339
2016-12-29 05:36:26 +08:00
Angus Gratton 3cfe738fcf Merge branch 'bugfix/minor_issues' into 'master'
Bugfixes from Github

Many small fixes for open github issues.

See merge request !334
2016-12-28 13:18:34 +08:00
Angus Gratton 06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
Angus Gratton e6b09dc258 FreeRTOS: Default to canary byte stack overflow checking
Was mistakenly "none" due to name change not being propagated.

Closes github issue #181: https://github.com/espressif/esp-idf/issues/181
2016-12-28 10:17:56 +11:00
Angus Gratton 9496fda662 RMT driver: Rename rmt_set_evt_intr_en to rmt_set_tx_thr_intr_en
Closes github #115: https://github.com/espressif/esp-idf/issues/115
2016-12-28 10:17:56 +11:00
Angus Gratton 948a2ba23a uart driver: Remove invalid UART_BITRATE_115200 enum from example
Closes github #92 https://github.com/espressif/esp-idf/issues/92
2016-12-28 10:17:56 +11:00
Angus Gratton 6395081503 uart driver: Set type of uart_driver_install queue param
Closes github #91 https://github.com/espressif/esp-idf/issues/91
2016-12-28 10:17:56 +11:00
Angus Gratton 45571b3c38 LEDC driver: Use ledc_channel_t for all channel arguments
Closes github #54: https://github.com/espressif/esp-idf/issues/54
2016-12-28 10:17:56 +11:00
Angus Gratton 41eca2c67b RMT: Don't require carrier_freq_hz to be non-zero if carrier_en unset
Closes github #123 https://github.com/espressif/esp-idf/issues/123
2016-12-28 10:17:56 +11:00
Angus Gratton ff1fa8a323 gpio driver: Fix gpio_set_level validation of gpio_num argument
Closes #125 https://github.com/espressif/esp-idf/issues/125
2016-12-28 10:17:56 +11:00
Angus Gratton 1e44f72e98 esp_wifi_init: Update comment about init event_q
Closes github #28 https://github.com/espressif/esp-idf/issues/28
2016-12-28 10:17:56 +11:00
Angus Gratton c1a6d55116 WiFi interface: SSID and password fields should be uint8_t in all cases
Closes github #40 https://github.com/espressif/esp-idf/issues/40
2016-12-28 10:17:56 +11:00
Angus Gratton da977149f6 panic handlers: Print the PC address where abort() was called, don't dump registers 2016-12-28 10:09:40 +11:00
Jiang Jiang Jian 6d0fd80af4 Merge branch 'bugfix/tw9313_dual_core_issue' into 'master'
freertos: fix dual core issue

This commit try to fix dual issue tw9313 raised by QA
1. Put per-core data into critical session or interrupt disabled/enabled session
2. Idle task may have problem when it terminate the task in both core

See merge request !333
2016-12-27 22:06:55 +08:00
Liu Zhi Fu d049fd3929 freertos: rework code based on review 2016-12-27 12:11:07 +08:00
Liu Zhi Fu d2e58193d2 add more protection for per-core data 2016-12-26 19:04:41 +08:00
XiaXiaotian 15651b5923 lwip: add ip frag and reassembly option in menuconfig 2016-12-26 15:47:20 +08:00
shangke 5ddf6daa98 feature/ethernet_driver: update ethernet driver
1. The transmitting mode of the packets from LWIP to MAC is changed from synchronous to asynchronous.
2. The receive buf mode : support pointer mode and copy mode.
3. Add get phy status func used to config mac register.
2016-12-26 14:50:49 +08:00
Ivan Grokhotkov 05fcdcfedb Merge branch 'bugfix/make_erase_flash' into 'master'
build system: Fix bug where erase_flash was always invoked for flash

Order-only prerequisites do not work for phony targets!

See merge request !337
2016-12-25 09:13:58 +08:00
Wangjialin 794f7dd294 bugfix: uart event mismatch
1. Fix bug of uart frame error and parity error interrupt mismatch in driver code, which will cause the corresponding interrupt can not be cleared correctly, and will finally cause a interrupt watch dog.
2. Add gpio pull-up for rx pin and cts pin.
2016-12-22 14:08:48 +08:00
Angus Gratton abb7668af7 build system: Fix bug where erase_flash was always invoked for flash
Order-only prerequisites do not work for phony targets!
2016-12-22 16:37:28 +11:00
Liu Zhi Fu 99f4c697ee freertos: enable dual core by default 2016-12-22 13:37:07 +08:00
Angus Gratton 4cfbe80b0f Merge branch 'bugfix/bootloader_stack' into 'master'
bootloader: Check if DRAM segments are going to collide with stack



See merge request !330
2016-12-22 12:15:18 +08:00
Angus Gratton ab5915ff8b spi_flash: Standardise argument types & names used for flash offsets
Closes github #88: https://github.com/espressif/esp-idf/issues/88
2016-12-22 15:07:02 +11:00
Liu Zhi Fu 3a2fbda35c freertos: minor change according to review comments 2016-12-22 10:51:40 +08:00
Liu Zhi Fu 2cffaf9cc8 freertos: fix dual core issue
This commit fixes:
1. xTaskGetCurrentTaskHandle may return wrong TCB when current task switch to a different core
2. Idle task may have problem when it terminate the task in both core
2016-12-22 10:17:39 +08:00
Ivan Grokhotkov a760eb3980 Merge branch 'feature/erase_flash' into 'master'
Build system: Add `make erase_flash` target



See merge request !328
2016-12-22 09:53:25 +08:00
Wangjialin 9dbdab5c9a driver: uart
1. add uart rx buffer data length API
2. add uart pattern detect event
3. add uart example code
4. modify uart_isr_register
5. modify uart.rst
6. fix parity err event and frame err event.
2016-12-21 11:55:53 +08:00
Angus Gratton 4f3ff1cf7e Merge branch 'bugfix/ringbuffer_receive_upto_api' into 'master'
bugfix: ring buffer

Fix API xRingbufferReceiveUpToFromISR

See merge request !327
2016-12-21 10:01:13 +08:00
Angus Gratton bae0149920 Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes from various sources

- Fix memory debugging code. Noticed by Tuan.
- intr_enable/disable should be in IRAM. Noticed by rojer
- Still old timer code in examples in doxygen comments. Noticed on the forum by jumjum123
- Timer example was broken. Noticed on the forum by jumjum123

See merge request !325
2016-12-21 06:54:33 +08:00
Angus Gratton 51cd654658 Merge branch 'bugfix/ota_select_info_point_fix' into 'master'
bootloader: fix error pointer to ota select info

bbs issue: http://www.esp32.com/viewtopic.php?f=14&t=615,
ota select info should be in different sector

See merge request !316
2016-12-21 06:54:21 +08:00
Angus Gratton 198889ad26 bootloader: Check if DRAM segments are going to collide with stack 2016-12-20 16:14:07 +11:00
Wu Jian Gang cca883490e Merge branch 'bugfix/tcpip_adapter_set_ip_info' into 'master'
Fix set static IP address issue

Set static IP address, clear current DNS servers default.

See merge request !310
2016-12-20 11:18:17 +08:00
Ivan Grokhotkov ba08d1ae25 Merge branch 'feature/phy_init_data_update' into 'master'
phy init data update

This changes 54M target power from 16 dBm to 15 dBm, and bumps init_data version from 0 to 1.

See merge request !322
2016-12-20 10:26:16 +08:00
Ivan Grokhotkov 41ce99db32 Merge branch 'feature/ulp' into 'master'
ULP: add new instructions, fix bugs, add tests

This adds peripheral register read and write instructions, an instruction to wake the SoC from deep sleep, and some tests.

Also fixes two bugs: ANDI instruction definition, and running the ULP when in deep sleep mode.

See merge request !317
2016-12-20 10:25:55 +08:00
Jeroen Domburg 4c86aba160 Merge branch 'bugfix/exception_handling' into 'master'
Fix exception handler to jump to correct vector instead of crashing to the double exception vector.

One-character fix... basically, this caused the exception handler to crash into the double-exception handler instead of nicy panic'ing.

See merge request !323
2016-12-20 09:22:41 +08:00
Angus Gratton 7ba6be782e Merge branch 'feature/secure_boot_remote_sign' into 'master'
Secure boot: Option for app & partition table signing to happen outside build system

Allows for a remote signing server, private signing key does not need to be on the build system.

See merge request !320
2016-12-20 07:04:31 +08:00
Angus Gratton 59e0f63d37 Build system: Add make erase_flash target 2016-12-20 10:00:04 +11:00
Angus Gratton d031530196 Merge branch 'feature/dhcpserver_null_gw' into 'master'
Allow gw to be null

Github Pull Request 163: https://github.com/espressif/esp-idf/pull/163

Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.

See merge request !312
2016-12-20 06:14:44 +08:00
Wangjialin 6a8a9a0272 bugfix: ring buffer, fix api xRingbufferReceiveUpToFromISR 2016-12-20 01:13:03 +08:00
Deomid Ryabkov 1597f7a035 Add IRAM_ATTR to esp_intr_{enable,disable}
So it's safe to invoke from ISR

Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
2016-12-19 18:49:28 +08:00
Jeroen Domburg 93e72649dc Fix memory debugging code 2016-12-19 18:48:08 +08:00
Jeroen Domburg 4854dcf0eb Get rid of old interrupt example code 2016-12-19 18:48:08 +08:00
Tian Hao 65fe6ab320 component/bt : modify demo for new api
1. modify GATT Client demo
2. modify GATT Server demo
3. fix a register notify bug
2016-12-19 17:15:41 +08:00
Tian Hao c01dedcb06 component/bt : change api for V2.0
1. change all gatt cb function to 3 args and function type. add gattc_if/gatts_if as second argument
2. delete gatt_if of "gatt cb param"
3. separate conn_id and gatt_if from conn_id
4. change the demo code as the gatt changed
2016-12-19 17:15:41 +08:00
Jeroen Domburg bb584c4333 Fix exception handler to jump to correct vector instead of crashing to the double exception vector. 2016-12-19 16:01:21 +08:00
Ivan Grokhotkov 4853df9c83 phy init data update
This changes 54M target power from 16 dBm to 15 dBm, and bumps init_data version from 0 to 1.
2016-12-19 14:23:39 +08:00
Angus Gratton d6fafd00db Secure boot: Option for app & partition table signing to happen outside build system 2016-12-19 13:12:05 +11:00
Wangjialin b00b75db7e driver: sigma-delta
1. add sigma-delta code and example.
2. add gpio output signal in io matrix.

Squashed commits:
[a25e7d4] minor changes for doc
[6a03a1e] minor changes on comments and doc.
[97dd9e4] Add doc.
update index.rst
change example index
2016-12-18 17:20:17 +08:00
Deomid Ryabkov 2c165aba36 uart_intr_config should return ESP_OK on success 2016-12-16 22:27:45 +00:00
Ivan Grokhotkov b62f8b42d4 ulp: document peripherals accessible using RD_REG and WR_REG 2016-12-16 20:32:34 +08:00
Ivan Grokhotkov 7a527896dc ulp: use timer to start ULP, fix I_ANDI bug, add tests
Starting the ULP using SENS_SAR_START_FORCE_REG doesn’t disable clock gating of RTC fast clock.
When SoC goes into deep sleep mode, RTC fast clock gets gated, so ULP can no longer run.
Instead, it has to be started using the timer (RTC_CNTL_ULP_CP_SLP_TIMER_EN bit).
When ULP is enabled by the timer, clock also gets enabled.
2016-12-16 20:25:38 +08:00
Ivan Grokhotkov 7b02eae9e6 ulp: add RD_REG, WR_REG, END instruction 2016-12-16 20:01:15 +08:00
Tian Zhong Xing 461aab3e75 bootloader: fix error pointer to ota select info 2016-12-16 18:47:25 +08:00
Ivan Grokhotkov 628bad1dbf deep sleep: add documentation 2016-12-16 14:31:29 +08:00
Ivan Grokhotkov 370f4b8556 deep sleep: set pin configuration right before entering deep sleep
This change allows setting pin configuration for EXT1 wakeup depending on the state of RTC_PERIPH power domain:
- if peripherals are enabled (due to another wakeup mode, or due to esp_deep_sleep_pd_config call), we can keep internal pullups/pulldowns enabled
- if peripherals are disabled, pullups and pulldowns need to be disabled as well

Also add comments about the purpose of registers being configured.
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 609d852834 deep sleep: power down RTC peripherals in EXT1 sleep 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 616d1d32f1 ulp: add missing component.mk for tests 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 83184bd52b deep sleep: RTC fast memory may be disconnected after deep sleep wakeup
This adds a workaround for a bug that following deep sleep wakeup, ISO (bus isolation) signal may be set for RTC fast memory.
We set FORCE_NOISO bit in RTC_CNTL_PWC_REG until we find out what is causing ISO signal to be set.
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 35115885c5 deep sleep: add API to control power down 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 88ddf5aefa deep sleep: rename header file 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov eac80b0651 deep sleep: add option to delay CPU startup
When ESP32 wakes up from deep sleep, flash is accessed an approximately 900us after power on.
Some flash chips need more time to become ready. This change adds a menuconfig option to add
some delay to the default deep sleep wake stub.

Fixes https://github.com/espressif/esp-idf/issues/117
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 3b854fe46a deep sleep: implement wake up using ULP, EXT0, EXT1 sources
This adds the following APIs to enable various wakeup sources:
- esp_deep_sleep_enable_timer_wakeup
- esp_deep_sleep_enable_ulp_wakeup
- esp_deep_sleep_enable_ext0_wakeup
- esp_deep_sleep_enable_ext1_wakeup

And an API to start deep sleep:
- esp_deep_sleep_start
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 71daf49e39 driver/rtc_io: improve header comments
Fix descriptions of return values, fix typos, use upper case for abbreviations.
2016-12-16 14:30:27 +08:00
Angus Gratton d246836cfc Merge branch 'feature/spiflash_unaligned_readwrite' into 'master'
Remove alignment reqs from spi_flash_{read,write}

Github pull request https://github.com/espressif/esp-idf/pull/155

See merge request !311
2016-12-16 13:28:12 +08:00
Wu Jian Gang 87d0eb0fdb Merge branch 'feature/tw8657_refractor_to_sniffer' into 'master'
refactor to sniffer

1. WiFi send the whole packet to smartconfig
2. Fixed some modem sleep bugs


See merge request !306
2016-12-15 19:03:44 +08:00
Liu Zhi Fu 3984d96acb esp32: refactor to sniffer
1. TW8657, WIFI send the whole packet to smartconfig;
2. modify API annotation of smartconfig and sniffer;
3. export smartconfig APIs to programming guide;
2016-12-15 18:20:00 +08:00
Wu Jian Gang 847092e483 Merge branch 'bugfix/tw9240_fix_lwip_dual_core_issue' into 'master'
lwip: fix lwip dual core issue

Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.

See merge request !314
2016-12-15 17:33:28 +08:00
Xia Xiaotian eec743d04c esp32: update wifi lib, fix some modem sleep bugs
1. tw7426: fix the bug that config ap crashes(7bb90c19)
2. tw9149: fix memory leak in modem sleep(1f450cb8)
3. tw9157: fix dtim change log in modem sleep(1f450cb8)
4. update smartconfig.a
2016-12-15 17:18:40 +08:00
Ivan Grokhotkov 9d5f4e877e Merge branch 'bugfix/heap_alloc_no_iram' into 'master'
Restore ability to alloc IRAM, and more.

- Fix mem regions so allocating IRAM works again
- Optimize allocator slightly, uses 4 less bytes per malloc now
- Allow querying free heap memory space per memory type


See merge request !301
2016-12-15 16:28:29 +08:00
Jiang Jiang Jian 70d39aa105 Merge branch 'bugfix/btdm_bluedroid' into 'master'
Bugfix/btdm bluedroid

Cleanup all the warnings。
Fix GATT CLIENT cannot receive notfiy/indicate from GATT SERVER bug.

Originally, bluetooth have its own master branch(feature/btdm_bluedroid), all the bluetooth sub branch will merge to feature/btdm_bluedroid firstly. If feature/btdm_bluedroid is ready, it will request merge to master. But as Ivan/JG/Jack's requires, all the bluetooth bugfix or feature will request merge to master ASAP.
This MR contains "cleanup warning " and "some bug fix", after, every merge request only contain one thing.

See merge request !286
2016-12-15 16:10:21 +08:00
Liu Zhi Fu 55726385a4 add more comments and call portYIELD when necessary 2016-12-15 15:06:00 +08:00
Jeroen Domburg 712f53176d Make internal function static 2016-12-15 15:03:22 +08:00
Jeroen Domburg 6f0a494cae Add testcase, fix executable memory allocated in shared dram/iram region 2016-12-15 15:03:22 +08:00
Jeroen Domburg 1e117dc3d3 Fix small things noticed in MR, add documentation 2016-12-15 15:03:22 +08:00
Jeroen Domburg 293ad4cd36 Add xPortGetFreeHeapSizeCaps and xPortGetMinimumEverFreeHeapSizeCaps plus everything it entails. Allows querying the available memory for various capabilities. Also: xPortGetFreeHeapSize and xPortGetMinimumEverFreeHeapSize now return the expected value. Bonus: the linked list used in the allocator is now 4 bytes smaller, which should save some memory. 2016-12-15 15:03:22 +08:00
Jeroen Domburg 3f3cf397f7 Tabs -> spaces 2016-12-15 15:03:22 +08:00
Jeroen Domburg 1cb2081d99 Do not disable entire IRAM pool; instead disable only the bit that is used. This gives us 50K of iram at the moment. 2016-12-15 15:03:22 +08:00
Jeroen Domburg 25e7f3a303 Add name to tag type 2016-12-15 15:03:22 +08:00
Tian Hao 5a2033c4e3 Merge branch 'master' into bugfix/btdm_bluedroid 2016-12-15 14:40:29 +08:00
Liu Zhi Fu 5e2ae7ac19 lwip: fix lwip dual core issue
Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.
2016-12-15 14:37:21 +08:00
Tian Hao d242251295 component/bt : fix advertising bug
1. low duty can not be set bug
2. adv type can not be effective bug
2016-12-15 14:33:09 +08:00
Tian Hao f3450abf3d component/bt : add some macro , so redo the doxygen 2016-12-15 14:02:48 +08:00
Tian Hao d045187c0f component/bt : change the resolving list cleanup position
1. enable will malloc, but disable don't free resolving list, so fix it
2. In disable procedure, it will alloc alarm to hash_map, and all the alarm  hash_map will be free in deinit. So this need not be fixed currently.
2016-12-15 13:35:30 +08:00
Jeroen Domburg 1037a50abe Convert DOS line ends to Unix line ends in drivers 2016-12-15 09:45:40 +08:00
Jeroen Domburg 3ed16758c0 Update examples in uart.h 2016-12-15 09:44:21 +08:00
Deomid Ryabkov d288a3d053 Remove alignment reqs from spi_flash_{read,write} 2016-12-15 10:07:31 +11:00
Angus Gratton 487548e7dd Merge branch 'bugfix/build_system_linker_script_deps' into 'master'
build system: Linker scripts or binary libraries should trigger a re-link

Add binary libraries and linker scripts to the list of dependencies for the ELF file.

Fixes TW7816.


See merge request !307
2016-12-15 05:38:54 +08:00
Deomid Ryabkov cbff82cc44 Allow gw to be null
Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.
2016-12-14 19:34:04 +00:00
Tian Hao aba262b18b component/bt : fix bluetooth disable memory leak 2016-12-15 01:36:27 +08:00
Tian Hao 69ee1de9fa component/bt : fix enable bug
1. enable will cause exception with list->head memory modify
2. gatt complete, timeout with HCI cmd timeout will cause exception
2016-12-14 22:10:21 +08:00
Tian Hao 5e87cdec7e component/bt : increase the task stack size
1. increase HCI task stack size
2. increase BTC task stack size for default
2016-12-14 22:10:21 +08:00
Tian Hao fd11beebcd component/bt : fix the init/deinit memory leak
1. modify the memory debug
2. fix init/deinit memory leak
2016-12-14 22:10:21 +08:00
Tian Hao 7ae7a56457 component/bt : fix the bug of deinit/disable
1. fix the exception of deinit/disable
2. debug mem leak of deinit, fix some memleak, but still something wrong.
3. debug men leak of disable.
4. add bluedroid memory debug
2016-12-14 22:10:21 +08:00
Jeroen Domburg d5c57d1d10 Put ets_isr_* functions into IRAM. Original fns were in ROM so people may expect them to work when flash cache is out. 2016-12-13 13:24:01 +08:00
Ivan Grokhotkov 8f3c74353a newlib: fix unit test name in test config 2016-12-13 13:24:01 +08:00
Ivan Grokhotkov 071615b059 freertos: fix TLS delete callback test
“Full” printf uses more stack space than “nano” printf, and more space than available in the idle task.
This caused stack overflow in TLS delete test. Replacing printf with ets_printf.
2016-12-13 13:24:01 +08:00
Jeroen Domburg 78161a1fe3 Replace non-multicore-aware rom funcs with multicore-aware funcs, ESP_LOG->ESP_EARLY_LOG fix, reserve ints used in wireless libs. Fixes WiFi crashing 2016-12-13 13:24:01 +08:00
Liu Han d60ff9b6f6 components/tcpip_adapter: Fix set static IP address issue
Set static IP address, clear current DNS servers.
2016-12-13 09:52:29 +08:00
Ivan Grokhotkov 2a4b150017 Merge branch 'test/integrate_stress_test_to_CI' into 'master'
add supported stress test to CI

add supported stress test to CI:

stress test requires long time to execute. They will only be executed when variable NIGHT_BUILD=YES. Therefore we'll use gitlab-API trigger to execute stress test cases.

See merge request !220
2016-12-12 16:20:13 +08:00
Angus Gratton bbe1bceda8 build system: Project ELF should depend on linker scripts, binary libraries
TW#7816
2016-12-12 15:58:53 +11:00
Ivan Grokhotkov 1c60a0450e Merge branch 'bugfix/driver_cleanup_log' into 'master'
drivers: remove file paths from log statements

Function name and error string are usually sufficient to find the place which has triggered an error. 

`__FILE__` macro generates a string which has absolute file name (with our build system), which add many long strings to the program binary.

Also change log tags to lower case to match style used elsewhere.

Fixes https://github.com/espressif/esp-idf/issues/126

See merge request !282
2016-12-12 10:15:25 +08:00
Angus Gratton bab1d49f1f Merge branch 'feature/esptool_flash_encryption' into 'master'
Flash encryption support

Flash encryption support in build system, tooling

To come in future MR:
* On-device key generation on first boot (for production devices), need to finalise testing of bootloader entropy seeding.
* spi_flash_encrypted_write to support non-32-byte block writes (at least optionally.)
* I think a lot of the bootloader_support component can possibly be rolled into "spiflash" and other components, to use a common API.

See merge request !240
2016-12-12 06:50:46 +08:00
Ivan Grokhotkov f504e23d0f bootloader, driver/rtc: fix warnings about unused functions 2016-12-09 15:47:32 +08:00
Tian Hao 1be09039e3 component/bt : cleanup the un-necessary include in api.h
1. cleanup the un-necessary include in api.h for "extern c"
2. add UUID define
2016-12-09 14:38:21 +08:00
Tian Hao 4c6ccf1c23 component/bt : add cpp extern c
1. add cpp extern c
2. retab tab to 4 space
2016-12-09 14:38:21 +08:00
Tian Hao e0e6966be0 component/bt : fix the authentication req type 2016-12-09 14:38:21 +08:00
Tian Hao 8185b0f806 component/bt : fix bug of bdaddr point to resolve gattc recv notify 2016-12-09 14:38:21 +08:00
Jeroen Domburg bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Angus Gratton f68e1c22ab Merge branch 'bugfix/ci_fail_warnings' into 'master'
Fail CI build on warnings

This allows developers to add CFLAGS for -Wno-error=XXX while developing, but before code passes the CI build then it must be warning-free.

See merge request !279
2016-12-09 13:25:51 +08:00
Angus Gratton 9fd7908bbe Merge branch 'bugfix/spiflash_erase_block' into 'master'
SPI flash: Block erase size 64KB not 32KB

Reverts changes made in 9f9d92b2df

See merge request !298
2016-12-09 13:19:09 +08:00
Ivan Grokhotkov cf311d81ee Merge branch 'feature/newlib_full_format' into 'master'
newlib: add "full" formatting support

This change adds support for 64-bit formats and C99 features to newlib printf/scanf functions. This support is enabled by default in menuconfig, but can be switched off to reduce code size.

Also adds missing functions such as fmod and fmodf.

- Fixes https://github.com/espressif/esp-idf/issues/52
- Fixes https://github.com/espressif/esp-idf/issues/83


See merge request !274
2016-12-09 12:04:29 +08:00
Angus Gratton 8ba75a1e9f SPI flash: Block erase size 64KB not 32KB
Reverts changes made in 9f9d92b2df
2016-12-09 14:18:58 +11:00
Yinling a283042258 switch socket recv print for stress test 2016-12-09 10:45:10 +08:00
Ivan Grokhotkov bf7fbdf3cf Merge branch 'feature/mbedtls/add_menuconfig_component' into 'master'
components/mbedtls: add time and time data configuration at menuconfig



See merge request !268
2016-12-08 22:25:26 +08:00
Yinling 5e1cdd3422 fix bug in test case TCPIP_TCP_5101
test time is not set in test case and not used to control test time
2016-12-08 16:15:49 +08:00
Tian Hao 8ca6e37c12 component/bt : delete the un-used lines 2016-12-08 15:00:19 +08:00
Jeroen Domburg baa6a477c5 Fix example code, add chapter to docs about interrupts and multicore issues 2016-12-08 14:42:00 +08:00
Liu Han c1802eaa98 components/mbedtls: add time and time data configuration at menuconfig 2016-12-08 13:33:47 +08:00
Angus Gratton f807d16310 Merge branch 'feature/backtrace_dumps' into 'master'
Feature/backtrace dumps

Github pull request https://github.com/espressif/esp-idf/pull/149

(Plus reformatting of panic.c, as it hadn't been formatted to our code style yet.)

See merge request !290
2016-12-08 13:27:33 +08:00
Jeroen Domburg cb9ef19d3b Also add intr_alloc magic to rtc code 2016-12-08 12:57:57 +08:00
Jeroen Domburg 2c34ab3374 Mark some interrupts that are now allocated dynamically as free, add int handle param documentation, add local ints test 2016-12-08 12:39:33 +08:00
Jeroen Domburg 9dc908d105 Add test for local interrupts, fix int disable code 2016-12-08 12:39:33 +08:00
Jeroen Domburg ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Jeroen Domburg 32fa94935d Changes according to merge request 2016-12-08 12:39:33 +08:00
Jeroen Domburg 655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Ivan Grokhotkov 221dc13535 newlib: add "full" formatting support, add missing functions
- add two versions of libc: libc.a and libc_nano.a. First one has full C99 formatting support, second one uses “nano” formatting functions available in ROM.
- fix linker error for fmod, fmodf, atof, atoff
- update tests
2016-12-08 11:04:54 +08:00
Ivan Grokhotkov 505282bab1 Merge branch 'feature/select_default_uart' into 'master'
UART console selection

This change adds a set of menuconfig options to set custom UART#, baud rate, and pins, for console output.
Ref. TW8146

Also includes the following changes:
- `uart_tx_wait_idle`: fix issue with last character not transmitted. ROM function `uart_tx_wait_idle` may have a bug which causes the function to return before the final character is fully transmitted. This replaces `uart_tx_wait_idle` declaration with a static inline definition which fixes the issue. Also replaces the use of `uart_tx_flush` with `uart_tx_wait_idle` in `esp_restart`, to remove garbage in console output on restart.
- `rtc_printf` is temporary replaced with a no-op, pending a new release of librtc.a. Current release assumes that UART0 is used for output,
and switches UART0 baud rate while doing frequency changes and printing some log output. This doesn’t work if a different UART is used for output.
- disable boot watchdog only after starting the main task. Boot watchdogs were disabled very early in startup code. It was possible to introduce an infinite loop anywhere in the many functions called from startup code, and this would not be detected by interrupt watchdog and task watchdog. This change postpones disabling of boot watchdogs to the point when the scheduler is running. Also replaces register expressed using integer address with a name. This change is not directly related to the previous ones, but was found while debugging UART selection features.

See merge request !288
2016-12-08 10:58:44 +08:00
Ivan Grokhotkov a1542421c0 Merge branch 'bugfix/pcnt_driver' into 'master'
Fixing some syntax errors in pcnt



See merge request !278
2016-12-08 10:48:05 +08:00
Ivan Grokhotkov e3eff5deb9 cpu_start: tabs->spaces 2016-12-08 10:20:12 +08:00
Angus Gratton 81e721ebcb Merge branch 'bugfix/rmt_debug_newline' into 'master'
Removal of spurious newline character in debug statement

There was a debug statement in the code that included an additional newline character that wasn't needed.

From github PR: https://github.com/espressif/esp-idf/pull/124

See merge request !291
2016-12-08 10:05:11 +08:00
Ivan Grokhotkov a00762f1f9 Merge branch 'bugfix/netif_zero_init' into 'master'
Zero-fill netif on alloc

LwIP's `struct netif` was not zero-initialized after allocation, so `ipv6_addr_cb ` function pointer contained garbage. This caused a crash if the device was on an IPv6 capable network.

Fixes https://github.com/espressif/esp-idf/issues/133, https://github.com/espressif/esp-idf/issues/147, https://github.com/espressif/esp-idf/issues/142.

Source: https://github.com/espressif/esp-idf/pull/148

See merge request !289
2016-12-08 10:02:15 +08:00
Neil Kolban dbc5edac7e Removal of spurious newline character in debug statement
There was a debug statement in the code that included an additional newline character that wasn't needed.
2016-12-07 13:57:09 -08:00
tzx 25e4e21226 app_update: clean up warning log when compile any project 2016-12-07 13:49:53 -08:00
Tian Hao 5933ebc6b6 component/bt : cleanup all the "-W-no-xx" and all the warnings
1. cleanup the warnings.
2. fix the some function called in gap
3. fix some code in btc_main
2016-12-07 13:49:53 -08:00
Angus Gratton 94d2f77643 build system: Remove FLAGS_XXX variable option, replace with per-target overrides
Use for targeted disabling of warnings in LWIP.
2016-12-07 13:49:09 -08:00
Angus Gratton b98405f9d9 esp32: ReformatReformat panic.c (remove tabs, etc) 2016-12-07 13:25:56 -08:00
Deomid Ryabkov 20fd57f147 Add backtrace to exception output.
On Xtensa windowed ABI backtrace is easy to do, and it's immensely
useful for debugging, so - do it by default.
We try to be careful and not deref bogus pointers while walking the
frames.

Example output (from debugging espressif/esp-idf#133):

Backtrace: 0x1:0x3ffc51e0 0x400e9dfa:0x3ffc5210 0x400e9ebc:0x3ffc5230 0x400ec487:0x3ffc5260

With just addr2line utility from binutils, this already pinpoints the
location of the crash.
2016-12-07 19:58:06 +00:00
Ivan Grokhotkov 13d802262a cpu_start: disable boot watchdog only after starting the main task
Boot watchdogs were disabled very early in startup code. It was possible to introduce an infinite loop anywhere in the many functions called from startup code, and this would not be detected by interrupt watchdog and task watchdog. This change postpones disabling of boot watchdogs to the point when the scheduler is running. Also replaces register expressed using integer address with a name.
2016-12-08 01:42:37 +08:00
Ivan Grokhotkov b57aecdfe9 uart_tx_wait_idle: fix issue with last character not transmitted
- ROM function uart_tx_wait_idle may have a bug which causes the function to return before the final character is fully transmitted.
  This replaces uart_tx_wait_idle declaration with a static inline definition which fixes the issue.
- Also replaces the use of uart_tx_flush with uart_tx_wait_idle in esp_restart, to remove garbage in console output on restart.
- rtc_printf is temporary replaced with a no-op, pending a new release of librtc.a. Current release assumes that UART0 is used for output,
  and switches UART0 baud rate while doing frequency changes and printing some log output. This doesn’t work if a different UART is used for output.
2016-12-08 01:42:37 +08:00
Ivan Grokhotkov b3f6cd08db support for console redirection to other UART
This change adds a set of menuconfig options to set custom UART#, baud rate, and pins, for console output.
Setting happens in bootloader startup code for PRO CPU, and in application startup code for APP CPU.
Ref. TW8146
2016-12-08 01:42:37 +08:00
Deomid Ryabkov ce8b52617e Zero-fill netif on alloc
Fixes espressif/esp-idf#133
2016-12-07 14:32:29 +00:00
Chu Shu Chen b1db2721dc driver: add rtc module and bugfix gpio32 gpio33
feature(rtc_module):add rtc module

1. add rtc io control API (pull,output and input)
2. add touch pad API (touch pad read and interrupt)
3. add adc1 API (the max width is 12 Bits and support attenuation)
4. add hall sensor API (support hall sensor read )
5. add dac API (the width is 8 Bits)

bugfix(gpio):gpio32 and gpio33 can not output and input

the gpio32 and gpio33 is initialize by librtc.a,and gpio_config not initialize the gpio as
digital gpio.they can not output and input,when users use gpio32 or gpio33.And there are some problems
about others driver ,when they use gpio32 or gpio33 as  matrix.
2016-12-07 15:56:13 +08:00
Ivan Grokhotkov 0dff9ed79d drivers: remove file paths from log statements
Function name and error string are usually sufficient to find the place which has triggered an error. __FILE__ macro generates a string which has absolute file name (with our build system), so there is a lot of long strings present in the program because of that.

Fixes https://github.com/espressif/esp-idf/issues/126
2016-12-07 12:01:54 +08:00
Ivan Grokhotkov 60d7440781 Merge branch 'feature/debugging_fixes' into 'master'
Small debugging fixes

Invoke panic handler when a stack overflow has been detected; unhandled interrupt handler now prints interrupt/cpu number for easier pinning down of source.

See merge request !277
2016-12-07 10:30:17 +08:00
Angus Gratton 9a774848d4 Merge branch 'bugfix/gdbstub_no_sync_gdb' into 'master'
Gdbstub: Fix bug, small cleanup

Tianzhongxing found a small bug preventing gdbstub to work in certain cases. This fixes it, as well as including some minor cleanups.

See merge request !260
2016-12-07 03:20:07 +08:00
Yinling ec40053720 add supported stress test cases to CI 2016-12-06 15:41:02 +08:00
me-no-dev 3cd9cb8911 Fix comment in the header 2016-12-06 02:10:35 +02:00
me-no-dev 2dbae95a7e Fix wrong assignment of channel and unit in pcnt_unit_config 2016-12-06 01:11:32 +02:00
Jeroen Domburg c852e9958b Invoke panic handler when a stack overflow has been detected; unhandled interrupt now prints interrupt/cpu number. 2016-12-05 20:37:59 +08:00
Ivan Grokhotkov c8685c2002 Merge branch 'feature/ulp' into 'master'
Initial support for generation of ULP coprocessor code

This adds basic support for writing ULP coprocessor programs using an assembly-like syntax, with integer labels and branches to labels.

See merge request !261
2016-12-02 22:45:47 +08:00
Liu Zhi Fu 5f47b85b87 freertos: default run program on 1st cpu
Modify the default cpu-mode to single cpu mode and always run the program on the 1st core
2016-12-02 18:17:57 +08:00
Jeroen Domburg 004aadfe70 Fix small bug in gdbstub where it sometimes would not return a valid stop reason, timing out gdb. Also clean up the code a bit. 2016-12-02 17:42:11 +08:00
Liu Zhi Fu 9423390c2e esp32: fix tw6901
1. tw6904 - esp32 mode switch cause exception
2. tw8881 - set mac cause exception
3. Make pm_open/pm_shutdown thread-safe
2016-12-02 17:35:49 +08:00
Angus Gratton ceb8566970 Flash encryption / secure boot: Temporarily disable on-device key generation
Will be enabled after seeding of HWRNG in bootloader is fully tested/qualified.
2016-12-01 23:49:13 -08:00
Angus Gratton a9d5e26748 Secure boot: Correctly re-sign if signing key changes, better error if missing 2016-12-01 23:49:12 -08:00
Angus Gratton 506c8cd964 secure boot & flash encryption: Rework configuration options
Add UART bootloader disable options for flash encryption
2016-12-01 23:49:12 -08:00
Angus Gratton 9eb135fd73 Flash encryption: Support enabling flash encryption in bootloader, app support
* App access functions are all flash encryption-aware
* Documentation for flash encryption
* Partition read/write is flash aware
* New encrypted write function
2016-12-01 23:49:12 -08:00
Ivan Grokhotkov ab3677d64c initial support for generation of ULP coprocessor code 2016-12-01 20:26:47 -08:00
Jiang Jiang Jian bd20288b81 Merge branch 'feature/btdm_bluedroid' into 'master'
Feature/btdm bluedroid

This branch contain the bluedroid host code.
Currently,  Only GAP/GATT SERVER/GATT CLIENT release to users.
Actually, the content of the codes is further more than GAP/GATT and etc.
In this release version, users only need to concern about the APIs which are in "api/include/".

Now, suggestions in comment have been resolved are following:
1. The APIs use callback function. Ivan , Jeroen and me have discussed it. Currently the code will not be changed.
2. The APIs use OPEN/CLOSE. I have ask Ivan, besides bluedroid do this, we will keep the name.
3. Coding style. I have run format.sh to handle the style. And some spell error have been fixed.
4. APIs doxygen. I have clean the warning by doxygen. But bt.rst is still need to be completed.
5. Other comment without resolved face to face that I have to add response in the comment and fix them in the code
6. Fix some incorrect things. See the git log for details.

This 1st version of bluedroid release still have lots of things to do. But it can be done after this merge.
1. Compelete the BLUFI(Bluetooth config wifi connection) documents, security, application protocol and other.
2. Add SPP-LIKE profile.
3. Do more examples codes to cover most of the APIs.
4. Test and fix bug.

Another thing:
1. Do the document of APIs.(xml->bt.rst->html) 
(I will do this before merge as Ivan's suggestion)
This is already done. Besides, the union type in doxygen have something error. Ivan will fix it.



See merge request !239
2016-12-02 12:07:20 +08:00
Tian Hao d925b96daf component/bt : cleanup the function warning in doxygen 2016-12-01 20:55:08 +08:00
Tian Hao 954ffa102f component/bt : add ble event type 2016-12-01 20:16:09 +08:00
Tian Hao bdf4006da7 component/bt : cleanup the return style 2016-12-01 19:58:52 +08:00
shangke e0040af7e5 ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
Tian Hao c6ec70b67b component/bt : cleanup the function comment as doxygen type 2016-12-01 18:58:54 +08:00
Wu Jian Gang c110795718 Merge branch 'feature/tcpip_get_hostname' into 'master'
tcpip_adapter: teamwork 8964

add get netif host name feature

See merge request !264
2016-12-01 16:51:40 +08:00
Wu Jian Gang 099e3030bf Merge branch 'bugfix/init_factory_bin' into 'master'
bugfix/init_factory_bin: fix inconsistency between bootloader and OTA code

init_factory_bin: 2nd bootloader use a wrong logic select factory  image to boot,and some bug in OTA code 

See merge request !266
2016-12-01 16:14:42 +08:00
Wu Jian Gang 60ac08115f Merge branch 'bugfix/ota_doc_error' into 'master'
bugfix/ota_doc_error: fix return error of ota docs

fix doc return error of ota api 

See merge request !265
2016-12-01 16:10:06 +08:00
tzx 9b2cad4174 docs: fix return error of ota docs and fix ota.rst 2016-12-01 13:54:25 +08:00
tzx 2092d14e45 app_update: fix inconsistency between bootloader and OTA code 2016-12-01 13:46:02 +08:00
Xia Xiaotian ad555d68d3 esp32/lwip: add check sleep
1. fix tw8911 sleep in scan leads to auth frame malloc fail.

2. fix tw8913 pm state transfer wrong leads to wdt.

3. make some comments for modem sleep and wpa2 enterprise.

4. removd duplicated debug option ESP_THREAD_SAFE_DEBUG
2016-12-01 13:34:36 +08:00
Tian Hao 281a9c2761 component/bt : fix a code bug 2016-12-01 12:14:57 +08:00
Tian Hao 1abf2c4ed7 component/bt : update lib 2016-12-01 12:05:42 +08:00
Tian Hao ba96c0d2e9 Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf into feature/btdm_bluedroid 2016-11-30 19:08:40 +08:00
Wu Jian Gang 59f3684dee Merge branch 'bugfix/tw8868_fix_packet_length_erro_in_ap_bridge_mode' into 'master'
esp32: update wifi lib to fix tw8868

In AP bridge mode, the length of the forwarded data is wrong, it's 26Btyes longer, thus cuase
AP can't forward the data of which length is 1460. This modification is to make the
data length right.

See merge request !262
2016-11-30 18:01:31 +08:00
liuhan 1b9a4a8139 tcpip_adapter: add get netif host name api 2016-11-30 17:41:19 +08:00
Liu Zhi Fu 144a1567e3 esp32: change wap2 enterprise encrypt type to 5
1. b332f3b5 - change wap2 enterprise encrypt type to 5
2. modify the print info of station state transmition
2016-11-30 17:34:19 +08:00
liuhan 7114f933bb tcpip_adapter: fix bug 7462
modify the code execution condition
2016-11-30 15:24:49 +08:00
Liu Zhi Fu 72453e3e6b esp32: update wifi lib to fix tw8868
In AP bridge mode, the length of the forwarded data is wrong, it's 26Btyes longer, thus cuase
AP can't forward the data of which length is more than 1460. This modification is to make the
data length right.
2016-11-30 14:20:05 +08:00
Wu Jian Gang 527767d31c Merge branch 'bugfix/tw8851_some_phy_cause_wifi_connect_fail' into 'master'
esp32: fix tw8851 some phy version cause wifi connect fail

Update phy version to 258 to fix tw8851
When upgrade the phy version, the RF calibration version is not change, but the calibration data format is changed and the wrong calibration data causes wifi connection failure. The solution is to make RF calibration data and phy version the same version.

See merge request !258
2016-11-29 20:15:30 +08:00
Tian Hao 6010ea713f component/esp32/: update submodule log 2016-11-29 20:07:45 +08:00
Wu Jian Gang f4df733edf Merge branch 'tw8810' into 'master'
lwip: update open socket number.

modify default number from 4 to 10

See merge request !259
2016-11-29 20:06:06 +08:00
Liu Zhi Fu d2c61cae8c esp32: update wifi lib
1. update phy to version 258 to fix wifi upgrade cause wifi connect fail issue
2. update fix_printf.sh
3. fb5a2b07 - default set ps type to WIFI_PS_NONE
2016-11-29 19:46:34 +08:00
Tian Hao 758a9e5f06 component/bt : fix compile error 2016-11-29 19:45:10 +08:00
Tian Hao 4c83238a85 component/bt : fix compile error 2016-11-29 19:25:27 +08:00
Tian Hao 5a9801aca7 Merge branch 'master' into feature/btdm_bluedroid
# Conflicts:
#	components/esp32/cpu_freq.c
#	components/esp32/lib
2016-11-29 18:38:37 +08:00
Tian Hao 5a14e8addf component/bt : use ESP_LOGx instead of printf 2016-11-29 17:42:04 +08:00
Tian Hao 9f33d8f5c0 component/bt : add write type 2016-11-29 17:27:12 +08:00
liuhan f9d2d63e75 lwip: update open socket number.
modify default number from 4 to 10
2016-11-29 16:25:17 +08:00
Tian Hao 3a3d4276f8 component/bt : cleanup the comment and pass all doxygen check 2016-11-29 15:32:29 +08:00
Tian Hao 06e2a1d4e1 component/bt : cleanup a macro 2016-11-29 14:38:58 +08:00
Wu Jian Gang de5279ce6c Merge branch 'feature/fota_ops_api' into 'master'
Add fota ops api

add ota core function implement
1. esp_ota_begin: init ota partition need to be update, output ota handle,every partition need ota should be init firstly 
2. esp_ota_write: write image data to update partition, will record wrote size automatically
3. esp_ota_end: verify image after ota ended
4. esp_ota_set_boot_partition: set next boot partition
5. esp_ota_get_boot_partition: get current running partition

See merge request !256
2016-11-29 13:45:44 +08:00
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
Tian Hao f6de7ea764 component/bt : cleanup status and spell check 2016-11-28 22:40:30 +08:00
Tian Hao 9d9e758756 component/bt : add comment for doxygen
1. use doxygen check api comment
2016-11-28 21:59:04 +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 fc2883a59a lwip: modify according code review
1. Modify tcp window size/send buffer back to 4/2
2. Disable lwip statistics by default
2016-11-28 19:54:22 +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
Tian Zhong Xing 72422b32dc feature/fota_ops_api: add ota core api implement 2016-11-28 17:12:57 +08:00
Tian Hao fd0d28afc3 component/bt : cleanup some missing code 2016-11-28 16:39:53 +08:00
Tian Hao ff8ce12787 component/bt : cleanup the spell && redundant 2016-11-28 14:58:30 +08:00
Tian Hao 1173106a20 component/bt : change task to decease dram(heap)
1. decrease the task size(HCI cannot < 1024, btu cannot < 4096)
2. btc task can config by menuconfig(default 2048)
2016-11-25 23:37:46 +08:00
Tian Hao c9a0b9a45c component/bt : decrese dram
1. decrease some resource
2016-11-25 21:24:16 +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