Commit graph

1456 commits

Author SHA1 Message Date
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
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
Xia Xiaotian
73f4e8b2af wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +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
Angus Gratton
a902e2a9de mbedtls tests: Add additional MPI (bignum), SHA tests 2016-11-25 19:21:49 +11:00
Tian Hao
ac87ddfb05 component/bt : close sdp to free dram
1. free 15K
2016-11-25 15:54:18 +08:00
Xia Xiaotian
16f2b119eb Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/esp32/lib
2016-11-25 15:54:00 +08:00
Wu Jian Gang
7f2c6a9d80 Merge branch 'bugfix/tw8770_fix_socket_memory_leak' into 'master'
lwip: fix socket memory leak issue

1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
    Currently ESP32 support maximum 16 TCP PCBs and all TCP PCB are allocated from heap memory. In some scenario, we may
    have memory leak issue,  for example, the application already created 16 TCP PCB, then it close 5 of them, because the TCP
    state machine, the LWIP core may not free all the 5 TCP PCB immediately, maybe some is in TIME_WAIT status, some is in 
    FIN_WAIT_1 etc. Then the application try to malloc 17th TCP PCB (the application think they just create 12 because they already
    close 5), memp_malloc() will return true because the heap is not out of memory, but actually we got 17 TCP PCB. When the 
    scenario repeat again and again (in our Audio application, it repeat more than 10000 times), more and more TCP PCB will be
    created in the system, each TCP PCB require 200B, then memory leak happen (In Audio application, I saw more than 26 TCP PCB
    are created, and 10*200=2K memory are leaked).

See merge request !223
2016-11-25 13:44:02 +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
Angus Gratton
7a93422089 Merge branch 'bugfix/ledc_divider' into 'master'
ledc: fix reported error when div_param == 256

Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).

Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.

Also added missing error for the unimplemented case of low speed mode.

Reported in https://github.com/igrr/esp32-cam-demo/issues/2

See merge request !247
2016-11-25 10:11:33 +08:00
Jeroen Domburg
7dc322273c Merge branch 'bugfix/ringbuffer_item_return_bug_report_from_chunguang' into 'master'
bugfix: ringbuffer return item api

Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR

See merge request !246
2016-11-25 09:31:20 +08:00
Tian Hao
19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao
d7eb709a9c component/bt : add license header 2016-11-25 01:58:26 +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
Ivan Grokhotkov
5eb2d16acd Merge branch 'bugfix/uart_argument_names' into 'master'
uart: use same argument names in get/set functions

This one is pretty trivial: rename arguments so that same name is used for get and set functions.

https://github.com/espressif/esp-idf/issues/105

See merge request !248
2016-11-24 23:56:35 +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
Tian Hao
b5f03a36d5 component/bt : fix sw coexit call mistake 2016-11-24 20:09:52 +08:00
Tian Hao
55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +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
Tian Hao
7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Tian Hao
e5ceddabac component/bt : change gatt client callback param
1. change the array to point to decrease the memory occupy
2. change the sendindconfirm position
3. fix union lost
2016-11-24 15:17:49 +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
Ivan Grokhotkov
79482bbee7 uart: use same argument names in get/set functions
https://github.com/espressif/esp-idf/issues/105
2016-11-24 13:56:18 +08:00
Ivan Grokhotkov
f60e54497c ledc: fix reported error when div_param == 256
Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).
Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.
Also added missing error for the unimplemented case of low speed mode.
2016-11-24 12:27:32 +08:00
Angus Gratton
7e433ae3f4 Merge branch 'bugfix/uart_isr_rodata' into 'master'
UART driver: Fix crash in ISR due to "UART" static array moved to flash

Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.

See merge request !245
2016-11-24 12:09:46 +08: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
6d502cebe9 bugfix: ringbuffer return item api
Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR
2016-11-24 10:31:27 +08:00
Angus Gratton
79646f41b5 Fixes for stdlib.h inclusion
Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551

rmt.c should include stdlib.h for malloc, esp_bignum,c &
https_request_main.c for abort().

FreeRTOSConfig.h is only including stdlib if
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is
included for abort() so needs to be included whenever
CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.

This change includes unconditionally in FreeRTOSConfig.h. This is to
avoid this kind of bug where compiler errors are dependent on config. I
suggest we don't change this to be more selective until we have 'make
randomconfig' style tests in CI.
2016-11-24 08:20:21 +11:00
Tian Hao
225e31b6de component/bt : change gatt client arg to union
1. decrease the args memory occupy
2. change some macro name
2016-11-23 21:27:05 +08:00
Wangjialin
a97e076dec add pcnt.rst 2016-11-23 19:07:30 +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
7571b8c2e4 driver: PCNT
minor changes
2016-11-23 18:10:45 +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
13e7e69239 remove unexisting tests in unit test CIConfig 2016-11-23 16:22:51 +08:00
antti
ca76f53283 remove fp unit test Kconfig 2016-11-23 16:22:34 +08:00
Tian Hao
85aac3afa6 component/bt : decrease callback cb param size
1. decrease callback cb param size
2. add write in gatt server demo
2016-11-23 15:34:21 +08:00
Xia Xiaotian
f7fb8b264f wpa2 enterprise: update wpa2 enterprise APIs 2016-11-23 15:29:01 +08:00
Tian Hao
9ec0fea8e1 component/bt : gatt arg use union
1. union is 28 bytes for each btc task msg arg
2. as gap, individual arg(not use union) is the best mem occupy.
2016-11-23 13:45:21 +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
antti
83a3ce882f add updated nvs flash test 2016-11-23 11:29:36 +08:00
Angus Gratton
1d05f41a70 UART driver: Fix crash in ISR due to "UART" static array moved to flash
Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.
2016-11-23 10:58:03 +11:00
Angus Gratton
180f4d0929 FreeRTOS: Use C11 _Static_assert to verify static "dummy" structs at compile time
Includes a tweak to make Static_task_t equal size to TCB_t when using
MPU_WRAPPERS . Matches tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE macro
in tasks.c. This isn't actually a bug (if static task allocation is off,
there is no use for Static_task_t), but it allows us to make consistent
compile-time checks that Static_task_t == TCB_t.
2016-11-23 10:22:19 +11: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
Daniel Campora
2a73783bc6 StaticQueue_t needs to have the same size as xQUEUE.
Without this change, building FreeRTOS with static allocation enabled succeeds, but trying to create a queue from a static buffer causes an assert because the size of static and dynamic queues differ.
2016-11-22 22:29:27 +08:00
Ivan Grokhotkov
df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
Tian Hao
6cae05d058 component/bt : change gap btc args to union
1. change gap btc args to union to decrease the dram occupied by btc args
2. actually use individual args for every action is the best way(decrease the dram occupy), but for writing code easily and the style, use union
3. gatt server/client should do the same work
2016-11-22 21:50:26 +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
Tian Hao
db007fbb2e component/bt : clean up the demos
1. cleanup gatt client demo
2. cleanup gatt server demo
3. cleanup blufi demo
4. use correct log level
2016-11-22 20:32:45 +08:00
Wu Jian Gang
d0c9c1de57 Merge branch 'bugfix/tw8727_pc_send_random_pkt_cause_esp32_watchdog' into 'master'
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.

