Commit graph

204 commits

Author SHA1 Message Date
yulong 982b90e77d commponent bt: update the components/bt/lib & components/esptool_py/esptool 2016-10-15 04:42:33 -04:00
yulong f68c8dd687 commponant bt:change bt_app_main to app_main 2016-10-14 04:44:56 -04:00
yulong d85ff46bdf commponent bt:modified the cpu_start.c app_main function to bt_app_main funciton 2016-10-11 08:05:58 -04:00
yulong 849ba39544 commponent bt:add the wechat airsync profile to the project
1. add the wx_airsync_prf.h which have been define the sturcter data has been
used for the wechat airsync profile database
2. add the wx_airsync_prf.c file
3. add the app_airsync_md5.c file
4. add the app_airsync_prf.c
5. add epb.c file
6. add epb_mmbp.c
7. add mpbledemo2.c
8. add wechar_crc.c
9  add wechat_aes.c
10. add app_airsync_md5.h
11. add app_airsync_prf.h
12. add app_wechat_util.h
13. add epb.h
14. add epb_mmbp.h
15 add mpbledemo2.h
16 add wechar_crc.h
17 add wechat_aes.h
2016-10-11 05:43:36 -04:00
Angus Gratton aae3e84829 syscall write: Should return number of bytes written
Fixes bug where sometimes output truncates after a newline, or large
chunks of large output buffers are lost.
2016-10-06 18:35:08 +11:00
Wu Jian Gang d2c938d881 esp32: add libsmartconfig.a to link libs 2016-09-30 15:40:08 +08:00
Wu Jian Gang 6827f27b99 esp32: not link wps 2016-09-30 14:04:03 +08:00
Wu Jian Gang e3f46f424c esp32/lib: update wifi lib to a1e5f8b9
1. update smartconfig 2.6.2;
2. add watch dog
3. remove libwpa2.a/libwps.a
2016-09-30 13:50:11 +08:00
Wu Jian Gang f17f57b48d esp32: remove esp_wps.h
not support now
2016-09-30 13:48:37 +08:00
Wangjialin 9d0daa3722 add smartconfig header files(merge this after updating libsmartconfig.a version v2.6.2)
1. change the original API names.
2. return esp_err_t
3. merge this after updating libsmartconfig.a version v2.6.2
2016-09-30 02:31:14 +08:00
Wu Jian Gang aeef4cf58d esp32/lib: update wifi lib to 3853d7ae
1. add debug api for debugging rx buffer leak issue
2. fix rx buffer leak issue
2016-09-29 18:19:38 +08:00
Wu Jian Gang 702e749667 Merge branch 'feature/deep_sleep_wake_stub' into 'master'
esp32: Bootloader wake deep sleep stub

App can contain a stub program resident in RTC fast memory. Bootloader
will load the stub on initial boot. If the device wakes from deep sleep,
the stub is run immediately (before any other data is loaded, etc.)

To implement a custom wake stub, implement a function in your program:

```
void RTC_IRAM_ATTR esp_wake_deep_sleep(void)
{
  esp_default_wake_deep_sleep();
  // other wake logic
}
```

... and it will replace the default implementation.

See merge request !78
2016-09-29 18:07:16 +08:00
jack 4e092be6d6 Add Comments
We reserve 4KB Slow RTC memory to save RF calibation result and BT NVS data.
If not all these Slow RTC momory Blocks are used, we will open the other parts.
2016-09-29 16:29:13 +08:00
Jeroen Domburg 44f559a281 Merge branch 'driver_merge_tmp/merge_ledc' into 'master'
add ledc driver code



See merge request !110
2016-09-29 11:57:52 +08:00
liuzhifu 8800d073e8 components/lib: update wifi lib
fe8baaca - tw6513 fix a memory leak issue
2016-09-28 21:35:49 +08:00
Wangjialin 9cfb3227a3 Merge branch 'master' into driver_merge_tmp/merge_ledc
Merge master branch to pass building.
2016-09-28 13:27:58 +08:00
Wu Jian Gang ed0a85ab4d Kconfig: use 4 spaces to instead 1 tab
In some Kconfig file, both 4 spaces and 1 tab are used mix, let's just
use 4 space, it will be clean in some editor.
2016-09-28 13:24:58 +08:00
Wu Jian Gang 70e1131b4b esp32: add TRACEMEM_RESERVE_DRAM config
this configaration is missed when rebase
2016-09-28 12:29:39 +08:00
xiaxiaotian ec03c31ec4 1. Change the deep sleep stub code to fix wake bug. 2016-09-28 11:52:39 +08:00
Angus Gratton 103a2a0079 esp32: Allow RTC slow memory to be reserved for ULP coprocessor 2016-09-28 11:15:29 +08:00
Angus Gratton 2c6ab8579a esp32: Pass memory layout linker script through C preprocessor
C preprocessor is a bit icky, but with ULP we will have 3 possible
variables influencing the memory layout and 9 linker scripts is too
many!
2016-09-28 11:15:29 +08:00
Angus Gratton 5f45cbc16a esp32: Add esp_deepsleep.h to esp_system.h to keep backwards compatibility with system_deep_sleep() 2016-09-28 11:14:58 +08:00
Angus Gratton 7c494055e3 esp32: Bootloader wake deep sleep stub
App can contain a stub program resident in RTC fast memory. Bootloader
will load the stub on initial boot. If the device wakes from deep sleep,
the stub is run immediately (before any other data is loaded, etc.)

