Commit Graph

881 Commits

Author SHA1 Message Date
Dong Heng
04c731c802 feat(bootloader): Boot copy OTA is not depend on others 2019-01-24 19:35:03 +08:00
Dong Heng
b83c3a0c4d fix(nvs_flash): Fix recovery from power-off while page is being freed
Currently when page is being freed, items are individually moved from
FREEING page to ACTIVE page and erased. If power-off happens during the
process, the remaining entries are moved to ACTIVE page during recovery.
The problem with this approach is there may not be enough space on
ACTIVE page for all items if an item was partially written before
power-off and erased during recovery. This change moves all the items
from FREEING to ACTIVE page and then erased the FREEING page, If
power-off happens during the process, then ACTIVE page is erased and the
process is restarted.

esp-idf commit ID: 7ae1df1c
2019-01-22 11:55:20 +08:00
Dong Heng
e5c9b74005 fix(nvs_flash): don’t expect items with bad CRC to be in cache
When erasing a variable length item with an incorrect CRC32, the span
value of the item can not be trusted, so the item will be erased with
span = 1. Subsequent entries represent the data of the variable
length item, and these will be treated as separate items. For each
entry CRC32 is checked, the check most likely fails (because the
entry contains arbitrary data, and not a proper NVS item), and the
entry is erased. Erase function assumed that every item should be
present in cache, but it is not the case for the entries which are
just parts of item’s payload. This change allows for the item to be
not found in the hashlist, if the CRC32 check fails.

esp-idf commit ID: 2c3644a0
2019-01-22 11:55:20 +08:00
Dong Heng
ab9b141953 fis(nvs_flash): Fix recovery after power-off during erase operation
Current code for recovery after power-off do not clean-up partially
erased items for FULL pages. If the erasure was part of modification
operation, this gets luckily cleaned-up because of duplicate detection
logic. For erase-only operation, the problem still exists. This patch
adds the recovery for FULL pages also.

esp-idf commit ID: 9a3c4b71
2019-01-22 11:55:20 +08:00
Dong Heng
1837a115bb fix(nv_flash): Fix page selection algo to consider free entry counts as well
Current page selection algorithm selects a page for compaction based on just erased counts
and gives up when it does not find any page with erased count greater than 0. This is
problematic since the current allocation procedure skips the active page if there is not
enough room for the item in that page leaving free chunks on the pages. This change modifies
the algorithm to consider both erased as well as free counts on the candidate pages.

esp-idf commit ID: 7e79471e
2019-01-22 11:21:58 +08:00
Wu Jian Gang
f5116eccda Merge branch 'feature/add_user_data_to_bin_header' into 'master'
feat: add user data to bin header

See merge request sdk/ESP8266_RTOS_SDK!698
2019-01-21 16:27:34 +08:00
Dong Heng
11db1b0daf feat(bootloader): Support v2 firmware updates to v3 by OTA 2019-01-16 14:20:58 +08:00
XiongYu
d4f2388a18 refactor(hspi): Refactor hspi driver for esp8266 idf 2019-01-16 11:22:57 +08:00
Wang Jia Lin
ce8fb1e67f Merge branch 'feature/refactor_i2s_driver' into 'master'
refactor(i2s): Refactor i2s driver for esp8266 idf

See merge request sdk/ESP8266_RTOS_SDK!712
2019-01-16 11:09:32 +08:00
Wang Jia Lin
ed02e834ac Merge branch 'feature/add_adc_interface' into 'master'
feature(adc): add adc interface

See merge request sdk/ESP8266_RTOS_SDK!681
2019-01-16 11:08:48 +08:00
Chen Wu
68e0a80561 feat: add user data to bin header
user could put some data into bin header by USER_DATA_ATTR attribute, defined in esp_attr.h
2019-01-16 10:23:54 +08:00
Zhang Jun Hao
33eadb3ff0 fix(lib): fix memlead when scan found mesh ie 2019-01-15 18:01:15 +08:00
XiongYu
bc0700a48b refactor(adc): Refactor adc driver for esp8266 idf 2019-01-15 15:34:09 +08:00
Wu Jian Gang
74b4a550de Merge branch 'feature/update_wolfssl_to_commercial_version_3.15.7' into 'master'
feat(wolfssl): update wolfssl to commercial version 3.15.7

