Commit graph

339 commits

Author SHA1 Message Date
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
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
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
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
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
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 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
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 53146799a0 Initial addition of wdt and brownout code 2016-10-21 17:59:57 +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 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 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
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
Angus Gratton 90cad92b9b Merge branch 'master' into bugfix/build_dir_base 2016-10-18 15:30:57 +11:00
Ivan Grokhotkov 8f82a83c2c Merge branch 'master' into feature/freertos_static_buffers 2016-10-17 16:02:09 +08:00
Ivan Grokhotkov eaace9846a smartconfig: update to match new FreeRTOS header files 2016-10-17 14:12:16 +08:00
Jeroen Domburg 0aab006bb7 Add Trax-support to esp-idf 2016-10-17 12:18:17 +08:00
Ivan Grokhotkov 4370794d07 wifi libraries: update to match new FreeRTOS header files 2016-10-14 21:52:43 +08:00
Jeroen Domburg fa476c8ba9 Merge branch 'bugfix/small_fixes_jd' into 'master'
Some small fixes

- Kill unused uxReturn in task.c,  https://github.com/espressif/esp-idf/issues/48
- Line end conversion in gpio.c
- Move heap_alloc_caps.h so components can also use it

See merge request !135
2016-10-12 21:13:34 +08:00
Angus Gratton 9632c8e56c RSA Accelerator: Add mod_exp, refactor to avoid memory allocation & copying
Not fully working at the moment, mod_exp has a bug.
2016-10-12 16:19:09 +11:00
Angus Gratton 79bd6af7e7 build system: Print a WARNING if any submodule is out of date
Inspired by Github #27 and related "gotchas" with keeping submodules up to date.
2016-10-11 07:56:08 +11:00
Angus Gratton ab67378ef3 Merge branch 'feature/support_iperf' into 'master'
lwip/esp32: support iperf

1. Add _exit() definition in syscalls.c
2. Fix a bug in sockets.c on which iperf depends

I'm now investigating performance of esp32, need iperf to be merged in to master branch for convience

See merge request !136
2016-10-11 04:52:34 +08:00
Jeroen Domburg 812d4ab4ea Merge branch 'feature/rmt_add_struct_for_memory' into 'master'
Add data memory for RMT peripheral

As described in the title.