See merge request !233
2016-11-22 19:19:10 +08:00
Tian Hao
190b6d629b component/bt : Config for choose printf
1. add print or ets_print
2. as print format error, add -Wno-error=format
2016-11-22 18:19:55 +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
Tian Hao
595bd2e3c4 component/bt : gatt client fix search service bug
1. fix search service bug
2. delete some print
2016-11-22 17:26:30 +08: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
Wu Jian Gang
e05fe28574 Merge branch 'bugfix/arp_queue_failed' into 'master'
report the arp queue fail result



See merge request !227
2016-11-22 14:45:44 +08:00
Jeroen Domburg
720a6c1e54 Merge branch 'bugfix/gpio_config_pullup' into 'master'
Fix pullups is not configured by gpio_config

https://github.com/espressif/esp-idf/issues/110

https://github.com/espressif/esp-idf/pull/111

See merge request !226
2016-11-22 12:12:31 +08:00
Wu Jian Gang
46c81ded73 Merge branch 'feature/tw8799_low_level_output_optimize' into 'master'
Feature/tw8799 low level output optimize

Fix a potential memory crash error in low_level_output

See merge request !224
2016-11-22 11:56:35 +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
tianzhongxing
cc39b7b286 components/lwip/arp: change the arp dropping packet function
LWIP will drop the oldest package at the arp packet cache queue and return "ERR_OK"
We change it that ARP level will drop the current packet and return "ERR_MEM" to tell user that you should send the packet again latter.
2016-11-22 10:11:52 +08:00
Wangjialin
235eceea06 rmt: add documentation 2016-11-22 01:44:23 +08:00
Wangjialin
6a1dbc3f1c add RMT driver and example 2016-11-22 00:57:19 +08:00
Tian Hao
3b432735c6 component/bt : fix advertising data and refer bug 2016-11-21 22:38:00 +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
Liu Zhi Fu
586c17f831 lwip: remove useless printf info 2016-11-21 16:08:39 +08:00
Yulong
4079d1e008 component/bt : fix hci reassemble bug as cf2d19 2016-11-21 15:11:34 +08:00
Angus Gratton
1d47755588 mbedtls hardware bignum: Use memcpy instead of REG_WRITE/REG_READ in a loop
Removes memory barriers for better performance, thanks Ivan for pointing
this out.

Manually unrolling the loop further seemed like diminishing returns.
2016-11-21 18:09:09 +11:00
Tian Hao
fc6be12a8f component/bt : open privacy support 2016-11-21 15:06:12 +08:00
Liu Zhi Fu
9cc9710a27 lwip: update according to review comments
1. Define memp_malloc/memp_free as static inline function
2. When TCP pcb is out of memory, try to kill PCB in FIN_WAIT_1 when necessary
2016-11-21 15:02:36 +08:00
Tian Hao
4ed6404e9f Merge remote-tracking branch 'remotes/origin/feature/btdm_arch_debug1' into feature/btdm_arch
# Conflicts:
#	components/bt/bluedroid/api/include/esp_gatt_defs.h
#	components/bt/bluedroid/btc/profile/std/gap/btc_gap_ble.c
2016-11-21 14:50:51 +08:00
Xia Xiao Tian
a485af0e2d wpa2: change "station to sta" in wpa2 API 2016-11-21 14:17:52 +08:00
Tian Hao
bf20b958a9 component/bt : fix rsp convert 2016-11-21 12:11:47 +08:00
Gabe
c6016952e8 Pullup is not configured by gpio_config #110 2016-11-21 11:11:13 +08:00
tzx
a8fb9f2b84 ipv6 interface: add branch for ipv6 interface 2016-11-21 11:06:51 +08:00
Liu Zhi Fu
8cd48d9f9c lwip: rework for low_level_output 2016-11-20 17:05:44 +08:00
Yulong
1561c02ba9 component bt:Add stop scan API to the esp_gap_ble API module 2016-11-19 09:56:36 -05:00
Liu Zhi Fu
fa57720cdf lwip: optimize low_level_output
When the parameter pbuf for low_level_output is a list, malloc a new pbuf of
which the length equals to the total length of pbuf and send the new pbuf to L2
2016-11-19 22:25:30 +08:00
Yulong
a76b65ed95 compnent bt:debug the btc_gattc received data error issues. 2016-11-19 08:00:08 -05:00
Liu Zhi Fu
b08113d2b4 lwip: fix CI build issue 2016-11-19 15:14:37 +08:00
Liu Zhi Fu
ab92d43bc6 lwip: fix socket memory leak issue
1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
2016-11-19 14:57:42 +08:00
Tian Hao
0245a2028c component/bt : gatts fix
1. gatt server demo
2. gatt server fix bug(bta btc covert bug)
3. fix print lost
2016-11-18 22:10:35 +08:00
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
Krzysztof
f05cd619f4 Sample cleaning of markup 2016-11-01 01:20:04 +08:00
wangmengyang
124a673a78 component/bt: legacy bt API provide
1. move btif module out of bluetooth stack
2. provide new APIs in bluedroid/stack_api
2016-10-31 21:40:01 +08:00
Liu Zhi Fu
92b663d9f2 lwip: optimize tx flow control
1. Remove tx flow control for TCP
2. Remove tx flow control for UDP temporary
3. Return the error code when call esp_wifi_internal_tx()
2016-10-31 21:26:33 +08:00
Ivan Grokhotkov
abea6c50f1 nvs_flash: delete all duplicate entries in a page while loading
Due to previous flash write bug it was possible to create multiple duplicate entries in a single page.
Recovery logic detected that case and bailed out with an assert.
This change adds graceful recovery from this condition.
Tests included.
2016-10-31 21:10:47 +08:00
Wu Jian Gang
c7f8d206ed Merge branch 'bugfix/tw8242_fix_tcp_rx_abnormal_issue' into 'master'
lwip: fix tcp rx abnormal issue(tw8242)

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

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

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