See merge request sdk/ESP8266_RTOS_SDK!716
2019-01-14 20:31:38 +08:00
XiongYu
7a5bf3366f refactor(i2s): Refactor i2s driver for esp8266 idf 2019-01-14 18:23:33 +08:00
Zhang Jun Hao
f56dfe2b14 feat(ssl): use mbedtls by default 2019-01-14 15:59:20 +08:00
Zhang Jun Hao
38a29a64db feat(wolfssl): add wolfssl debug option 2019-01-14 14:56:25 +08:00
Wu Jian Gang
e7d73894f5 Merge branch 'bugfix/fix_pwm_wrong_comment' into 'master'
bugfix(pwm): fix_pwm_wrong_comment

See merge request sdk/ESP8266_RTOS_SDK!715
2019-01-14 14:28:07 +08:00
Dong Heng
acd0f23d4d Merge branch 'bugfix/fix_mqtt_high_thoughtput_failed' into 'master'
fix: high thoughput(payload>10KB, continuous send) causes to send failed

See merge request sdk/ESP8266_RTOS_SDK!694
2019-01-14 11:29:11 +08:00
Dong Heng
8567a9abfb Merge branch 'bugfix/mqtt_recv_feed_wdt' into 'master'
fix: mqtt recv cycle feed watchdog when cycle interval is 0

See merge request sdk/ESP8266_RTOS_SDK!705
2019-01-14 11:28:45 +08:00
XiongYu
3c3b15f8bc bugfix(pwm): fix_pwm_wrong_comment
Fixes https://github.com/espressif/ESP8266_RTOS_SDK/issues/439
2019-01-14 10:47:19 +08:00
Zhang Jun Hao
8209aebd9f feat(wolfssl): add wolfssl library for debug 2019-01-13 10:22:57 +08:00
Zhang Jun Hao
b68e47b746 feat(wolfssl): update wolfssl to commercial version 3.15.7 2019-01-12 22:23:02 +08:00
Dong Heng
e6d122f7eb fix(pwm): Modify PWM TICKS3 to reduce CPU cost 2019-01-10 16:39:23 +08:00
Dong Heng
f56c415ae9 fix(esp8266): Fix PWM lost when using PWM 2019-01-10 16:25:43 +08:00
Chen Wu
d787a26f41 fix: mqtt recv cycle feed watchdog when cycle interval is 0
Send cycle and recv cycle share one mutex,
For increasing mqtt thoughtput, set receive cycle to 0,
mqtt recv cycle feed watchdog when cycle interval=0
2019-01-08 13:35:20 +08:00
Dong Heng
797dd7014a Merge branch 'bugfix/fix_boot_flash_read_buf' into 'master'
Fix read buffer not 4 bytes align

See merge request sdk/ESP8266_RTOS_SDK!704
2019-01-07 20:08:55 +08:00
Dong Heng
4a2d093b31 feat(bootloader): Fix read buffer not 4 bytes align 2019-01-07 19:32:54 +08:00
Dong Heng
1caafb0b68 fix(esp8266): Fix hardware watch dog triggers after software restart 2019-01-07 17:20:51 +08:00
Zhang Jun Hao
d310d3ae10 feat(lib): set 11g mode by default 2019-01-04 17:05:50 +08:00
Zhang Jun Hao
648121f7b4 fix(lib): fix set bssid error 2019-01-03 20:48:56 +08:00
Chen Wu
87421bfe92 fix: high thoughput(payload>10KB) cause send failed
1. socket would block at send(), return -1 when set MSG_DONTWAIT
2. changed to ~MSG_DONTWAIT, send() will block until all payload send over
3. recv() should keep MSG_DONTWAIT attribute, otherwise will lead to low thoughtput
2019-01-03 11:47:46 +08:00
Dong Heng
c05b1a57f9 Merge branch 'bugfix/fix_scan_error_when_set_channel_14' into 'master'
fix(lib): fix scan error when set channel 14