To implement a custom wake stub, implement a function in your program:

```
void RTC_IRAM_ATTR esp_wake_deep_sleep(void)
{
  esp_default_wake_deep_sleep();
  // other wake logic
}
```

... and it will replace the default implementation.
2016-09-28 11:14:58 +08:00
Ivan Grokhotkov 87091e10fe Merge branch 'master' into feature/btdm_controller
* master:
  app_main: Return type to void
  wifi: move type definitions into separate header file
  wifi: use default esp_event_send handler in WIFI_INIT_CONFIG_DEFAULT
  nvs: Remove flash layout arguments from nvs_init()
  Add contributor agreement, update CONTRIBUTING file
  Update http_request & https_request examples for new startup flow
  Add very simple "hello world" & "blink" examples
  Build examples out-of-tree as part of CI process
  Examples: Use event groups for waiting until WiFi is associated & ESP has IP
  BT example: Enable BT stack in config by default
  BT: Relink component on new BT library, auto-initialise submodule if missing
  Documentation: Add contributor guide, expand README & add an examples README
  Update gitignore for examples
  examples: Add https_request example
  mbedtls: Add some initial menuconfig options
  examples: HTTP request example
  component/esp32: udpate wifi lib
  component/esp32: modify bool argument name from enable to en
  component/esp32: adjust some APIs
  esptool: Bump upstream revision
2016-09-27 22:08:27 +08:00
Angus Gratton fdb90ddd21 Merge remote-tracking branch 'origin/bugfix/modify_some_wifi_apis' into feature/initial_examples 2016-09-27 19:37:06 +10:00
Angus Gratton e6479ef314 app_main: Return type to void
Result is not checked
2016-09-27 19:30:43 +10:00
Ivan Grokhotkov fcccec4a3b Merge branch 'master' into feature/btdm_controller
* master: (32 commits)
  components/nghttp: rename Makefile to component.mk
  components/nghttp: add HTTP2.0 protocol feature
  compoenents/esp32: don't alias start_cpu1 to start_cpu0_default
  components/freertos: fix a bug with an uninitialised return value
  Change application entry point name back to app_main
  gitlab-ci: build SSC with matching branch name, if available
  components/spi_flash: remove stray level of indentation
  components/nvs: fix broken sentences in comment blocks
  components/esp32: fix renaming of esp_event_set_cb, minor clean up
  components/esp32: remove "_user" part from entry points, weaken start_cpu0/1
  Fix a spelling mistake in panic message, add carriage return to stack canary message
  components/lwip,esp32: fixes for C++
  components/bt: fix compilation, remove ./ from makefile
  components/esp32: clarify type of queue in wifi_init_config_t, add default init macro
  components/esp32: add ESP_ERROR_CHECK
  Event handling refactoring
  clean up warnings
  components/esp32,bt: fix typos in comments
  Startup flow refactoring
  Roll back submodule version
  ...
2016-09-27 12:40:56 +08:00
Ivan Grokhotkov 952df01a10 wifi: move type definitions into separate header file
While this may reduce esp_wifi.h file readability for people who don't have a "go to definition" function in their editors, this is needed to decouple esp_wifi and esp_event headers, and possibly other headers which may use wifi types in the future.
2016-09-27 11:47:47 +08:00
Ivan Grokhotkov 01a7efad88 wifi: use default esp_event_send handler in WIFI_INIT_CONFIG_DEFAULT 2016-09-27 11:33:19 +08:00
liuzhifu 62dbce1e81 component/esp32: udpate wifi lib
1. 1a01e34f - adjust esp_wifi_set/get_promiscuous' arguments from uint8/uint8*
               to bool/bool*
2. 3611e699 - register event handler instead of event Q in esp_wifi_init
2016-09-26 20:43:19 +08:00
liuzhifu 0aace445a6 component/esp32: modify bool argument name from enable to en
1. Modify WIFI_INIT_CONFIG_DEFAULT
2. Modify bool argument name from enable to en
2016-09-26 20:15:16 +08:00
liuzhifu bd2e55def3 component/esp32: adjust some APIs
1. Modify wifi_init_config_t to:
   typedef struct {
      wifi_event_handler_t event_handler;  /**< WiFi event handler */
   } wifi_init_config_t;