See merge request !158
2016-10-31 18:09:03 +08:00
Liu Zhi Fu
a5552b1e21 lwip: fix tcp rx abnormal issue(tw8242)
In tcp_alloc(), initialize per_soc_tcp_wnd before initializing recv_wnd because recv_wnd depends on per_soc_tcp_wnd.
2016-10-31 17:50:09 +08:00
Ivan Grokhotkov
e34fc7a46c Merge branch 'bugfix/nvs_leaks' into 'master'
nvs: fix memory leaks in HashList and nvs_close

Fixes TW8162.
Associated test case is run under Instruments on macOS, until I set up valgrind to test this automatically on Linux.

See merge request !150
2016-10-31 17:30:00 +08:00
He Yin Ling
e7cc1aded5 Merge branch 'test/clean_ci_fails' into 'master'
Test/clean ci fails



See merge request !159
2016-10-31 16:37:36 +08:00
Dong Heng
9555ce291e feature/openssl: correct wrong description 2016-10-31 14:13:00 +08:00
Dong Heng
41a91d7cb9 feature/openssl: change the description for docbook 2016-10-31 14:06:29 +08:00
wangmengyang
2d15803f70 component/bt: add new demo for Bluetooth SDP client
1. add Bluetooth SDP client demo;
2. some minor typo fixes
2016-10-31 12:34:11 +08:00
Liu Zhi Fu
f30887bc70 modify comments according to review 2016-10-31 11:17:33 +08:00
Jeroen Domburg
ffeffcd315 Merge branch 'feature/crosscore_int' into 'master'
Add cross-core int to accelerate task being awoken from another CPU.

This adds a per-CPU interrupt that can be used to poke the CPU to go do something. In this case all that is implemented is a request to yield the current task, used in case a CPU unblocks a task that runs on another CPU. This gets rid of the limitation that inter-CPU communication using queues, muxes etc can take up to a FreeRTOS tick to happen.

Specs!
Sending an in in a queue of length 1 (essentially a semaphore) as quickly as possible (just a small delay in the sender, to make sure the receiver task gets swapped out) for 10 seconds. Number indicates the amount of ints transferred

Old code:

CPU0->CPU0: 42986

CPU0->CPU1,: 2999

New code:

CPU0->CPU0: 42868

CPU0->CPU1: 62073

See merge request !155
2016-10-31 11:04:28 +08:00
Jeroen Domburg
90b787636a Remove redundant volatile keyword 2016-10-31 11:00:27 +08:00
Liu Zhi Fu
4f2719236f esp32/tcpip_adapter: softap supports max 10 stations
The max number of stations softap supports is modified from 8 to 10
2016-10-28 16:53:49 +08:00
Ivan Grokhotkov
19c4996bc8 Merge branch 'bugfix/int-wdt-fix' into 'master'
Fix the things that broke when adding the new WDTs

Seemingly, I broke a bunch of things when adding the interrupt WDTs and moved the panic handler to the esp32 directory. This fixes that, as well as the issue where flashing would trigger the int wdt. It also bodges in a fix for a merge artifact breaking the halt-on-first-thread-when-openocd-is-connected; that fix should be refined later.

See merge request !157
2016-10-28 16:21:34 +08:00
Ivan Grokhotkov
5ffd6155f2 set default interrupt watchdog timeout to 300ms
10ms is too low for openocd/gdb to work, so it's not a very useful default value.
2016-10-28 16:17:41 +08:00
Ivan Grokhotkov
0e90983c9f vfs: fix adding CR 2016-10-28 16:16:12 +08:00
wangmengyang
0933339e4b component/bt: add new demo for bluetooth SDP server
1. add bluetooth SDP server demo
2. some minor typo fixes
2016-10-28 15:48:27 +08:00
Wu Jian Gang
95403b8803 Merge branch 'feature/support_max_16_sockets' into 'master'
lwip: support max 16 sockets

Since the customers need more sockets in their application, support max 16 sockets,
in other words, the total socket number of UDP/TCP/RAW sockets should not exceed 16.

