Commit graph

514 commits

Author SHA1 Message Date
Jeroen Domburg d63dac0320 Remove all references to prvLockQueue / prvUnlockQueue 2016-09-23 17:43:52 +08:00
Wu Jian Gang 4480ab6c8c Merge branch 'feature/btdm_controller' into 'master'
BT support

Initial version of BT support.

BT and WiFi are mutually exclusive at this point, so we have a new option to select which stack is used.
Precompiled BT libraries are added as a submodule.


See merge request !109
2016-09-23 15:26:47 +08:00
Ivan Grokhotkov 6718e321f2 components/esp32: clean up unused function warnings in single core mode 2016-09-23 15:02:17 +08:00
snake 6bb5a93221 add 'extern C' in header files 2016-09-23 14:54:30 +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 7b79e4c9ae add .h license header 2016-09-23 11:02:46 +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
Wangjialin 85cd269ef8 add ledc driver code 2016-09-23 09:21:37 +08:00
Ivan Grokhotkov 1c7508885c components/nvs: fix build, use log library instead of printf 2016-09-23 09:00:28 +08:00
Ivan Grokhotkov f2149eabee components/spi_flash: add flash operation counters option to Kconfig 2016-09-23 08:44:45 +08:00
Ivan Grokhotkov 2a68f60874 components/nvs: add erase function
This change exposes functions to erase single key and to erase all keys from namespace.
TW6769, TW6839
2016-09-23 08:08:03 +08:00
wangmengyang 5383af1e2e BLE ADV Demo 2016-09-22 21:15:54 +08:00
Ivan Grokhotkov e87d80d478 components/nvs: fix formatting 2016-09-22 21:05:47 +08:00
Ivan Grokhotkov 076141aab9 components/nvs: batch writes when possible
Introduces new internal function, Page::alterEntryRangeState, which gathers changes to multiple elements of entry state table into a single write, provided that these changes fall into a single word. This allows changing state of up to 16 entries in a single write.
Also adds new function, writeEntryData, which writes the whole payload of SZ and BLOB type entries in one go, instead of splitting it into multiple 32-byte writes.
This reduces number of writes required for SZ and BLOB entries.
2016-09-22 21:05:17 +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
Ivan Grokhotkov bc256cc36d components/bt: add library as submodule 2016-09-22 17:54:19 +08:00
Ivan Grokhotkov db407074f1 components/bt: remove binary library 2016-09-22 17:52:07 +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
Wu Jian Gang c35a9b8cda Merge branch 'bugfix/tw7054' into 'master'
esp32:tw7054 remove sta netif when sta disconnect from ap

When sta disconnect from ap, remove sta netif to let lwip to free all tcp pcbs

See merge request !101
2016-09-22 11:58:33 +08:00
liuzhifu 67e8b3bcaf tcpip_adapter: set sta ip to IP_ADDR_ANY when sta disconnect from ap
When sta is disconnected from AP, set sta ip to IP_ADDR_ANY to trigger lwip
to clean up all TCP/UDP pcbs.
2016-09-22 11:49:37 +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
Ivan Grokhotkov b59aa4a282 Merge branch 'driver_merge_tmp/merge_gpio' into 'master'
add gpio driver code



See merge request !93
2016-09-22 11:21:18 +08:00
Wangjialin 71fe8d9f15 Merge branch 'master' into driver_merge_tmp/merge_gpio 2016-09-22 10:50:06 +08:00
Ivan Grokhotkov ba75f837b8 components/spi_flash: add performance counters 2016-09-22 10:39:36 +08:00
Wangjialin d2420b667c use uint8_t for fifo struct in uart and i2c 2016-09-22 09:05:39 +08:00
Ivan Grokhotkov 12a0786e2a components/nvs: maintain item hash list at page level 2016-09-21 18:02:52 +08:00
Ivan Grokhotkov f06ebeba86 components/nvs: avoid reading just-erased page 2016-09-21 18:02:52 +08:00
Wu Jian Gang 31f74b8008 Merge branch 'feature/wifi_lib_update' into 'master'
bugfix: reboot halt and deep sleep crash