2. Modify argument of esp_wifi_set/get_promiscuous from uint8_t/uint8_t* to bool/bool*
2016-09-26 19:45:36 +08:00
wangmengyang b9167f70cd component/bt: add VHCI mutex protetion
1. add mutex to VHCI APIs
2. remove bss/data log print during initialization;
3. add bss/data symbols in esp32.rom.ld
4. add & modify BTDM OSI functions
2016-09-26 18:52:15 +08:00
Ivan Grokhotkov 991fde1f9d compoenents/esp32: don't alias start_cpu1 to start_cpu0_default 2016-09-26 15:58:58 +08:00
Ivan Grokhotkov 7cef0308dc Change application entry point name back to app_main 2016-09-26 14:48:41 +08:00
Ivan Grokhotkov dabe53f082 Merge branch 'master' into feature/init_refactoring
* master:
  components/spi_flash: remove stray level of indentation
  components/nvs: fix broken sentences in comment blocks
  Roll back submodule version
  Spinlocks already come initialized. Remove the code that would essentially re-initialize them at runtime
  Remove all references to prvLockQueue / prvUnlockQueue
  components/esp32: clean up unused function warnings in single core mode
  clean up warnings
  components/nvs: fix build, use log library instead of printf
  components/spi_flash: add flash operation counters option to Kconfig
  components/nvs: add erase function
  components/nvs: fix formatting
  components/nvs: batch writes when possible
  components/spi_flash: add performance counters
  components/nvs: maintain item hash list at page level
  components/nvs: avoid reading just-erased page

# Conflicts:
#	components/esp32/cpu_start.c
#	components/esp32/event_default_handlers.c
2016-09-26 14:35:09 +08:00
Ivan Grokhotkov 890fadc394 components/esp32: fix renaming of esp_event_set_cb, minor clean up 2016-09-26 12:35:09 +08:00
Ivan Grokhotkov 62aaec630c components/esp32: remove "_user" part from entry points, weaken start_cpu0/1
With this change applications can override very early part of startup procedure by implementing "start_cpu0" and "start_cpu1" functions.
2016-09-26 12:29:00 +08:00
Wangjialin ec45e1a593 components/driver: modify LEDC driver
1. modify ledc struct header: combine high speed and low speed channel
2. modify ledc init function
3. add timer control api
4. modify typo in ledc.h
2016-09-26 09:56:03 +08:00
Angus Gratton 3ccec16706 Merge branch 'bugfix/clean_up_warnings' into 'master'
Clean up warnings and remove unused parts of FreeRTOS

For third party components (lwip and expat), compilation flags are adjusted to silence existing warnings (i have manually checked that all warnings are benign).
In components/esp32, replaced use of WIFI_DEBUG with ESP_LOG functions.

Additionally prvLockQueue/prvUnlockQueue have been removed, dragging some other bits of FreeRTOS along.

Original issue: https://github.com/espressif/esp-idf/issues/18

See merge request !111
2016-09-26 08:16:31 +08:00
Ivan Grokhotkov b190dc3e9f components/lwip,esp32: fixes for C++
- put contents of a few headers into c++ guard blocks
- fix off-by-one error in do_global_ctors
- remove system_init from startup code (should be called from main)
2016-09-26 03:05:25 +08:00
Ivan Grokhotkov 5a762d9eee components/esp32: clarify type of queue in wifi_init_config_t, add default init macro 2016-09-26 01:35:31 +08:00
Ivan Grokhotkov e9b54b6b45 components/esp32: add ESP_ERROR_CHECK
Convenience macro to do error check and assert in cases when error recovery is not expected
2016-09-26 01:34:05 +08:00
Ivan Grokhotkov 53de9f115f Event handling refactoring
This change separates definitions in esp_event.h and functions in event.c into several parts:
- event structure definitions (esp_event.h)
- default implementations of event handlers (event_default_handlers.c)
- default implementation of event loop (event_loop.c, esp_event_loop.h)

Purpose of this change is to allow applications choose their own poison:
- full control of event loop at the expense of more bootstrap code
- pre-defined event task firing event callbacks, but less code in app_main.c
2016-09-26 01:17:32 +08:00
Ivan Grokhotkov cc8dd46da2 clean up warnings
For third party components (lwip and expat), compilation flags are adjusted to silence existing warnings (i have manually checked that all warnings are benign).
In components/esp32, replaced use of WIFI_DEBUG with ESP_LOG functions.
Only remaining warning is in FreeRTOS queue.c, and it may be a useful one.
2016-09-26 00:52:32 +08:00
Ivan Grokhotkov e1c782a206 components/esp32,bt: fix typos in comments 2016-09-26 00:51:56 +08:00
Ivan Grokhotkov b936441b9b Startup flow refactoring
This change removes implicit WiFi/BT initialization from startup code.
"main" task is started once essential part of startup code is complete.
This task calls application-provided "int main(void)" function, which can call WiFi/BT init functions if necessary.
2016-09-26 00:50:57 +08:00
Ivan Grokhotkov 6818c4c971 Roll back submodule version 2016-09-23 18:08:39 +08:00
Jeroen Domburg d63dac0320 Remove all references to prvLockQueue / prvUnlockQueue 2016-09-23 17:43:52 +08:00
Ivan Grokhotkov 6718e321f2 components/esp32: clean up unused function warnings in single core mode 2016-09-23 15:02:17 +08:00