See merge request !156
2016-10-28 15:38:57 +08:00
Jeroen Domburg
3cd86d6bce Also call tick hook on app cpu when scheduler is suspended 2016-10-28 14:37:36 +08:00
Dong Heng
78392bf76b components/openssl: change the description
1. change the description of Makefile.projbuild
2. remove the license header in the API document
3. add private inlcuding header code in the components file
2016-10-28 14:32:13 +08:00
Jeroen Domburg
309bd12855 Re-add panic.o to IRAM/DRAM. 2016-10-28 14:32:11 +08:00
yulong
d6db871068 component bt:Change the profile function method to new API 2016-10-28 01:54:42 -04:00
Ivan Grokhotkov
a038a2b533 freertos: fix calling first task hook 2016-10-28 13:41:07 +08:00
Liu Zhi Fu
9e7bc900c5 lwip: rework comments according to review 2016-10-28 13:35:06 +08:00
Liu Zhi Fu
38ff616e4a lwip: add prompt when configure max sockets number in menuconfig 2016-10-28 12:29:26 +08:00
Jeroen Domburg
4d8ad3c877 Fix int wdt iram, fix some fallout of moving panic stuff to esp32 2016-10-28 12:05:42 +08:00
Liu Zhi Fu
305b63209e lwip: support max 16 sockets
Since the customers need more sockets in their application, support max 16 sockets,
in other words, the total socket number of UDP/TCP/RAW sockets should not exceed 16.
2016-10-28 12:03:51 +08:00
Ivan Grokhotkov
dc2b5d0c96 spi_flash: update comment blocks 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
c581229e1d partition API: separate type and subtype into two enums 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
9f0f05d520 spi_flash: change pointer type to void* 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
e03b45eb0a spi_flash: improve documentation 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
e229ec0340 spi_flash: check physical address in mmap against flash chip size 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
b6693225c1 spi_flash: implement partition API, drop trivial wrappers
This implements esp_partition_read, esp_partition_write, esp_partition_erase_range, esp_partition_mmap.
Also removed getters which didn't add much sugar after all.
2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
2c5340d47e spi_flash: change argument types
spi_flash_read and spi_flash_write currently have a limitation that source and destination must be word-aligned.
This can be fixed by adding code paths for various unaligned scenarios, but function signatures also need to be adjusted.
As a first step (since we are pre-1.0 and can still change function signatures) alignment checks are added, and pointer types are relaxed to uint8_t.
Later we will add handling of unaligned operations.
This change also introduces spi_flash_erase_range and spi_flash_get_chip_size functions.

We probably need something like spi_flash_chip_size_detect which will detect actual chip size.
This is to allow single application binary to be used on a variety of boards and modules.
2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
079d9ea018 spi_flash: implement partition API 2016-10-27 17:58:42 +08:00
Ivan Grokhotkov
999e6d4e8f freertos: move panic handler data to DRAM
Fixes https://ezredmine.espressif.com/issues/7817
2016-10-27 17:57:29 +08:00
Ivan Grokhotkov
42068c3b36 spi_flash: implement mmap/munmap 2016-10-27 17:57:29 +08:00
Ivan Grokhotkov
54ca573ce4 spi_flash: move cache operations into separate file 2016-10-27 17:57:29 +08:00
Ivan Grokhotkov
628bde2080 bootloader: move useful structures to esp32 component 2016-10-27 17:57:29 +08:00
Ivan Grokhotkov
f6f23141b3 components/spi_flash: add high level partition api header
TW6701
2016-10-27 17:57:29 +08:00
Ivan Grokhotkov
6f1d3ce4a7 vfs: code review fixes
- fix typo in readme
- remove unneeded extern declaration
- fix header guard macro
- tabs->spaces in syscalls.c
- spaces->tabs in tasks.c
2016-10-27 17:25:38 +08:00
Ivan Grokhotkov
da56e76255 vfs: add readme file 2016-10-27 17:22:47 +08:00
Ivan Grokhotkov
7e201c5527 vfs and newlib: small fixes
- spaces->tabs in tasks.c
- update vfs_uart.c to use per-UART locks
- add license to vfs_uart.c
- allocate separate streams for stdout, stdin, stderr, so that they can be independently reassigned
- fix build system test failure
- use posix off_t instead of newlib internal _off_t
2016-10-27 17:22:18 +08:00
Ivan Grokhotkov
0c130ecf19 vfs: code review fixes
- fix typo in readme
- remove unneeded extern declaration
- fix header guard macro
- tabs->spaces in syscalls.c (+1 squashed commit)
- fix minor typos
2016-10-27 17:21:17 +08:00
Ivan Grokhotkov
b3b8334d54 vfs and newlib: small fixes
- spaces->tabs in tasks.c
- update vfs_uart.c to use per-UART locks
- add license to vfs_uart.c
- allocate separate streams for stdout, stdin, stderr, so that they can be independently reassigned
- fix build system test failure
2016-10-27 17:19:39 +08:00
Ivan Grokhotkov
587360363c vfs: add UART device
This should be integrated with UART driver once everything is merged
2016-10-27 17:18:43 +08:00
Ivan Grokhotkov
401f6e4713 vfs: initial version of virtual filesystem API 2016-10-27 17:18:43 +08:00
Ivan Grokhotkov
38c6256db9 Merge branch 'feature/wdts' into 'master'
Feature/wdts

This adds two watchdogs to  esp-idf:

- An interrupt watchdog. Kicks in if the FreeRTOS timer interupt on either the PRO_CPU or (when configured) the APP CPU isn't called for a configurable time. Panics, displaying which CPU caused the problem and the registers that may lead to the offending code.
- A task watchdog. A task has to feed it every once in a while. If not, it will print the name of the offending tasks, as well as the tasks currently running on both CPUs, and optionally panic.