See merge request sdk/ESP8266_RTOS_SDK!691
2019-01-03 10:42:30 +08:00
Dong Heng
20cf435848 Merge branch 'feature/config_to_disable_solink_at_socket_mt' into 'master'
Add configuration to enable/disable setting SO_LINGER default

See merge request sdk/ESP8266_RTOS_SDK!693
2019-01-03 10:24:13 +08:00
Wang Jia Lin
cc8d13fedd Merge branch 'bugfix/uart1_intr_and_pwm' into 'master'
bugfix(uart): fix uart1 interrupt

See merge request sdk/ESP8266_RTOS_SDK!680
2019-01-02 15:25:39 +08:00
Dong Heng
ac29fd216e feat(lwip): Add configuration to enable/disable setting SO_LINGER default 2019-01-02 15:23:54 +08:00
Zhang Jun Hao
516107a96f fix(lib): fix scan error when set channel 14 2018-12-29 20:30:43 +08:00
Wu Jian Gang
3d0fa3c5ae Merge branch 'bugfix/fix_sniffer_crash' into 'master'
Fix sniffer crash

See merge request sdk/ESP8266_RTOS_SDK!687
2018-12-29 20:23:53 +08:00
Dong Heng
1c0391e546 fix(esp8266): Fix sniffer crash 2018-12-29 17:49:30 +08:00
Wu Jian Gang
12ec433d9a feat: Add phy reg default when boot 2018-12-29 14:17:28 +08:00
Wu Jian Gang
09cdf3e006 fix(esp8266): Fix the wrong baudrate when restart
Restore old freq when restart
2018-12-29 14:07:26 +08:00
Dong Heng
ba526b17c2 fix(esp8266): Fix setup rate table crash 2018-12-28 20:22:11 +08:00
Zhang Jun Hao
d34824457a fix(lib): fix send disassoc error 2018-12-28 17:42:39 +08:00
Wu Jian Gang
09fe8f7085 fix(log): Fix log time mismatch
When system startup, using 2*crystal as clock source.
2018-12-28 14:44:12 +08:00
XiongYu
def1edc36b bugfix(uart): fix uart1 interrupt 2018-12-28 14:29:20 +08:00
Wu Jian Gang
34b64c20ee Merge branch 'feature/add_test_app_jump_scan_by_gpio' into 'master'
feat(bootloader): Support to trigger test app in bootloader

See merge request sdk/ESP8266_RTOS_SDK!679
2018-12-28 13:54:48 +08:00
Dong Heng
e124146e2b feat(bootloader): Support to trigger test app in bootloader 2018-12-28 13:03:14 +08:00
Wu Jian Gang
09e36f19c1 Merge branch 'feature/app_bin_support_4KB_align' into 'master'
Update partition table script and OTA example

See merge request sdk/ESP8266_RTOS_SDK!677
2018-12-28 09:09:33 +08:00
Dong Heng
3d63a6ca52 feat(partition_table): Update partition table script and OTA example
1. APP binary supports 4KB align instead of 64KB align

2. Add options to sdkconfig.defaults:
2.1. using 1MB flash
2.2. use custom partition table "partitions_two_ota.1MB.mini.csv"
2.3. custom partition table base address is 0x4000

3. "make ota flash" using APP1_OFFSET as app downloading address
2018-12-26 17:44:41 +08:00
Zhang Jun Hao
a2b8b95df3 fix(lib): fix wifi disconnect reason code error 2018-12-26 16:07:22 +08:00