1. Fix reboot halt bug, TW7355
2. Fix system crash when calling system_deep_sleep(), TW7356

See merge request !104
2016-09-21 17:22: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
Wangjialin 92569082c6 Remove some macros and declarations that are already in rom/gpio.h 2016-09-21 12:08:42 +08:00
Wu Jian Gang 4f93b49e0a esp32/lib: update to 9403d944 2016-09-21 11:37:10 +08:00
Wangjialin f7b10745be Remove mutex from GPIO driver code. Replace uint8_t/uint16_t with uint32_t 2016-09-21 09:51:37 +08:00
Angus Gratton af82eed35d Merge branch 'bugfix/macos_build' into 'master'
fix kconfig build on macOS

macOS version of sed doesn't recognize \r as special character.
Replacing with \x0D substitution which works everywhere.

See merge request !96
2016-09-20 19:28:20 +08:00
Ivan Grokhotkov d09a79c20d Merge branch 'feature/menuconfig_cpu_frequency_option' into 'master'
Add CPU frequency selection in menuconfig

See merge request !81
2016-09-20 17:45:46 +08:00
Ivan Grokhotkov 9a1bf32274 Merge branch 'feature/lwip_add_debug_code' into 'master'
lwip: add debug code to show udp/tcp pcbs

Add code to show all tcp/udp pcbs, these kind of debug info is helpful for lwip issue debugging.

See merge request !98
2016-09-20 17:22:22 +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 d260aa777c Merge branch 'bugfix/lwip_so_reuse' into 'master'
make SO_REUSE configurable via menuconfig

SSC expects SO_REUSE to be off by default.
Trivial change, moving this option to menuconfig.
This should also (finally!) fix failing tests in master.

See merge request !99
2016-09-20 17:13:09 +08:00
Ivan Grokhotkov 3b22173a93 components/lwip: fix grammar 2016-09-20 16:53:56 +08:00
Ivan Grokhotkov 6b42b90595 Merge branch 'master' into bugfix/lwip_so_reuse
* branch 'master':
  components/freertos: override per-task __cleanup handler to close stdin, stdout, stderr
  gitlab-ci: allow running tests for branches, triggered via API
2016-09-20 16:24:21 +08:00
Ivan Grokhotkov 316d3f9c4a components/lwip: make SO_REUSE configurable via menuconfig
Not all environments need or can work with SO_REUSE enabled, so making this option configurable.
2016-09-20 15:36:55 +08:00
liuzhifu f64e1c54b7 lwip: add license and add lwip_debug.h 2016-09-20 15:36:49 +08:00
liuzhifu 50c7583f4d lwip: add debug code to show udp/tcp pcbs 2016-09-20 14:51:03 +08:00
Ivan Grokhotkov dcf34b1be1 bootloader: remove trailing newlines from log messages 2016-09-20 14:18:23 +08:00
Ivan Grokhotkov 45df01ef68 Merge branch 'feature/ci_test_trigger' into 'master'
allow running test suite for branches, triggered via API

One line change to run testing step for branches, if the build is triggered via API.


See merge request !91
2016-09-20 14:11:24 +08:00
Ivan Grokhotkov 6ca02748ac Merge branch 'bugfix/newlib_fd_memory_leak' into 'master'
override per-task __cleanup handler to close stdin, stdout, stderr

Default _cleanup_r function (called from _reclaim_reent) calls _fclose_r for all file descriptors related to a particular instance of struct _reent.
It does that by calling _fwalk_reent, which iterates over __sglue list in struct _reent and calls _fclose_r for each member. But _stdin, _stdout, and _stderr are not in this list, so _fclose_r is not called for them. Which leads to a memory leak.
The easy way to fix this is to reset __cleanup member of struct _reent to our new “patched” version, which first calls the original version (_cleanup_r) and then does _fclose_r for each of the stdin, stdout, and stderr.

See merge request !94
2016-09-20 12:12:06 +08:00