Also adds a panic reason to the panic call, as well as fixes the panic code a bit.

See merge request !148
2016-10-27 17:09:35 +08:00
Jeroen Domburg
68f39c1ed9 Only init crosscore when FreeRTOS runs in multicore mode, add warnings that cross_int calls are private. 2016-10-27 16:50:28 +08:00
Jeroen Domburg
b14faabfda Merge latest master in 2016-10-27 16:18:55 +08:00
Jeroen Domburg
3371083c16 Add checks for tasks woken up on other CPUs where needed, make xYieldPending and xPendingReadyList per-processor, add configurable ISR stack size to Kconfig, in general fix the entire wake-up-task-on-other-cpu-by-interrupt implementation 2016-10-27 16:07:47 +08:00
Wu Jian Gang
84c2e61b12 Merge branch 'feature/refractor_for_lwip' into 'master'
lwip: refactoring for lwip

1. All espressif specific code are prefix with ESP_
2. Define all ESP_ options in lwipopts.h
3. Remove useless code added in 8266

See merge request !154
2016-10-27 15:47:18 +08:00
Liu Zhi Fu
6e6e51426f lwip: refractor for lwip
1. All espressif specific code are prefix with ESP_
2. Define all ESP_ options in lwipopts.h
3. Remove useless code added in 8266
2016-10-27 14:11:01 +08:00
Ivan Grokhotkov
50bd28353d Merge branch 'master' into feature/freertos_static_buffers 2016-10-27 12:38:35 +08:00
Ivan Grokhotkov
329ad14b8c esp32: update libs for changes in FreeRTOS header files 2016-10-27 12:37:34 +08:00
Jeroen Domburg
c6477ff10d Fix int clear, actually call int init code 2016-10-27 12:37:19 +08:00
Jeroen Domburg
ff6b8addd9 Fix panic config ifdefs, un-stall app cpu on boot so it restarts after panic 2016-10-27 11:17:24 +08:00
Liu Zhi Fu
e0f49c2221 esp32: add esp_wifi_sta_get_ap_info
The customers need to get information about AP that associated with ESP32 station,
these information includes RSSI, channel number etc, so add this new API
2016-10-27 10:42:01 +08:00
Jeroen Domburg
fd887dbeea Merge remote-tracking branch 'origin/master' into feature/wdts 2016-10-27 10:25:23 +08:00
Wu Jian Gang
8dcd78d52f Merge branch 'feature/refractor_for_some_wifi_APIs' into 'master'
Feature/refractor for some wifi ap is

    1. Modify esp_wifi_get_station_list to esp_wifi_ap_get_sta_list
    2. Modify tcpip_adapter_get_station_list to tcpip_adapter_get_sta_list
    3. Remove esp_wifi_free_station_list
    4. Remove tcpip_adapter_free_station_list
    5. Modify related data struct accordingly
    6. Move soft watchdog from wifi lib to IDF

See merge request !152
2016-10-27 10:08:32 +08:00
Jeroen Domburg
6d54fb004d Change inline to static inline functions. Ref Github issue 62. 2016-10-27 09:17:04 +08:00
Jeroen Domburg
5642a8061e Merge branch 'feature/add_per_socket_tcp_window' into 'master'
components/lwip - add per socket tcp window

Add code to support per socket tcp window and tcp send buffer size configuration.

See merge request !145
2016-10-26 23:39:36 +08:00
liuzhifu
df1c2f0da5 components/esp32: refractor according to review comments
modify esp_wifi_kick_sta to esp_wifi_deauth_sta
2016-10-26 21:50:15 +08:00
Jeroen Domburg
d3d9a8bc28 Most code written. Interrupts still do not fire yet. 2016-10-26 21:09:55 +08:00
yulong
5ede46f213 component bt:Change the profile & app interface to new API 2016-10-26 08:19:48 -04:00
liuzhifu
750d6faf51 esp32/tcpip_adapter: rework according to review comments
1. Modify sta to station in comments
2. Modify esp_wifi_get_ap_num to esp_wifi_scan_get_ap_num
3. Modify esp_wifi_get_ap_list to esp_wifi_scan_get_ap_records
2016-10-26 20:02:39 +08:00
liuzhifu
345cf333a8 components/esp32: udpate wifi lib
1. cc5a5e29 - refractor for some wifi APIs
2. 8d787147 - move soft wdt to idf
2016-10-26 18:18:58 +08:00
liuzhifu
3cca62dfa4 esp32/tcpip_adapter: refractor for some wifi APIs
1. Modify esp_wifi_get_station_list to esp_wifi_ap_get_sta_list
2. Modify tcpip_adapter_get_station_list to tcpip_adapter_get_sta_list
3. Remove esp_wifi_free_station_list
4. Remove tcpip_adapter_free_station_list
5. Modify related data struct accordingly
2016-10-26 18:16:40 +08:00
Tian Hao
45638b3f98 component/bt : use LOG_XXX instead of print 2016-10-26 15:57:40 +08:00
Jeroen Domburg
9546ad5b5e Move write key and stage action select constants into headers 2016-10-26 14:54:50 +08:00
liuzhifu
a90217e201 components esp32/lwip: modify code according to review comments
1. Modify comments for esp_wifi_internal_tx
2. Fix delay time error in esp32_tx_flow_ctrl which is found in code review,
   modify _wait_delay init value from 0 to 1