See merge request !134
2016-10-10 22:44:36 +08:00
liuzhifu d71894bf99 lwip/esp32: support iperf
1. Add _exit() definition in syscalls.c
2. Fix a bug in sockets.c on which iperf depends
2016-10-09 15:45:25 +08:00
Jeroen Domburg df31bb8dfc Rename include, use spaces instead of tabs 2016-10-09 15:32:08 +08:00
Jeroen Domburg a03e75d34c Move heap_alloc_caps.h to a location where it can be included by components 2016-10-08 14:11:34 +08:00
Jeroen Domburg 5cd3bd5c4b Add data memory for RMT peripheral 2016-10-08 13:15:06 +08: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
Angus Gratton f720e82d40 build system: Allow BUILD_DIR_BASE to be a relative directory (see github #38) 2016-10-06 18:05:51 +11:00
Angus Gratton 66882347e8 build system: Fix out-of-tree building via BUILD_DIR_BASE
Closes #38
2016-10-04 15:04:56 +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
Wangjialin 3f1c5c4d5b 1. add a macro 'GPIO_IS_VALID_OUTPUT_GPIO' and 'GPIO_IS_VALID_OUTPUT_GPIO' in gpio.h
2. add PIN_FUNC_GPIO in io_mux_reg.h, put the io_mux_regs in order
3. use braces around single line if statements in ledc.c and gpio.c
2016-09-23 14:52:26 +08:00
Ivan Grokhotkov 5e6b2e9c45 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-23 14:46:39 +08:00
snake 95c48d4b84 1. clean up the macro. 2. change component/bt/lib url to use new lib 2016-09-23 10:48:55 +08:00
Ivan Grokhotkov 822a9981d8 Merge branch 'master' into feature/btdm_controller
* master:
  esp32/lib: update to f6d55836
2016-09-22 18:40:54 +08:00
Ivan Grokhotkov c6e1d0b30a Kconfig: make WiFi and BT mutually exclusive
Also move memory map options from top-level Kconfig to esp32/Kconfig.
2016-09-22 18:36:23 +08:00
snake 993287af61 add btdm_controller 1st 2016-09-22 16:40:31 +08:00
Wu Jian Gang 28be72dbc7 esp32/lib: update to f6d55836
1. Fix reboot halt bug when 240MHz, TW7355
2. Disable long rate code
2016-09-22 16:30:34 +08:00
Ivan Grokhotkov 226e64bd1e Merge branch 'driver_merge_tmp/fix_fifo_struct_header' into 'master'
use uint8_t for fifo struct in uart and i2c

use uint8_t for fifo struct in uart and i2c

See merge request !106
2016-09-22 11:39:16 +08:00
Wangjialin 71fe8d9f15 Merge branch 'master' into driver_merge_tmp/merge_gpio 2016-09-22 10:50:06 +08:00
Wangjialin d2420b667c use uint8_t for fifo struct in uart and i2c 2016-09-22 09:05:39 +08:00
Wu Jian Gang 134649141c esp32/lib: update to 9f26b9a1
1. Fix reboot halt bug, TW7355
2. Fix system crash when calling system_deep_sleep(), TW7356
2016-09-21 16:49:30 +08:00
Wu Jian Gang 835cc55138 esp32: wait uart tx finish before cpu freq change 2016-09-21 16:15:42 +08:00
Wu Jian Gang 4f93b49e0a esp32/lib: update to 9403d944 2016-09-21 11:37:10 +08:00
Ivan Grokhotkov da69d6ad3c Merge branch 'master' into feature/menuconfig_cpu_frequency_option
* master: (57 commits)
  components/lwip: fix grammar
  components/lwip: make SO_REUSE configurable via menuconfig
  bootloader: remove trailing newlines from log messages
  components/freertos: override per-task __cleanup handler to close stdin, stdout, stderr
  components/esp32: move peripheral symbols to separate ld script
  components/log: regroup macros for better readability
  gitlab-ci: allow running tests for branches, triggered via API
  components/log: fix timestamp calculation
  components/log: set default runtime log level to ESP_LOG_VERBOSE
  components/log: fix error when using ESP_LOGx from C++ code
  components/log: fix bugs, add options to override log level for files, components, and bootloader
  fix ledc and spi typo
  remove prefix and postfix
  Enable SO_REUSEADDR in LWIP
  freertos: fix memory debug macro issue Define configENABLE_MEMORY_DEBUG according to CONFIG_ENABLE_MEMORY_DEBUG
  peripheral structure headers: move volatile keyword from members to typedef
  Adding -fstrict-volatile-bitfields to the CFLAGS/CXXFLAGS. Without this, gcc tries to access bitfields using the smallest possible methods (eg l8i to grab an 8-bit field from a 32-bit). Our hardware does not like that. This flag tells gcc that if a bitfield is volatile, it should always use the type the field is defined at (uint32_t in our case) to size its access to the field. This fixes accessing the hardware through the xxx_struct.h headers.
  add peripheral  module struct headers
  build system docs: Add note about no spaces in component names
  Docs: Add note about unusual submodule messages when cloning on Windows
  ...

# Conflicts:
#	components/esp32/cpu_start.c
#	components/esp32/include/soc/cpu.h
2016-09-20 17:22:18 +08:00
Ivan Grokhotkov 6e35c0a91a Merge branch 'feature/logging' into 'master'
Add logging library

Logging library, intended to be used across other components.
Uses design similar to Android NDK logging APIs and allows for both compile time and run time filters, similar to logcat.

Also includes cleanup of cpu_startup.c — i was changing some logging output in this file so decided to re-format it and reduce code duplication.

Ref TW6703

See merge request !68
2016-09-20 17:16:41 +08:00
Ivan Grokhotkov e8ae38024d components/freertos: override per-task __cleanup handler to close stdin, stdout, stderr
Default _cleanup_r doesn't do that, which leaks these three file descriptors.
2016-09-19 19:28:36 +08:00
Wangjialin 2be163f6cc add gpio driver code 2016-09-19 17:33:21 +08:00
Ivan Grokhotkov b1ac144874 Merge branch 'driver_merge_tmp/merge_struct_header' into 'master'
add peripheral modules struct headers



See merge request !88
2016-09-19 15:34:37 +08:00
Ivan Grokhotkov ff2750ab07 components/esp32: move peripheral symbols to separate ld script 2016-09-19 15:05:32 +08:00
Wangjialin 015ae7e0d0 fix ledc and spi typo 2016-09-18 19:24:43 +08:00
Wangjialin 94bcb14bcc remove prefix and postfix 2016-09-18 19:05:37 +08:00
Ivan Grokhotkov 9938f512f3 peripheral structure headers: move volatile keyword from members to typedef 2016-09-18 12:36:33 +08:00
Wangjialin 489b4f31a9 add peripheral module struct headers 2016-09-18 03:14:18 +08:00
Angus Gratton 6cffb5d8b4 rom/gpio.h: Use new GPIO_PIN0_REG register name
Closes github #12
2016-09-16 09:43:52 +10:00
Ivan Grokhotkov b0683b0bb4 components/esp32,bootloader: fix build
esp32: use new register name in cpu_start
bootloader: EXTRA_CFLAGS don't work any more, set global CFLAGS in Makefile.projbuild
2016-09-15 02:37:54 +08:00
Ivan Grokhotkov 90e37d9eda fix whitespace after merge 2016-09-15 02:17:08 +08:00
Ivan Grokhotkov cf22e4445a Merge branch 'master' into feature/logging
* master: (45 commits)
  esp32/lib: update to 1303c92c
  dhcpserver: Fix crash when switching wifi mode
  mbedtls: Temporarily disable default hardware crypto SHA & bignum
  mbedtls hwcrypto sha512: Fix redirection of function names
  mbedtls upstream tweak: Move mbedtls_sha512_process in sha512.h
  Format code by using 4 spaces instead
  modify  character conversion error and typo
  modify i2s_reg.h, rebase to master
  Only modify headers in soc/ . Pass compiling under esp-idf-tests/merge_soc_tmp/merge_for_soc_headers branch.(only change some names of register and INUM).
  Rename vender_ie_type_t and vendor_ie_id_t to wifi_vendor_ie_type_t and wifi_vendor_ie_id_t respectively
  modify arguments for vendor ie APIs by using enum instead
  esp32: fix typo
  esp32: fix kconfig
  define lwip task priority in esp_task.h
  components: esp32 - fix build error
  components: lwip - Modify lwip task priority and stack definition method
  components: esp32
  components: esp32
  components: esp32/lwip
  task priority: modify lwip/wifi/event task priority
  ...

# Conflicts:
#	components/bootloader/src/main/bootloader_start.c
#	components/bootloader/src/main/flash_encrypt.c
#	components/bootloader/src/main/secure_boot.c
#	components/esp32/cpu_start.c
2016-09-15 02:15:50 +08:00
Ivan Grokhotkov 0290a34b55 components/esp32: clean up cpu_start
Move CPU region protection setup into soc/cpu.h
change tabs to spaces
remove unused extern declarations
use RTC_WDTCONFIG0 instead of numeric address (still need to fix BB reg)
2016-09-15 02:03:55 +08:00
Ivan Grokhotkov 716cec5ded components/log: add implementation, update a few components to use it
This also removes logging implementation from bootloader and replaces it
with the one provided by the log component. Some occurrences of printf
and ets_printf have been changed to ESP_LOGx APIs.
2016-09-15 00:53:33 +08:00
Wu Jian Gang 2efaf42253 Merge remote-tracking branch 'origin/feature/mbedtls' 2016-09-14 18:05:56 +08:00
Wu Jian Gang b3e671e725 esp32/lib: update to 3372298f
remove freq change in system_init
2016-09-14 17:54:34 +08:00
Ivan Grokhotkov 066f3358a7 components/esp32: use APB_CLK_FREQ instead of a number 2016-09-14 17:54:34 +08:00
Ivan Grokhotkov 5ab769516d components/esp32: add CPU frequency selection in menuconfig
Note that with WiFi stack enabled, system_init will reset frequency to 240MHz.
To make this setting useful, esp32-wifi-libs submodule needs to be updated.
2016-09-14 17:54:34 +08:00
Wu Jian Gang 6bfe892099 esp32/lib: update to 1303c92c 2016-09-14 16:57:00 +08:00
Wu Jian Gang 6104370ac9 Merge branch 'feature/support_vendor_ie_api' into 'master'
esp32: add vendor ie API

1. add esp_wifi_set_vnd_ie
2. add esp_wifi_set_vnd_ie_cb

See merge request !75
2016-09-14 16:53:53 +08:00
qiyueixa 56586a10ac Format code by using 4 spaces instead 2016-09-14 15:18:06 +08:00
Wangjialin f32823ff6c modify character conversion error and typo 2016-09-14 13:47:28 +08:00
Wangjialin c13ab62e4c modify i2s_reg.h, rebase to master 2016-09-14 13:47:28 +08:00
Wangjialin 41d397cf3f Only modify headers in soc/ .
Pass compiling under esp-idf-tests/merge_soc_tmp/merge_for_soc_headers branch.(only change some names of register and INUM).
2016-09-14 13:47:28 +08:00
qiyueixa f02e5cdec7 Rename vender_ie_type_t and vendor_ie_id_t to wifi_vendor_ie_type_t and wifi_vendor_ie_id_t respectively 2016-09-14 13:39:30 +08:00
qiyueixa d866fe84a4 modify arguments for vendor ie APIs by using enum instead 2016-09-14 13:39:30 +08:00
Wu Jian Gang 01cc811ee0 esp32: fix typo 2016-09-14 13:26:17 +08:00
Wu Jian Gang c1a874fb9e esp32: fix kconfig 2016-09-14 12:55:41 +08:00
liuzhifu d2d231de29 define lwip task priority in esp_task.h 2016-09-14 12:00:46 +08:00
liuzhifu 8ed5010356 components: esp32 - fix build error 2016-09-14 12:00:46 +08:00
liuzhifu 2a15eda8bc components: esp32
Remove priority/stack definition of task that is freertos/lwip/app
2016-09-14 12:00:46 +08:00
liuzhifu 109691f9bc components: esp32
add missing file esp_task.h
2016-09-14 12:00:46 +08:00
liuzhifu 9cf997a6fc components: esp32/lwip
Add esp_task.h for placing all task priority/stack size macro definition
2016-09-14 12:00:46 +08:00
liuzhifu 56a684d9eb task priority: modify lwip/wifi/event task priority
1. Modify lwip core task priority to configMAX_PRIORITIES-7
2. Modify wifi startup task priority to configMAX_PRIORITIES-7
3. Modify event task priority to configMAX_PRIORITIES-4
2016-09-14 11:59:25 +08:00
Wu Jian Gang 058a411786 Merge branch 'feature/add_wifi_api_comments' into 'master'
Feature/add wifi api comments

Add wifi API comments


See merge request !63
2016-09-14 11:17:29 +08:00
Angus Gratton 66b6a4c642 Merge branch 'feature/esptool_upstream' 2016-09-14 10:28:41 +10:00
Wu Jian Gang ed8e8848e3 fix typos 2016-09-13 20:54:20 +08:00
Wu Jian Gang b56098a612 Merge remote-tracking branch 'origin/master' into feature/mbedtls 2016-09-13 16:31:48 +08:00
Wu Jian Gang bf5e83a6ed callback: add a void* pointer with each callback
also format event.c/wifi.c/esp_event.h/esp_wifi.h
2016-09-13 16:20:29 +08:00
Wu Jian Gang c56a790f64 header: callbacks use "void *" as arguments 2016-09-13 16:19:09 +08:00
Wu Jian Gang c5f8396df4 header: format and fix typos
SYSTEM_EVENT_STA_GOTIP to SYSTEM_EVENT_STA_GOT_IP
2016-09-13 16:17:41 +08:00
liuzhifu ded5df7513 add wifi api comments 2016-09-13 16:17:41 +08:00
liuzhifu b86e060647 add wifi api comments 2016-09-13 16:17:41 +08:00
Angus Gratton b6b83c33be Merge branch 'feature/bootloader_config' into 'master'
Add bootloader menuconfig entries

Adds log verbosity & ANSI coloring to menuconfig, also some cleanup in cpu_start.c

See merge request !79
2016-09-13 14:31:18 +08:00
Ivan Grokhotkov f9013d9ff8 Merge branch 'feature/dualcore_spi_flash_api' into 'master'
Dual core compatible spi flash APIs

Implementation of spi flash APIs which work in dual core mode.

This also includes other changes:
- fixes to FreeRTOS tasks.c made by Jeroen and me — these were originally made to fix issues with high priority tasks seen in WiFi stack, but were required to get stuff in ipc.c working as well
- initial base idea with two high-priority tasks was separated into a separate API — esp_ipc.h. That API allows one to run a function on the other CPU from a high-priority task. Because we don't have preemption across CPUs, this is currently not very fast: it requires on average half a tick until the second CPU switches to the high priority task. Currently that API can be either blocking, or non-blocking with queue length of 1. I haven't yet found a use case for arbitrary sized queue of IPC requests. Anyone who needs that can trivially add that later by replacing a binary semaphore with a generic queue.

With these changes i can run application with WiFi stack and NVS on both cores.

See merge request !25
2016-09-13 13:58:54 +08:00
Angus Gratton 7ba471d531 esp32 cpu_start: Include rom/uart.h, remove inline ROM function declarations 2016-09-13 14:18:17 +10:00
Ivan Grokhotkov 23d5c7579b components/esp32,spi_flash: update some comments 2016-09-12 20:02:51 +08:00
Ivan Grokhotkov 1b6022bd07 components/esp32: remove dependency of WIFI_ENABLED on FREERTOS_UNICORE 2016-09-12 19:53:38 +08:00
Wu Jian Gang 4598f9fc88 esp32/lib: Bump WiFi revision 2016-09-12 19:32:05 +08:00
Ivan Grokhotkov e9f2645b21 components/esp32: add inter-processor call API and implement spi_flash through it
With this change, flash operations can run on both cores.
NVS and WiFi stack can also run in dual core mode now.
2016-09-12 18:54:45 +08:00