234 Commits

Author SHA1 Message Date
e1d70c9519 Merge branch 'feature/refactor_panic_backtrace' into 'master'
esp8266: refactor ESP8266(xtensa lx106) panic backtrace function

See merge request sdk/ESP8266_RTOS_SDK!1067
2019-08-29 10:10:38 +08:00
767d995466 feat(esp8266): refactor ESP8266(xtensa lx106) panic backtrace function 2019-08-26 16:55:20 +08:00
dbded69dd5 Merge branch 'feature/i2c_clk_stretch' into 'master'
feature(i2c): add i2c clock stretch

See merge request sdk/ESP8266_RTOS_SDK!916
2019-08-26 14:08:25 +08:00
b061230056 feat(esp8266): refactor CCOMPARE timer and system time by microseconds
old: CCOMPARE timer triggers when CCOUNT increase to equal to CCOMPARE, then ISR will increase integer of "_xt_tick_divisor"
     to CCOMPARE and wait for next interrupt triggering

now: CCOMPARE timer triggers when CCOUNT increase to equal to CCOMPARE, then ISR will reset CCOUNT to be 0 and reset CCOMPARE
     to be integer of "_xt_tick_divisor", then wait for next interrupt triggering

Using the new method, we may get the CCOUNT value without considing if it has overflowed.
System running microseconds = g_os_ticks * microseconds per tick + CCOUNT.
2019-08-19 14:03:20 +08:00
c665a71370 fix(esp8266): esp8266 flash mapping to CPU bus size only supports 1MB now
We may add support to run app which size is larger than 1MB later.
2019-08-12 15:45:26 +08:00
6ada81237e Merge branch 'feature/support_make_size_family_cmd' into 'master'
esp8266: supports "make size" and its family function

See merge request sdk/ESP8266_RTOS_SDK!1033
2019-08-08 09:51:47 +08:00
3aa6377476 Merge branch 'feature/add_md5_algorithm_in_util' into 'master'
feat(util): Add md5 algorithm to util

See merge request sdk/ESP8266_RTOS_SDK!1024
2019-08-07 12:10:00 +08:00
301d857988 feat(esp8266): supports "make size" and its family function
1. support "make size", "make size-files", "make size-components" and "make size-symbols"
2. add esp-idf style link file including "esp8266.ld" and "esp8266.project.ld.in"
3. add link advaced generation file to components of esp8266 and spi_flash
2019-08-05 17:20:29 +08:00
6f86c07c49 feat(util): Add faster MD5 for ESP8266 SoC 2019-08-02 15:58:49 +08:00
114d2b5b86 feature(script): update compiling script for new make and cmake 2019-08-02 14:02:45 +08:00
78cf0dda69 Merge branch 'feature/sync_mdns_from_espidf' into 'master'
mdns: sync code from esp-idf

See merge request sdk/ESP8266_RTOS_SDK!943
2019-07-09 15:50:36 +08:00
af0fcc0492 fix(wifi): fix compatibility issues with AP which configured to 11n only 2019-06-14 11:06:39 +08:00
d04ce110f9 feat(esp8266): add set tx power via vdd33 function 2019-06-12 10:38:33 +08:00
e32f60008a Merge branch 'feature/add_old_sdk_param' into 'master'
compatibility_upgrade: add function to get old SDK's target ap SSID and passowrd

See merge request sdk/ESP8266_RTOS_SDK!959
2019-05-31 15:56:58 +08:00
639c64a540 feat(compatibility_upgrade): add function to get old SDK's target ap SSID and passowrd
Add error warning to check the wrong parition table.
2019-05-31 15:51:20 +08:00
8ccf4435cd fix the comment of wifi_pkt_rx_ctrl_t in esp_wifi_types.h 2019-05-20 20:44:40 +08:00
9a72ce0903 feat(mdns): Sync code from esp-idf
Commit ID: 2f8508c7

1. Fix possible crash when probing on particular interface with duplicated service instances due to naming conflicts on network. Issue: MDNS server initially sends probing packets to resolve naming confilicts with already registered service instances. In case of a conflict, instance name is altered and probing restarts. Original instance however wasnnot removed from the structure and upon service removal only one entry was removed and a dangling service might have been kept in the structure to bring about a crash. Resolution: Keep only one instance of a service in the probing structure