2016-10-26 14:09:54 +08:00
liuzhifu
48301909eb components/esp32: update wifi lib
6ce01d76: rename some wifi internal APIs
aa4d2aa9: last rx buffer is reserved for mgmt frame
bb0ff4a8: tw7775 fix assert when rx auth frame before create bss
2016-10-26 13:53:00 +08:00
liuzhifu
612aaa69e4 lwip/esp32: move the extern wifi calls into esp_wifi_internal.h
1. Add esp_wifi_internal.h
2. Rename system_pp_recycle_rx_pkt to esp_wifi_internal_free_rx_buffer
3. rename esp_wifi_tx_is_stop to esp_wifi_internal_tx_is_stop
4. rename ieee80211_output to esp_wifi_internal_tx
2016-10-26 13:23:35 +08:00
Ivan Grokhotkov
74a658c765 nvs: fix memory leaks in HashList and nvs_close
Fixes TW8162.
Associated test case is run under Instruments on macOS, until I set up valgrind to test this automatically on Linux.
2016-10-26 12:25:53 +08:00
Jeroen Domburg
bb1efe50c3 Remove superfluous backup files 2016-10-26 12:23:35 +08:00
Jeroen Domburg
7d254eb3f0 Move panic handler and gdbstub into esp32 component, clean up wdt according to merge req suggestions 2016-10-26 12:23:01 +08:00
wangmengyang
47d73dfe05 component/bt: implement some APIs for bluetooth SDP, GAP and stack manager
1. add bt profile task(temporarily called btif task)
2. add GAP API to set BT scan mode
3. port btif/SDP module
4. port btif stack manager
2016-10-26 11:25:24 +08:00
Jeroen Domburg
1ca97f5adb Move panic handler code from FreeRTOS to esp32 component 2016-10-26 11:06:53 +08:00
Jeroen Domburg
6f96b23989 Merge in master updates 2016-10-26 11:04:42 +08:00
Jeroen Domburg
06bff71481 Add licenses, docbook, general cleanup 2016-10-25 18:18:11 +08:00
Jeroen Domburg
89f7752cdd Make CPU1 int wdt / idle task wdt configurable, panic now properly disables other cpu, tick handler now also is called on cpu1, task wdt prints currently running tasks. 2016-10-25 18:08:55 +08:00
yulong
78d1fd5306 component bt:Added the BLE scan API to the bt project 2016-10-25 05:07:36 -04:00
Jeroen Domburg
75a11589a1 Disable brown-out WDT, fix thread WDT, add panic reason indication to _xt_panic() 2016-10-25 17:05:13 +08:00
Tian Hao
20d33d636b component/bt ; add notify 2016-10-25 15:05:08 +08:00
Wu Jian Gang
cbb26c9532 Merge branch 'bugfix/tw7458_dhcps_wrong_after_mode_switch' into 'master'
component/tcpip_adapter: not update dhcps status when it is stopped after mode switch

When switch the mode from WIFI_MODE_STA/WIFI_MODE_NULL to WIFI_MODE_AP/WIFI_MODE_APSTA,
if the dhcp server is STOPPED, then dhcp server will not start automatically.

See merge request !147
2016-10-25 11:03:34 +08:00
liuzhifu
700ed63651 component/tcpip_adapter: not update dhcps status when it is stopped after mode switch
When switch the mode from WIFI_MODE_STA/WIFI_MODE_NULL to WIFI_MODE_AP/WIFI_MODE_APSTA,
if the dhcp server is STOPPED, then dhcp server will not start automatically.
2016-10-25 09:26:10 +08:00
Jeroen Domburg
d7ea61734b Tabs -> spaces 2016-10-24 21:25:48 +08:00
Jeroen Domburg
d9005e739d Add bytebuffer support to ringbuf.c 2016-10-24 21:18:02 +08:00
Tian Hao
8e247f3b4c component/bt : delete extra GATTAPP_REGISTER 2016-10-24 20:07:19 +08:00
Yinling
3edcf5b096 fix bug for case WIFI_CONN_0102:
after set AP, STA will disconnected and do reconnect. scan could fail as reconnect also use scan
2016-10-24 18:59:56 +08:00
Yinling
abd4dc7d43 add know issue ^WIFI_CONN_0601:
in STA+AP mode, when STA reconencting to enternal AP, external STA can't connect to AP
2016-10-24 18:42:40 +08:00
Tian Hao
5fbfa2a01d blufi cleanup the bad things 2016-10-24 17:08:37 +08:00
wangmengyang
be11f598bf component/bt: fix logging format for some source files of BTM module 2016-10-24 16:17:55 +08:00
Wangjialin
74aff2b9d2 Update UART driver
1. Use esp_log API for LEDC and GPIO code.
2. Modify some API return value.
3. Add ledc_set_pin() for LEDC
4. Modify typo in uart.h

Questions: In uart driver ISR handler, I used xxxFromISR , like xSemaphoreGiveFromISR, do those FromISR functions need to be put in IRAM?
2016-10-24 15:57:23 +08:00
Angus Gratton
f988dc9587 Merge branch 'bugfix/esptool_write_protect' into 'master'
Fix flash write protect bug

As reported in github #50 and on forum.

Incorporates other esptool.py changes:
197ba605...5c6962e8


See merge request !144
2016-10-24 09:58:46 +08:00
Wangjialin
9098e64398 modify GPIO number check 2016-10-24 09:38:34 +08:00
Wangjialin
288f4f63f0 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
2016-10-24 09:17:10 +08:00
liuzhifu
60fb9a8c81 components/lwip - add per socket tcp window
Add code to support per socket tcp window and tcp send buffer size configuration.
2016-10-23 00:49:41 +08:00
Jeroen Domburg
ae5c563080 Brownout works (in as far brownout can work...), int wdt works. 2016-10-21 19:30:29 +08:00
Jeroen Domburg
beff3aab81 Merge branch 'feature/trax' into 'master'
Feature/trax

