Commit graph

2637 commits

Author SHA1 Message Date
Ivan Grokhotkov f59f13efd5 examples: remove nvs_flash_init from examples which do not use NVS 2017-03-14 22:03:40 +08:00
Ivan Grokhotkov 94b9898ca7 phy_init: move NVS init into relevant function, check errors
This change also modifies logging statements to print hexadecimal error codes, which are easier to look up.
2017-03-14 22:03:39 +08:00
Ivan Grokhotkov 5a23ec4dc4 nvs: check that storage has at least one free page
This change adds a check for the free page count to nvs_flash_init.
Under normal operation, NVS keeps at least one free page available,
except for transient states such as freeing up new page. Due to external
factors (such as NVS partition size reduction) this free page could be
lost, making NVS operation impossible. Previously this would cause an
error when performing any nvs_set operation or opening a new namespace.
With this change, an error is returned from nvs_flash_init to indicate
that NVS partition is in such a state.
2017-03-14 22:03:39 +08:00
Ivan Grokhotkov 817bbb4bf9 nvs: add missing error code descriptions 2017-03-14 22:03:39 +08:00
Ivan Grokhotkov 577290aaba Merge branch 'bugfix/mdns_security_issues' into 'master'
Bugfix/mdns security issues

Fixes a series of security issues with MDNS.

STACK-SMASH: dd3f18d2d8/components/mdns/mdns.c (L494):
The sprintf is not limited. We can execute the sprintf codeflow as
many times as we want, allowing arbitrary long data being written
into stack.

PACKET-OF-DEATH:
dd3f18d2d8/components/mdns/mdns.c (L502).
The compare allows equal, and thus jumping back to it self infinite
recursion -> guaranteed crash

TXT-SMASH: dd3f18d2d8/components/mdns/mdns.c (L1381)
The loop does not check on reaching a->txt maximum size (1024),
resulting in stack overflow.


See merge request !576
2017-03-14 21:42:06 +08:00
wangmengyang a96df34d9b component/bt: recover the BLE buffer size macros 2017-03-14 21:00:58 +08:00
me-no-dev c89e11c8fa address security issues with mDNS 2017-03-14 10:08:38 +02:00
wangmengyang 6cb9985e5d component/bt: merge the HCI packet reassemble logic modification 2017-03-14 15:34:56 +08:00
Ivan Grokhotkov a9ed6d5a24 Merge branch 'bugfix/make_test_components' into 'master'
make: don’t override TEST_COMPONENTS

When idf_monitor is launched from make, it gets modified `TEST_COMPONENTS`
variable which contains full paths to the test components instead of the
names. This causes `TEST_COMPONENT_PATHS` to be empty and the unit test
app gets built without any test components.

This change introduces an internal `TEST_COMPONENTS_LIST` variable which
gets set either from `COMPONENTS` if `TESTS_ALL` is 1, or from
`TEST_COMOPONENTS` otherwise.
Bootloader makefile is also fixed to avoid propagating `TESTS_ALL` to the
bootloader build step.

See merge request !569
2017-03-14 15:16:51 +08:00
Ivan Grokhotkov 10f6f234ff Merge branch 'bugfix/fix_uart_stop_bit_2bit_error' into 'master'
bug fix: fix uart data bug when stop-bit is set as 2-bit mode

This is a workaround for a hardware bug.
When we want to use 2-stop-bit mode, we need to set stop-bit-1 and set dl1_en in rs485 register.

See merge request !544
2017-03-14 14:17:55 +08:00
Angus Gratton 2156408d45 Merge branch 'feature/aws_iot_sdk' into 'master'
Amazon AWS IoT SDK

Amazon IoT SDK component, plus two examples derived from their Linux samples.