2. Enable pcbs before starting service thread to avoid updating pcb's internal variables from concurent tasks. Possible race condition: user task runs mdns_init, which enables pcbs while mdns-task already created could execute enable/disable of the same pcbs if an appropriate system event received

3. Fix possible deadlock on mdns deinit calling mdns_free(). Mnds_free() initiates stop and delete timer tasks, which after locking the mutex could lead to a dead lock in case timer task executed before deleting the task, as it would wait indefinitelly for unlocking the mutex. This condition is fixed by calling _mdns_stop_timer without locking the mutex, because there's no need to protect any data when stopping and deleting the timer task

4. Fix race condition in updating packet data from user task when failed to allocate or queue a new service. Issue: mdns_service_add API allocates and queues an action to be processed in mdns task context; when allocation or queueing fails, allocated structure needs to be freed. Function _mdns_free_service did not only fee all the structures, but also updates packet data. Resolution: Moved removal of packet data outside of _mdns_free_service function

5. Fix possible crash when packet scheduled to transmit contained service which might have been already removed. Packets scheduled to transmit are pushed to action queue and removed from tx_queue_head structure, which is searched for all remaining services and while service is removed, then service questions/asnwers are also removed from this structure. This update fixes possible crash when packet is pushed to action queue, and when service is removed, its answers are removed from tx_queue_head, but not from action queue. This could lead to a crash when the packet is poped from action queue containing questions/answers to already removed (freed) service

6. Use binary semaphore instead of mutex when searching. Mdns_search_once_t::lock is used to synchronize tasks (taken by one task and given by the other) so it should not be a mutex. Convert to semaphore, and rename to indicate its purpose

7. Fix memory leak in pbuf if tcpipadapter failed to get netif

8. Fix malfuctional query_txt. When running a query for a single txt, result entries were not created and attached to result structure. This issue was introduced when fixing memory leak in txt structure, which worked correctly for PTR queries, but caused trouble for TXT query

9. Fix possible crash when mdns_free called while action queue not empty

10. Fix memory leak when query for service receives multiple ptr entries for one instance

11. Fix crash after init if no memory for task. Mdns init first starts timer task, then starts service task. If service task failed to be created, timer task needs to be stopped too

12. Fixed crash on free undefined ptr after skipped strdup. Shortcircuit evaluation may cause skip of _mdns_strdup_check of any further question field, which after clear_rx_packet freed undefined memory

13. Fix networking running udp_sendif from lwip thread

14. Check all mallocs for failure and add default hook to log error with free heap. Solves crash about _mdns_result_txt_create when stress test

15. Fixed static memory leak

16. Resolve memory leak when txt record received multiple times

17. Skip sending search when finished, not properly locked timer task

18. Sending search packets also in probing and announcing state. Mdns queries did not work properly when send imeadiately after set_hostname, which cuased reinit of pcb and therefore restarted probing, so search packets were blocked until probing finished
2019-05-17 16:29:24 +08:00
43d4d27c11 Merge branch 'bugfix/pwm_channel_num_type_error' into 'master'
bugfix(pwm): fix pwm channel num type error

See merge request sdk/ESP8266_RTOS_SDK!941
2019-05-16 17:09:56 +08:00
4c45455ff0 bugfix(pwm): fix pwm channel num type error
Fixes https://github.com/espressif/ESP8266_RTOS_SDK/issues/588
2019-05-16 15:51:36 +08:00
2a0b0f601b docs(doxygen): Fix header files which is not doxygen style 2019-05-16 15:07:27 +08:00
37ffcbe9e6 feat(esp8266): Add feature to copy old RF parameters to new SDK partition
The old SDK's RF parameters is also kept.
2019-05-05 09:58:18 +08:00
ea43a0c9a6 feat(system): Add global ISR swith 2019-04-28 10:40:50 +08:00
ae61e4dce3 Revert "Merge branch 'feature/add_global_isr_switch' into 'master'"
This reverts merge request !914
2019-04-28 10:32:35 +08:00
d673e2836a feature(i2c): add i2c clock stretch 2019-04-24 15:35:34 +08:00
e7b8e9fa25 feat(system): Add global ISR swith 2019-04-24 14:40:02 +08:00
7b3186cf01 Merge branch 'feature/add_cpu_wait_for_low_power' into 'master'
Add CPU wait to save power