Add Trax support to esp-idf. OpenOCD already has trax support, this allows an esp-idf program to also trigger this when needed. Also included: some more logic to correctly reserve memory blocks for Trax.

See merge request !73
2016-10-21 18:16:12 +08:00
Jeroen Domburg
2b8a493659 Add licenses to Trax files 2016-10-21 18:01:20 +08:00
Jeroen Domburg
53146799a0 Initial addition of wdt and brownout code 2016-10-21 17:59:57 +08:00
wangmengyang
063e9e8287 component/bt: Merge branch 'feature/btdm_bluedroid' into feature/bt_gap 2016-10-21 15:19:39 +08:00
wangmengyang
2c0ceb484b component/bt: Bluedroid BTA/SDP module is ported 2016-10-21 15:12:22 +08:00
Angus Gratton
1413ec3ff0 Remove SPIUnlock from linker script symbols
Add a comment about why it was removed and where it went.
2016-10-21 17:50:37 +11:00
Angus Gratton
f37e70ebd6 Bootloader: Export IS_BOOTLOADER_BUILD during make process 2016-10-21 17:50:37 +11:00
yulong
94442708f5 component bt:added the advertising & scanning API to the bt project 2016-10-21 02:16:01 -04:00
Angus Gratton
8e8caca2e2 Replace ROM SPIUnlock function with a version that can't lock flash
Avoid bug where a bad status read is copied back to flash and can set
lock bits.
2016-10-21 16:12:51 +11:00
Ivan Grokhotkov
42827ff869 bootloader, menuconfig: add flash size setting support 2016-10-21 15:27:25 +11:00
Angus Gratton
7104284e31 Bump esptool version
Incorporates fix for locked flash #50
2016-10-21 15:26:11 +11:00
Ivan Grokhotkov
4f704ac2fe Merge branch 'feature/release_build' into 'master'
Add menuconfig setting for optimization level

This change adds two options (Debug/Release) for optimization level.
- Debug (default) enables -O0
- Release enables -Os and adds `-DNDEBUG`, which removes all assert() statements

These options may be overriden at project level by adding necessary flags to CFLAGS/CXXFLAGS.

Debugging symbols are kept in both cases, although we may add an option to strip output file if necessary.

Also we used to define all common compiler flags in CPPFLAGS, and then prepended them to CFLAGS/CXXFLAGS.
It made it impossible to add preprocessor macros to CPPFLAGS at component level (one had to use CFLAGS/CXXFLAGS instead).
Some third party libraries are not compatible with this approach. Changed to the more common way of using these variables.

CI will build both debug (default) and release.


See merge request !138
2016-10-21 10:56:03 +08:00
Angus Gratton
feca308f1f rom/spi_flash.h: Remove first parameter of SPI_read_status_high()
Corrects the prototype to match the one compiled into ROM.
2016-10-21 10:44:05 +11:00
Yinling
d3d8c04535 add known issue exception when setting mac address:
WIFI_ADDR_0101,^WIFI_ADDR_0101
2016-10-20 16:43:04 +08:00
Angus Gratton
0704deca63 Merge branch 'bugfix/build_dir_base' into 'master'
Build system: Fix BUILD_DIR_BASE out of tree

See github issue https://github.com/espressif/esp-idf/issues/38

See merge request !130
2016-10-20 13:58:48 +08:00
Yinling
5e8849d032 modify TCPIP_DHCP_0211:
delay 30s to make sure STA got enough time to disconnect and reconnect.
2016-10-20 11:28:06 +08:00
Jeroen Domburg
2d393f0530 Change inline assembly bits from macros to inline functions 2016-10-20 11:23:59 +08:00
Yinling
c350972eac update following know issues:
1. ^WIFI_CONN_0801: auth change event not correct
2. WIFI_SCAN_0303: scan interact with JAP not correct
3. ^WIFI_SCAN_0103,^WIFI_SCAN_0105: no scan done event
4. ^TCPIP_UDP_0304,TCPIP_UDP_0104: UDP poor performance
2016-10-19 20:22:43 +08:00
Yinling
18ebc6411e fix bug for WIFI_SCAN_0304: need to set AP config first 2016-10-19 18:03:43 +08:00
Yinling
6eaf595a0e change test WAN server URL:
form iot.espressif.cn to factory.espressif.cn
2016-10-19 18:00:27 +08:00
Yinling
0324373cd1 update auto generated CI job config 2016-10-19 15:23:07 +08:00
Yinling
c2b63a614e sync test env from auto_test_script (add SSC_T5_IOT1) 2016-10-19 15:22:13 +08:00
Yinling
de7b2f5a09 fix following test case bugs:
1. (^)TCPIP_DHCP_0101, (^)TCPIP_DHCP_0301: IDF set IP 0.0.0.0 may return error, don't check the result of setting IP to 0.0.0.0;
2. rename (^)TCPIP_DHCP_0102 to (^)TCPIP_DHCP_0212 as it's a DHCP server test case;
3. (^)TCPIP_TCP_0204,(^)TCPIP_TCP_0210,(^)TCPIP_UDP_0201,(^)TCPIP_UDP_0202: recv thread can't be deleted, change case to not create recv thread when create socket ;
4. (^)TCPIP_TCP_0206,(^)TCPIP_TCP_0212:  query TCP server status format changed.
5. WIFI_SCAN_0301: check command error and test environment not correct
6. WIFI_SCAN_0302, WIFI_SCAN_0303, WIFI_SCAN_0304: test environment not correct
2016-10-19 15:16:47 +08:00
Yinling
3f521c4afa update KnowIssues:
1. unsupported cases by "phy" command
2. DHCP server behavior different from ESP8266
3. TCP failed cases causes by unstable TCP behavior
4. UDP failed cases by poor UDP performance
2016-10-19 15:11:38 +08:00
yulong
fcf664276f component bt:added the stop adverstising API to the BTA module 2016-10-19 01:55:14 -04:00
Angus Gratton
da70611196 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
2016-10-19 15:58:37 +11:00
Tian Hao
24df5e2041 component/bt : cleanup ^M
someone use editor in windows, so use "LF" in your editor, please.
2016-10-18 21:49:00 +08:00
yulong
2182b69b3d component bt:added the button profile event & process method to the project 2016-10-18 05:22:36 -04:00
Angus Gratton
90cad92b9b Merge branch 'master' into bugfix/build_dir_base 2016-10-18 15:30:57 +11:00
Jeroen Domburg
340a722715 Warn user if trax is disabled in menuconfig but functions are called anyway. 2016-10-18 11:50:19 +08:00
Jeroen Domburg
d00ef1607e Some more optimizations, mostly in involuntary task switches. Doesn not really help here, but might in other cases. 2016-10-18 10:51:08 +08:00
wangmengyang
9476dc2eb8 components/bt: Merge branch 'feature/wechat_prf' into feature/btdm_bluedroid
warning: example 07 has complier errors;