See merge request !132
2017-03-14 10:21:08 +08:00
Liu Zhi Fu 67aabbff8f esp32: update wifi lib for some bugfix/features
1. add options to disable nvs
2. add station keepalive with softap
3. fix beacon rx start time not accurate issue
4. set wifi rx desc/buffer boundary check to internal memory boundary
2017-03-14 10:14:26 +08:00
wangmengyang 17696bc679 component/bt: resolve the differences with ESP-IDF master branch 2017-03-13 21:28:53 +08:00
Angus Gratton da660b234c AWS IoT Device SDK Support
Use device cert/key embedded in firmware, or loaded from filesystem.
2017-03-13 17:23:29 +08:00
wangmengyang 383db0dc81 Merge branch 'master' into feature/btdm_avrc 2017-03-13 16:21:41 +08:00
Neil Kolban 16e1a2716e mbedtls port: Fix detection of EWOULDBLOCK/EAGAIN with non-blocking sockets
Previous code read non-blocking status via fcntl first, which resets errno.

Closes #424 https://github.com/espressif/esp-idf/pull/424
Merges #425 https://github.com/espressif/esp-idf/pull/425
2017-03-13 15:45:11 +08:00
Angus Gratton 5ddd229b95 Merge branch 'bugfix/unit_test_app_print_tests_in_correct_order' into 'master'
Fix unit test app to print tests in the same order they are given in test file

This fixes the unit test app to print test cases in the same order they are given in test file. 

See merge request !460
2017-03-13 15:43:01 +08:00
wangmengyang d101f2113b component/bt: code clean up for btc_media_task
1. remove unused macros variables and functions
2. modify the implementation of API "esp_a2d_register_data_callback" to post messages to BTC task.
2017-03-13 14:54:02 +08:00
antti 1e2c5cc151 fix unit test app to print tests in the same order they are given in files 2017-03-13 12:06:49 +08:00
Angus Gratton 1544544f8a tools: New idf_monitor 'make monitor' tool for smarter monitor output 2017-03-13 09:31:45 +08:00
Wangjialin 5d5b625d0e bugfix: fix uart 2-stop-bit error
Fix uart data bug when stop-bit is set as 2-bit mode.
This is just a software workaround.
2017-03-12 11:38:14 +08:00
Chu Shu Chen 194d4e9ffd fix(touch_pad): modify touch pad read function and touch_pad_deinit
The touch pad read function taks too much time within spin lock waiting for the "done bit". (about 7.6ms as we tested)
So we try to use a mutex on the touch read function and any other functions might change the "done bit".
2017-03-11 11:42:44 +08:00
Ivan Grokhotkov 47d3759474 Merge branch 'bugfix/adv_type_error' into 'master'
component/bt: modify BLE advertising type error

fix BLE advertising type error

See merge request !568
2017-03-10 14:16:33 +08:00
Jeroen Domburg dc6c19f560 Merge branch 'feature/tighter_rom_memory_defines' into 'master'
Use more regions reserved for ROM routines/stack we don't use for heap.

This frees up about 28K of RAM.

See merge request !467
2017-03-09 20:25:07 +08:00
wangmengyang 878b85c421 component/bt: update with bugfix that media task failed. 2017-03-09 20:16:10 +08:00
Jeroen Domburg 17a4a2527d MR things 2017-03-09 19:59:09 +08:00
Ivan Grokhotkov 61c33ca24e make: don’t override TEST_COMPONENTS
When idf_monitor is launched from make, it gets modified TEST_COMPONENTS
variable which contains full paths to the test components instead of the
names. This causes TEST_COMPONENT_PATHS to be empty and the unit test
app gets built without any test components.

This change introduces an internal TEST_COMPONENTS_LIST variable which
gets set either from $(COMPONENTS) if TESTS_ALL is 1, and from
TEST_COMOPONENTS otherwise.
Bootloader makefile is also fixed to avoid propagating TESTS_ALL to the
bootloader build step.
2017-03-09 19:43:39 +08:00
wangmengyang 5b7b704365 component/bt: format the API headers 2017-03-09 19:03:34 +08:00
island 123b6f88dc component/bt: modify BLE advertising type error 2017-03-09 15:36:22 +08:00
Jiang Jiang Jian cd4e4fb351 Merge branch 'feature/wifi_deinit_2' into 'master'
wifi deinit: update esp_wifi_deinit()

1. move ets_timer_deinit() to wifi_deinit()

2. delete wifi api mutex when wifi deinit