See merge request sdk/ESP8266_RTOS_SDK!912
2019-04-23 10:02:41 +08:00
d83a1514cc Merge branch 'feature/update_spiffs' into 'master'
Update SPIFFS

See merge request sdk/ESP8266_RTOS_SDK!842
2019-04-23 09:28:44 +08:00
f071399ade feat(freertos): Add CPU wait to save power 2019-04-22 17:48:40 +08:00
70ff359619 Merge branch 'bugfix/fix_the_notes_of_phy_power_level_error' into 'master'
fix(esp8266): fix the notes of phy power level error

See merge request sdk/ESP8266_RTOS_SDK!898
2019-04-22 13:21:37 +08:00
f6335d9e24 feat(spiffs): Modify for ESP8266 2019-04-22 10:35:29 +08:00
6ab1c01c53 Merge branch 'feature/spi_ram' into 'master'
feature(spi_ram): add spi ram

See merge request sdk/ESP8266_RTOS_SDK!887
2019-04-18 14:24:57 +08:00
33463b3ddf Merge branch 'feature/i2s_driver' into 'master'
feature(i2s): add i2s driver

See merge request sdk/ESP8266_RTOS_SDK!868
2019-04-18 14:24:45 +08:00
e8bad2e988 fix(esp8266): fix the notes of phy power level error 2019-04-18 11:54:18 +08:00
cac6080e1a bugfix(adc): fix adc warning 2019-04-18 11:38:20 +08:00
0b0d82ca19 feature(spi_ram): add spi ram 2019-04-18 11:16:53 +08:00
e82ba45f03 feat(console): Modify console for ESP8266 2019-04-17 15:58:46 +08:00
b6fd236fa0 Merge branch 'feature/errno_to_string' into 'master'
Add esp-idf error number description

See merge request sdk/ESP8266_RTOS_SDK!851
2019-04-17 15:03:05 +08:00
8aae2e5764 Merge branch 'feature/simplify_xtensa_code' into 'master'
Simplify xtensa platform code

See merge request sdk/ESP8266_RTOS_SDK!862
2019-04-16 19:56:05 +08:00
913188fdf3 feat(freertos): Simplify xtensa platform code
All normal ISRs are called by "_xt_isr_handler".
2019-04-16 19:49:06 +08:00
cac248c42f feature(i2s): add i2s driver 2019-04-15 20:28:25 +08:00
d11543400e feat(vfs): Modify for esp8266 2019-04-15 17:18:42 +08:00
e36706d776 feat(vfs): Bring vfs from esp-idf
Commit ID: e1e82c89
2019-04-15 17:18:03 +08:00
cdc22f273c feature(adc): add adc example 2019-04-15 12:01:11 +08:00
965fc47ff8 feat(log): add esp_log to internal wifi lib 2019-04-12 09:35:45 +08:00
a9acaf91d0 fix(esp8266): Fix "esp_sleep.h" internal leaks "gpio.h" data declare 2019-04-04 17:39:11 +08:00
bc01a1d39c Merge branch 'feature/update_unit_test_app' into 'master'
Update unit-test-app

See merge request sdk/ESP8266_RTOS_SDK!845
2019-04-01 10:40:46 +08:00
be88feb395 feat(esp8266): Using global functions instead of function table
The Wi-Fi adapter APIs are only used by internal libraires.
2019-03-25 17:35:59 +08:00
050fb6a63f feat(esp8266): Add esp-idf error number description
Commit ID: f49e2afe
2019-03-22 17:41:48 +08:00
2489388ad5 feat(esp8266): Refactor link section 2019-03-22 12:30:46 +08:00
7e25156286 feat(freertos): Reduce close NMI time 2019-03-22 11:36:12 +08:00