# Conflicts:
#	components/bt/bluedroid/profiles/esp/ble_button/button_pro.c
#	components/bt/bluedroid/stack/btu/btu_init.c
2016-10-17 23:06:33 +08:00
Jeroen Domburg
6a7ec425cb Detect success before errors in vPortCPUReleaseMutex. Shaves off another half uS. 2016-10-17 18:49:19 +08:00
Jeroen Domburg
c03549e117 Make uxPortCompareSet into a macro. 25uS -> 24uS 2016-10-17 18:30:13 +08:00
Jeroen Domburg
0403d43b19 Optimize xPortGetCoreID to 2-instruction inline assembly. 2016-10-17 18:09:15 +08:00
Ivan Grokhotkov
8f82a83c2c Merge branch 'master' into feature/freertos_static_buffers 2016-10-17 16:02:09 +08:00
Tian Hao
28fa3c1a70 component/bt : new coexist lib
change boot loader.ld , the 0x40098000 may set other instructions
2016-10-17 15:47:45 +08:00
yulong
2fdd9ba930 component bt:change the hid profile & bt_profile task 2016-10-17 02:15:36 -04:00
Ivan Grokhotkov
eaace9846a smartconfig: update to match new FreeRTOS header files 2016-10-17 14:12:16 +08:00
Tian Hao
bee1be67da Merge branch 'feature/btdm_blufi' into feature/btdm_bluedroid 2016-10-17 14:11:49 +08:00
Ivan Grokhotkov
1cd572c7b9 Add test for compiling in release mode, fix warnings and errors which appeared 2016-10-17 13:40:10 +08:00
Ivan Grokhotkov
182184567e build system: add menuconfig choice for optimization level, reorganize C*FLAGS
This change adds two options (Debug/Release) for optimization level.
Debug enables -O0, release enables -Os and adds -DNDEBUG (which removes all assert() statements).
Debugging symbols are kept in both cases, although we may add an option to strip output file if necessary.
Also we used to define all common compiler flags in CPPFLAGS, and then appended them to CFLAGS/CXXFLAGS.
It makes it impossible to add preprocessor macros to CPPFLAGS at component level (one has to use CFLAGS/CXXFLAGS instead).
Some third party libraries are not compatible with this approach. Changed to the more common way of using these variables.
2016-10-17 12:38:17 +08:00
Jeroen Domburg
0aab006bb7 Add Trax-support to esp-idf 2016-10-17 12:18:17 +08:00
yulong
7cb55c2c6c component bt: added the WX_AIRSYNC_CFG macro to control the wechat profile 2016-10-16 23:54:22 -04:00
Tian Hao
3ed2d89538 Merge branch 'master' into feature/btdm_blufi
# Conflicts:
#	components/bt/component.mk
2016-10-16 18:59:04 +08:00
Tian Hao
f87ebb6d49 Merge branch 'feature/btdm_blufi' into feature/btdm_bluedroid
# Conflicts:
#	components/bt/bluedroid/stack/btu/btu_task.c
2016-10-16 17:08:05 +08:00
Tian Hao
3ecce07dbc component/bt: cleanup phy/rtc/pp libs 2016-10-16 16:50:02 +08:00
yulong
1a08abea78 component bt:1.update the BLE hid to the project
2.update the app adverting method
2016-10-15 06:28:54 -04:00
yulong
02ad223eea component bt: 1.modified the btu buffer size from 15 to 60;
2.change the smp method
2016-10-15 05:46:10 -04:00
yulong
982b90e77d commponent bt: update the components/bt/lib & components/esptool_py/esptool 2016-10-15 04:42:33 -04:00
Ivan Grokhotkov
4370794d07 wifi libraries: update to match new FreeRTOS header files 2016-10-14 21:52:43 +08:00
Ivan Grokhotkov
72712c00a7 freertos: forward task affinity argument to prvInitializeNewTask 2016-10-14 21:24:58 +08:00
yulong
f68c8dd687 commponant bt:change bt_app_main to app_main 2016-10-14 04:44:56 -04:00
yulong
af9b08d863 commponent bt:1.added the bt_prf_sys_main.c file which has been process the profile task event method;
2.modified the thread.h file==> added the profile task event in it
	      3.modified bt_prf_task.c==>added the ready function in it
	      4.added the bt_prf_sys.h file
	      5.remove the profile_sys.h file
2016-10-13 09:13:21 -04:00
Wu Jian Gang
216b831646 Merge remote-tracking branch 'origin/master' into feature/openssl 2016-10-13 17:14:40 +08:00