See merge request !563
2017-03-09 15:35:36 +08:00
Ivan Grokhotkov 045aa45731 Merge branch 'bugfix/btdm_gatt_attribute_table_debug' into 'master'
bt component: fix bluetooth gatt packets process bugs

1. Add process of prepare write request packets
2. Add process of execute write request packets
3. Add process of reliable write request packets
4. Fix bug of processing read blob request packets
5. Fix bug of processing write request packets
6. Optimize error check and process in stack

See merge request !558
2017-03-09 13:28:11 +08:00
Angus Gratton 36feac0d25 Merge branch 'bugfix/wakeup_gpio_doc' into 'master'
deep sleep: add notice that pads used for wakeup will be configured as RTC GPIOs

Closes https://github.com/espressif/esp-idf/issues/245

See merge request !431
2017-03-09 07:34:33 +08:00
Ivan Grokhotkov 48516fded2 deep sleep: add notice that pads used for wakeup will be configured as RTC GPIOs
Closes https://github.com/espressif/esp-idf/issues/245
2017-03-09 10:21:31 +11:00
Angus Gratton fd8703bd2a Merge branch 'bugfix/unit_test_parser_only_dirs' into 'master'
unit tests: Make UnitTestParser ignore non-directories inside 'components' dirs

Tiny fix to UnitTestParser script behaviour, if you happen to have any stray files in your "components" directories.

See merge request !561
2017-03-09 06:58:02 +08:00
Krzysztof 23fc2ef0bd USB to serial driver links 2017-03-08 21:00:27 +01:00
wangmengyang 18814c03d4 component/bt: clean up profile call/callback handlers
1. remove the empty function btc_gap_bt_cb_handler();
2. separate the a2dp profile call/callback handers
2017-03-08 21:08:11 +08:00
Jeroen Domburg ab5bbfa74b Malloc test: tabs -> spaces, fix description 2017-03-08 19:44:57 +08:00
Jeroen Domburg 3462b53fbc MR suggestions 2017-03-08 19:27:30 +08:00
wangmengyang 07548918df component/bt: clean up AVRC logic and the header file 2017-03-08 19:25:58 +08:00
Jeroen Domburg 37d56b0e8a Add small testcase 2017-03-08 19:04:28 +08:00
Jeroen Domburg e5f54a9dbd Validate more GPIO ROM functions for non-use of static RAM 2017-03-08 19:04:28 +08:00
Jeroen Domburg 0db8b00b8a tight 28k 2017-03-08 19:04:28 +08:00
Ivan Grokhotkov 4745895e22 Merge branch 'bugfix/fix_ulp_unit_test' into 'master'
ulp: ignore unit tests which use deep sleep



See merge request !566
2017-03-08 17:37:09 +08:00
island a74f3f9fd7 bt component: code style update 2017-03-08 17:09:05 +08:00
island 3543d8170c bt component: update if…else code style 2017-03-08 17:00:56 +08:00
Ivan Grokhotkov cde4072f25 ulp: ignore tests which use deep sleep 2017-03-08 16:19:58 +08:00
Ivan Grokhotkov 66c693eebb Merge branch 'feature/deep_sleep_wakeup_from_touch' into 'master'
add wakeup from touch sensor, and deep sleep example

- add new deep sleep wakeup mode
- change documentation to explain incompatibilities between different wakeup mode, add error checks
- add new ULP instructions necessary for ULP wakeup scenario
- fix issues with I_WR_REG, I_SLEEP, I_END instructions
- add deep sleep example, illustrating the use of timer, gpio, touch, and ULP wakeup triggers

See merge request !461
2017-03-08 14:27:58 +08:00
wangmengyang e6f36f2dc5 component/bt: modify AVRCP APIs to post events and arguments to be handled by BTC task 2017-03-08 13:48:56 +08:00
XiaXiaotian 624ad1bd8b wifi deinit: update esp_wifi_deinit()
1. move ets_timer_deinit() to wifi_deinit()

2. delete wifi api mutex when wifi deinit
2017-03-08 11:00:02 +08:00
Angus Gratton 74817c35f3 mbedtls: Enable filesystem support 2017-03-08 09:55:31 +11:00