Commit graph

1264 commits

Author SHA1 Message Date
Ivan Grokhotkov eac80b0651 deep sleep: add option to delay CPU startup
When ESP32 wakes up from deep sleep, flash is accessed an approximately 900us after power on.
Some flash chips need more time to become ready. This change adds a menuconfig option to add
some delay to the default deep sleep wake stub.

Fixes https://github.com/espressif/esp-idf/issues/117
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 3b854fe46a deep sleep: implement wake up using ULP, EXT0, EXT1 sources
This adds the following APIs to enable various wakeup sources:
- esp_deep_sleep_enable_timer_wakeup
- esp_deep_sleep_enable_ulp_wakeup
- esp_deep_sleep_enable_ext0_wakeup
- esp_deep_sleep_enable_ext1_wakeup

And an API to start deep sleep:
- esp_deep_sleep_start
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov 71daf49e39 driver/rtc_io: improve header comments
Fix descriptions of return values, fix typos, use upper case for abbreviations.
2016-12-16 14:30:27 +08:00
Angus Gratton d246836cfc Merge branch 'feature/spiflash_unaligned_readwrite' into 'master'
Remove alignment reqs from spi_flash_{read,write}

Github pull request https://github.com/espressif/esp-idf/pull/155

See merge request !311
2016-12-16 13:28:12 +08:00
Wu Jian Gang 87d0eb0fdb Merge branch 'feature/tw8657_refractor_to_sniffer' into 'master'
refactor to sniffer

1. WiFi send the whole packet to smartconfig
2. Fixed some modem sleep bugs


See merge request !306
2016-12-15 19:03:44 +08:00
Liu Zhi Fu 3984d96acb esp32: refactor to sniffer
1. TW8657, WIFI send the whole packet to smartconfig;
2. modify API annotation of smartconfig and sniffer;
3. export smartconfig APIs to programming guide;
2016-12-15 18:20:00 +08:00
Wu Jian Gang 847092e483 Merge branch 'bugfix/tw9240_fix_lwip_dual_core_issue' into 'master'
lwip: fix lwip dual core issue

Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.

See merge request !314
2016-12-15 17:33:28 +08:00
Xia Xiaotian eec743d04c esp32: update wifi lib, fix some modem sleep bugs
1. tw7426: fix the bug that config ap crashes(7bb90c19)
2. tw9149: fix memory leak in modem sleep(1f450cb8)
3. tw9157: fix dtim change log in modem sleep(1f450cb8)
4. update smartconfig.a
2016-12-15 17:18:40 +08:00
Ivan Grokhotkov 9d5f4e877e Merge branch 'bugfix/heap_alloc_no_iram' into 'master'
Restore ability to alloc IRAM, and more.

- Fix mem regions so allocating IRAM works again
- Optimize allocator slightly, uses 4 less bytes per malloc now
- Allow querying free heap memory space per memory type


See merge request !301
2016-12-15 16:28:29 +08:00
Jiang Jiang Jian 70d39aa105 Merge branch 'bugfix/btdm_bluedroid' into 'master'
Bugfix/btdm bluedroid

Cleanup all the warnings。
Fix GATT CLIENT cannot receive notfiy/indicate from GATT SERVER bug.

Originally, bluetooth have its own master branch(feature/btdm_bluedroid), all the bluetooth sub branch will merge to feature/btdm_bluedroid firstly. If feature/btdm_bluedroid is ready, it will request merge to master. But as Ivan/JG/Jack's requires, all the bluetooth bugfix or feature will request merge to master ASAP.
This MR contains "cleanup warning " and "some bug fix", after, every merge request only contain one thing.

See merge request !286
2016-12-15 16:10:21 +08:00
Liu Zhi Fu 55726385a4 add more comments and call portYIELD when necessary 2016-12-15 15:06:00 +08:00
Jeroen Domburg 712f53176d Make internal function static 2016-12-15 15:03:22 +08:00
Jeroen Domburg 6f0a494cae Add testcase, fix executable memory allocated in shared dram/iram region 2016-12-15 15:03:22 +08:00
Jeroen Domburg 1e117dc3d3 Fix small things noticed in MR, add documentation 2016-12-15 15:03:22 +08:00
Jeroen Domburg 293ad4cd36 Add xPortGetFreeHeapSizeCaps and xPortGetMinimumEverFreeHeapSizeCaps plus everything it entails. Allows querying the available memory for various capabilities. Also: xPortGetFreeHeapSize and xPortGetMinimumEverFreeHeapSize now return the expected value. Bonus: the linked list used in the allocator is now 4 bytes smaller, which should save some memory. 2016-12-15 15:03:22 +08:00
Jeroen Domburg 3f3cf397f7 Tabs -> spaces 2016-12-15 15:03:22 +08:00
Jeroen Domburg 1cb2081d99 Do not disable entire IRAM pool; instead disable only the bit that is used. This gives us 50K of iram at the moment. 2016-12-15 15:03:22 +08:00
Jeroen Domburg 25e7f3a303 Add name to tag type 2016-12-15 15:03:22 +08:00
Tian Hao 5a2033c4e3 Merge branch 'master' into bugfix/btdm_bluedroid 2016-12-15 14:40:29 +08:00
Liu Zhi Fu 5e2ae7ac19 lwip: fix lwip dual core issue
Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.
2016-12-15 14:37:21 +08:00
Tian Hao d242251295 component/bt : fix advertising bug
1. low duty can not be set bug
2. adv type can not be effective bug
2016-12-15 14:33:09 +08:00
Tian Hao f3450abf3d component/bt : add some macro , so redo the doxygen 2016-12-15 14:02:48 +08:00
Tian Hao d045187c0f component/bt : change the resolving list cleanup position
1. enable will malloc, but disable don't free resolving list, so fix it
2. In disable procedure, it will alloc alarm to hash_map, and all the alarm  hash_map will be free in deinit. So this need not be fixed currently.
2016-12-15 13:35:30 +08:00
Jeroen Domburg 1037a50abe Convert DOS line ends to Unix line ends in drivers 2016-12-15 09:45:40 +08:00
Jeroen Domburg 3ed16758c0 Update examples in uart.h 2016-12-15 09:44:21 +08:00
Deomid Ryabkov d288a3d053 Remove alignment reqs from spi_flash_{read,write} 2016-12-15 10:07:31 +11:00
Angus Gratton 487548e7dd Merge branch 'bugfix/build_system_linker_script_deps' into 'master'
build system: Linker scripts or binary libraries should trigger a re-link

Add binary libraries and linker scripts to the list of dependencies for the ELF file.

Fixes TW7816.


See merge request !307
2016-12-15 05:38:54 +08:00
Deomid Ryabkov cbff82cc44 Allow gw to be null
Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.
2016-12-14 19:34:04 +00:00
Tian Hao aba262b18b component/bt : fix bluetooth disable memory leak 2016-12-15 01:36:27 +08:00
Tian Hao 69ee1de9fa component/bt : fix enable bug
1. enable will cause exception with list->head memory modify
2. gatt complete, timeout with HCI cmd timeout will cause exception
2016-12-14 22:10:21 +08:00
Tian Hao 5e87cdec7e component/bt : increase the task stack size
1. increase HCI task stack size
2. increase BTC task stack size for default
2016-12-14 22:10:21 +08:00
Tian Hao fd11beebcd component/bt : fix the init/deinit memory leak
1. modify the memory debug
2. fix init/deinit memory leak
2016-12-14 22:10:21 +08:00
Tian Hao 7ae7a56457 component/bt : fix the bug of deinit/disable
1. fix the exception of deinit/disable
2. debug mem leak of deinit, fix some memleak, but still something wrong.
3. debug men leak of disable.
4. add bluedroid memory debug
2016-12-14 22:10:21 +08:00
Jeroen Domburg d5c57d1d10 Put ets_isr_* functions into IRAM. Original fns were in ROM so people may expect them to work when flash cache is out. 2016-12-13 13:24:01 +08:00
Ivan Grokhotkov 8f3c74353a newlib: fix unit test name in test config 2016-12-13 13:24:01 +08:00
Ivan Grokhotkov 071615b059 freertos: fix TLS delete callback test
“Full” printf uses more stack space than “nano” printf, and more space than available in the idle task.
This caused stack overflow in TLS delete test. Replacing printf with ets_printf.
2016-12-13 13:24:01 +08:00
Jeroen Domburg 78161a1fe3 Replace non-multicore-aware rom funcs with multicore-aware funcs, ESP_LOG->ESP_EARLY_LOG fix, reserve ints used in wireless libs. Fixes WiFi crashing 2016-12-13 13:24:01 +08:00
Liu Han d60ff9b6f6 components/tcpip_adapter: Fix set static IP address issue
Set static IP address, clear current DNS servers.
2016-12-13 09:52:29 +08:00
Ivan Grokhotkov 2a4b150017 Merge branch 'test/integrate_stress_test_to_CI' into 'master'
add supported stress test to CI

add supported stress test to CI:

stress test requires long time to execute. They will only be executed when variable NIGHT_BUILD=YES. Therefore we'll use gitlab-API trigger to execute stress test cases.

See merge request !220
2016-12-12 16:20:13 +08:00
Angus Gratton bbe1bceda8 build system: Project ELF should depend on linker scripts, binary libraries
TW#7816
2016-12-12 15:58:53 +11:00
Ivan Grokhotkov 1c60a0450e Merge branch 'bugfix/driver_cleanup_log' into 'master'
drivers: remove file paths from log statements

Function name and error string are usually sufficient to find the place which has triggered an error. 

`__FILE__` macro generates a string which has absolute file name (with our build system), which add many long strings to the program binary.

Also change log tags to lower case to match style used elsewhere.

Fixes https://github.com/espressif/esp-idf/issues/126

See merge request !282
2016-12-12 10:15:25 +08:00
Angus Gratton bab1d49f1f Merge branch 'feature/esptool_flash_encryption' into 'master'
Flash encryption support

Flash encryption support in build system, tooling

To come in future MR:
* On-device key generation on first boot (for production devices), need to finalise testing of bootloader entropy seeding.
* spi_flash_encrypted_write to support non-32-byte block writes (at least optionally.)
* I think a lot of the bootloader_support component can possibly be rolled into "spiflash" and other components, to use a common API.

See merge request !240
2016-12-12 06:50:46 +08:00
Ivan Grokhotkov f504e23d0f bootloader, driver/rtc: fix warnings about unused functions 2016-12-09 15:47:32 +08:00
Tian Hao 1be09039e3 component/bt : cleanup the un-necessary include in api.h
1. cleanup the un-necessary include in api.h for "extern c"
2. add UUID define
2016-12-09 14:38:21 +08:00
Tian Hao 4c6ccf1c23 component/bt : add cpp extern c
1. add cpp extern c
2. retab tab to 4 space
2016-12-09 14:38:21 +08:00
Tian Hao e0e6966be0 component/bt : fix the authentication req type 2016-12-09 14:38:21 +08:00
Tian Hao 8185b0f806 component/bt : fix bug of bdaddr point to resolve gattc recv notify 2016-12-09 14:38:21 +08:00
Jeroen Domburg bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Angus Gratton f68e1c22ab Merge branch 'bugfix/ci_fail_warnings' into 'master'
Fail CI build on warnings

This allows developers to add CFLAGS for -Wno-error=XXX while developing, but before code passes the CI build then it must be warning-free.

See merge request !279
2016-12-09 13:25:51 +08:00
Angus Gratton 9fd7908bbe Merge branch 'bugfix/spiflash_erase_block' into 'master'
SPI flash: Block erase size 64KB not 32KB

Reverts changes made in 9f9d92b2df

See merge request !298
2016-12-09 13:19:09 +08:00
Ivan Grokhotkov cf311d81ee Merge branch 'feature/newlib_full_format' into 'master'
newlib: add "full" formatting support

This change adds support for 64-bit formats and C99 features to newlib printf/scanf functions. This support is enabled by default in menuconfig, but can be switched off to reduce code size.

Also adds missing functions such as fmod and fmodf.

- Fixes https://github.com/espressif/esp-idf/issues/52
- Fixes https://github.com/espressif/esp-idf/issues/83


See merge request !274
2016-12-09 12:04:29 +08:00
Angus Gratton 8ba75a1e9f SPI flash: Block erase size 64KB not 32KB
Reverts changes made in 9f9d92b2df
2016-12-09 14:18:58 +11:00
Yinling a283042258 switch socket recv print for stress test 2016-12-09 10:45:10 +08:00
Ivan Grokhotkov bf7fbdf3cf Merge branch 'feature/mbedtls/add_menuconfig_component' into 'master'
components/mbedtls: add time and time data configuration at menuconfig



See merge request !268
2016-12-08 22:25:26 +08:00
Yinling 5e1cdd3422 fix bug in test case TCPIP_TCP_5101
test time is not set in test case and not used to control test time
2016-12-08 16:15:49 +08:00
Tian Hao 8ca6e37c12 component/bt : delete the un-used lines 2016-12-08 15:00:19 +08:00
Jeroen Domburg baa6a477c5 Fix example code, add chapter to docs about interrupts and multicore issues 2016-12-08 14:42:00 +08:00
Liu Han c1802eaa98 components/mbedtls: add time and time data configuration at menuconfig 2016-12-08 13:33:47 +08:00
Angus Gratton f807d16310 Merge branch 'feature/backtrace_dumps' into 'master'
Feature/backtrace dumps

Github pull request https://github.com/espressif/esp-idf/pull/149

(Plus reformatting of panic.c, as it hadn't been formatted to our code style yet.)

See merge request !290
2016-12-08 13:27:33 +08:00
Jeroen Domburg cb9ef19d3b Also add intr_alloc magic to rtc code 2016-12-08 12:57:57 +08:00
Jeroen Domburg 2c34ab3374 Mark some interrupts that are now allocated dynamically as free, add int handle param documentation, add local ints test 2016-12-08 12:39:33 +08:00
Jeroen Domburg 9dc908d105 Add test for local interrupts, fix int disable code 2016-12-08 12:39:33 +08:00
Jeroen Domburg ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Jeroen Domburg 32fa94935d Changes according to merge request 2016-12-08 12:39:33 +08:00
Jeroen Domburg 655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Ivan Grokhotkov 221dc13535 newlib: add "full" formatting support, add missing functions
- add two versions of libc: libc.a and libc_nano.a. First one has full C99 formatting support, second one uses “nano” formatting functions available in ROM.
- fix linker error for fmod, fmodf, atof, atoff
- update tests
2016-12-08 11:04:54 +08:00
Ivan Grokhotkov 505282bab1 Merge branch 'feature/select_default_uart' into 'master'
UART console selection

This change adds a set of menuconfig options to set custom UART#, baud rate, and pins, for console output.
Ref. TW8146

Also includes the following changes:
- `uart_tx_wait_idle`: fix issue with last character not transmitted. ROM function `uart_tx_wait_idle` may have a bug which causes the function to return before the final character is fully transmitted. This replaces `uart_tx_wait_idle` declaration with a static inline definition which fixes the issue. Also replaces the use of `uart_tx_flush` with `uart_tx_wait_idle` in `esp_restart`, to remove garbage in console output on restart.
- `rtc_printf` is temporary replaced with a no-op, pending a new release of librtc.a. Current release assumes that UART0 is used for output,
and switches UART0 baud rate while doing frequency changes and printing some log output. This doesn’t work if a different UART is used for output.
- disable boot watchdog only after starting the main task. Boot watchdogs were disabled very early in startup code. It was possible to introduce an infinite loop anywhere in the many functions called from startup code, and this would not be detected by interrupt watchdog and task watchdog. This change postpones disabling of boot watchdogs to the point when the scheduler is running. Also replaces register expressed using integer address with a name. This change is not directly related to the previous ones, but was found while debugging UART selection features.

See merge request !288
2016-12-08 10:58:44 +08:00
Ivan Grokhotkov a1542421c0 Merge branch 'bugfix/pcnt_driver' into 'master'
Fixing some syntax errors in pcnt



See merge request !278
2016-12-08 10:48:05 +08:00
Ivan Grokhotkov e3eff5deb9 cpu_start: tabs->spaces 2016-12-08 10:20:12 +08:00
Angus Gratton 81e721ebcb Merge branch 'bugfix/rmt_debug_newline' into 'master'
Removal of spurious newline character in debug statement

There was a debug statement in the code that included an additional newline character that wasn't needed.

From github PR: https://github.com/espressif/esp-idf/pull/124

See merge request !291
2016-12-08 10:05:11 +08:00
Ivan Grokhotkov a00762f1f9 Merge branch 'bugfix/netif_zero_init' into 'master'
Zero-fill netif on alloc

LwIP's `struct netif` was not zero-initialized after allocation, so `ipv6_addr_cb ` function pointer contained garbage. This caused a crash if the device was on an IPv6 capable network.

Fixes https://github.com/espressif/esp-idf/issues/133, https://github.com/espressif/esp-idf/issues/147, https://github.com/espressif/esp-idf/issues/142.

Source: https://github.com/espressif/esp-idf/pull/148

See merge request !289
2016-12-08 10:02:15 +08:00
Neil Kolban dbc5edac7e Removal of spurious newline character in debug statement
There was a debug statement in the code that included an additional newline character that wasn't needed.
2016-12-07 13:57:09 -08:00
tzx 25e4e21226 app_update: clean up warning log when compile any project 2016-12-07 13:49:53 -08:00
Tian Hao 5933ebc6b6 component/bt : cleanup all the "-W-no-xx" and all the warnings
1. cleanup the warnings.
2. fix the some function called in gap
3. fix some code in btc_main
2016-12-07 13:49:53 -08:00
Angus Gratton 94d2f77643 build system: Remove FLAGS_XXX variable option, replace with per-target overrides
Use for targeted disabling of warnings in LWIP.
2016-12-07 13:49:09 -08:00
Angus Gratton b98405f9d9 esp32: ReformatReformat panic.c (remove tabs, etc) 2016-12-07 13:25:56 -08:00
Deomid Ryabkov 20fd57f147 Add backtrace to exception output.
On Xtensa windowed ABI backtrace is easy to do, and it's immensely
useful for debugging, so - do it by default.
We try to be careful and not deref bogus pointers while walking the
frames.

Example output (from debugging espressif/esp-idf#133):

Backtrace: 0x1:0x3ffc51e0 0x400e9dfa:0x3ffc5210 0x400e9ebc:0x3ffc5230 0x400ec487:0x3ffc5260

With just addr2line utility from binutils, this already pinpoints the
location of the crash.
2016-12-07 19:58:06 +00:00
Ivan Grokhotkov 13d802262a cpu_start: disable boot watchdog only after starting the main task
Boot watchdogs were disabled very early in startup code. It was possible to introduce an infinite loop anywhere in the many functions called from startup code, and this would not be detected by interrupt watchdog and task watchdog. This change postpones disabling of boot watchdogs to the point when the scheduler is running. Also replaces register expressed using integer address with a name.
2016-12-08 01:42:37 +08:00
Ivan Grokhotkov b57aecdfe9 uart_tx_wait_idle: fix issue with last character not transmitted
- ROM function uart_tx_wait_idle may have a bug which causes the function to return before the final character is fully transmitted.
  This replaces uart_tx_wait_idle declaration with a static inline definition which fixes the issue.
- Also replaces the use of uart_tx_flush with uart_tx_wait_idle in esp_restart, to remove garbage in console output on restart.
- rtc_printf is temporary replaced with a no-op, pending a new release of librtc.a. Current release assumes that UART0 is used for output,
  and switches UART0 baud rate while doing frequency changes and printing some log output. This doesn’t work if a different UART is used for output.
2016-12-08 01:42:37 +08:00
Ivan Grokhotkov b3f6cd08db support for console redirection to other UART
This change adds a set of menuconfig options to set custom UART#, baud rate, and pins, for console output.
Setting happens in bootloader startup code for PRO CPU, and in application startup code for APP CPU.
Ref. TW8146
2016-12-08 01:42:37 +08:00
Deomid Ryabkov ce8b52617e Zero-fill netif on alloc
Fixes espressif/esp-idf#133
2016-12-07 14:32:29 +00:00
Chu Shu Chen b1db2721dc driver: add rtc module and bugfix gpio32 gpio33
feature(rtc_module):add rtc module

1. add rtc io control API (pull,output and input)
2. add touch pad API (touch pad read and interrupt)
3. add adc1 API (the max width is 12 Bits and support attenuation)
4. add hall sensor API (support hall sensor read )
5. add dac API (the width is 8 Bits)

bugfix(gpio):gpio32 and gpio33 can not output and input

the gpio32 and gpio33 is initialize by librtc.a,and gpio_config not initialize the gpio as
digital gpio.they can not output and input,when users use gpio32 or gpio33.And there are some problems
about others driver ,when they use gpio32 or gpio33 as  matrix.
2016-12-07 15:56:13 +08:00
Ivan Grokhotkov 0dff9ed79d drivers: remove file paths from log statements
Function name and error string are usually sufficient to find the place which has triggered an error. __FILE__ macro generates a string which has absolute file name (with our build system), so there is a lot of long strings present in the program because of that.

Fixes https://github.com/espressif/esp-idf/issues/126
2016-12-07 12:01:54 +08:00
Ivan Grokhotkov 60d7440781 Merge branch 'feature/debugging_fixes' into 'master'
Small debugging fixes

Invoke panic handler when a stack overflow has been detected; unhandled interrupt handler now prints interrupt/cpu number for easier pinning down of source.

See merge request !277
2016-12-07 10:30:17 +08:00
Angus Gratton 9a774848d4 Merge branch 'bugfix/gdbstub_no_sync_gdb' into 'master'
Gdbstub: Fix bug, small cleanup

Tianzhongxing found a small bug preventing gdbstub to work in certain cases. This fixes it, as well as including some minor cleanups.

See merge request !260
2016-12-07 03:20:07 +08:00
Yinling ec40053720 add supported stress test cases to CI 2016-12-06 15:41:02 +08:00
me-no-dev 3cd9cb8911 Fix comment in the header 2016-12-06 02:10:35 +02:00
me-no-dev 2dbae95a7e Fix wrong assignment of channel and unit in pcnt_unit_config 2016-12-06 01:11:32 +02:00
Jeroen Domburg c852e9958b Invoke panic handler when a stack overflow has been detected; unhandled interrupt now prints interrupt/cpu number. 2016-12-05 20:37:59 +08:00
Ivan Grokhotkov c8685c2002 Merge branch 'feature/ulp' into 'master'
Initial support for generation of ULP coprocessor code

This adds basic support for writing ULP coprocessor programs using an assembly-like syntax, with integer labels and branches to labels.

See merge request !261
2016-12-02 22:45:47 +08:00
Liu Zhi Fu 5f47b85b87 freertos: default run program on 1st cpu
Modify the default cpu-mode to single cpu mode and always run the program on the 1st core
2016-12-02 18:17:57 +08:00
Jeroen Domburg 004aadfe70 Fix small bug in gdbstub where it sometimes would not return a valid stop reason, timing out gdb. Also clean up the code a bit. 2016-12-02 17:42:11 +08:00
Liu Zhi Fu 9423390c2e esp32: fix tw6901
1. tw6904 - esp32 mode switch cause exception
2. tw8881 - set mac cause exception
3. Make pm_open/pm_shutdown thread-safe
2016-12-02 17:35:49 +08:00
Angus Gratton ceb8566970 Flash encryption / secure boot: Temporarily disable on-device key generation
Will be enabled after seeding of HWRNG in bootloader is fully tested/qualified.
2016-12-01 23:49:13 -08:00
Angus Gratton a9d5e26748 Secure boot: Correctly re-sign if signing key changes, better error if missing 2016-12-01 23:49:12 -08:00
Angus Gratton 506c8cd964 secure boot & flash encryption: Rework configuration options
Add UART bootloader disable options for flash encryption
2016-12-01 23:49:12 -08:00
Angus Gratton 9eb135fd73 Flash encryption: Support enabling flash encryption in bootloader, app support
* App access functions are all flash encryption-aware
* Documentation for flash encryption
* Partition read/write is flash aware
* New encrypted write function
2016-12-01 23:49:12 -08:00
Ivan Grokhotkov ab3677d64c initial support for generation of ULP coprocessor code 2016-12-01 20:26:47 -08:00
Jiang Jiang Jian bd20288b81 Merge branch 'feature/btdm_bluedroid' into 'master'
Feature/btdm bluedroid

This branch contain the bluedroid host code.
Currently,  Only GAP/GATT SERVER/GATT CLIENT release to users.
Actually, the content of the codes is further more than GAP/GATT and etc.
In this release version, users only need to concern about the APIs which are in "api/include/".

Now, suggestions in comment have been resolved are following:
1. The APIs use callback function. Ivan , Jeroen and me have discussed it. Currently the code will not be changed.
2. The APIs use OPEN/CLOSE. I have ask Ivan, besides bluedroid do this, we will keep the name.
3. Coding style. I have run format.sh to handle the style. And some spell error have been fixed.
4. APIs doxygen. I have clean the warning by doxygen. But bt.rst is still need to be completed.
5. Other comment without resolved face to face that I have to add response in the comment and fix them in the code
6. Fix some incorrect things. See the git log for details.

This 1st version of bluedroid release still have lots of things to do. But it can be done after this merge.
1. Compelete the BLUFI(Bluetooth config wifi connection) documents, security, application protocol and other.
2. Add SPP-LIKE profile.
3. Do more examples codes to cover most of the APIs.
4. Test and fix bug.

Another thing:
1. Do the document of APIs.(xml->bt.rst->html) 
(I will do this before merge as Ivan's suggestion)
This is already done. Besides, the union type in doxygen have something error. Ivan will fix it.



See merge request !239
2016-12-02 12:07:20 +08:00
Tian Hao d925b96daf component/bt : cleanup the function warning in doxygen 2016-12-01 20:55:08 +08:00
Tian Hao 954ffa102f component/bt : add ble event type 2016-12-01 20:16:09 +08:00
Tian Hao bdf4006da7 component/bt : cleanup the return style 2016-12-01 19:58:52 +08:00
shangke e0040af7e5 ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
Tian Hao c6ec70b67b component/bt : cleanup the function comment as doxygen type 2016-12-01 18:58:54 +08:00
Wu Jian Gang c110795718 Merge branch 'feature/tcpip_get_hostname' into 'master'
tcpip_adapter: teamwork 8964

add get netif host name feature

See merge request !264
2016-12-01 16:51:40 +08:00
Wu Jian Gang 099e3030bf Merge branch 'bugfix/init_factory_bin' into 'master'
bugfix/init_factory_bin: fix inconsistency between bootloader and OTA code

init_factory_bin: 2nd bootloader use a wrong logic select factory  image to boot,and some bug in OTA code 

See merge request !266
2016-12-01 16:14:42 +08:00
Wu Jian Gang 60ac08115f Merge branch 'bugfix/ota_doc_error' into 'master'
bugfix/ota_doc_error: fix return error of ota docs

fix doc return error of ota api 

See merge request !265
2016-12-01 16:10:06 +08:00
tzx 9b2cad4174 docs: fix return error of ota docs and fix ota.rst 2016-12-01 13:54:25 +08:00
tzx 2092d14e45 app_update: fix inconsistency between bootloader and OTA code 2016-12-01 13:46:02 +08:00
Xia Xiaotian ad555d68d3 esp32/lwip: add check sleep
1. fix tw8911 sleep in scan leads to auth frame malloc fail.

2. fix tw8913 pm state transfer wrong leads to wdt.

3. make some comments for modem sleep and wpa2 enterprise.

4. removd duplicated debug option ESP_THREAD_SAFE_DEBUG
2016-12-01 13:34:36 +08:00
Tian Hao 281a9c2761 component/bt : fix a code bug 2016-12-01 12:14:57 +08:00
Tian Hao 1abf2c4ed7 component/bt : update lib 2016-12-01 12:05:42 +08:00
Tian Hao ba96c0d2e9 Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf into feature/btdm_bluedroid 2016-11-30 19:08:40 +08:00
Wu Jian Gang 59f3684dee Merge branch 'bugfix/tw8868_fix_packet_length_erro_in_ap_bridge_mode' into 'master'
esp32: update wifi lib to fix tw8868

In AP bridge mode, the length of the forwarded data is wrong, it's 26Btyes longer, thus cuase
AP can't forward the data of which length is 1460. This modification is to make the
data length right.

See merge request !262
2016-11-30 18:01:31 +08:00
liuhan 1b9a4a8139 tcpip_adapter: add get netif host name api 2016-11-30 17:41:19 +08:00
Liu Zhi Fu 144a1567e3 esp32: change wap2 enterprise encrypt type to 5
1. b332f3b5 - change wap2 enterprise encrypt type to 5
2. modify the print info of station state transmition
2016-11-30 17:34:19 +08:00
liuhan 7114f933bb tcpip_adapter: fix bug 7462
modify the code execution condition
2016-11-30 15:24:49 +08:00
Liu Zhi Fu 72453e3e6b esp32: update wifi lib to fix tw8868
In AP bridge mode, the length of the forwarded data is wrong, it's 26Btyes longer, thus cuase
AP can't forward the data of which length is more than 1460. This modification is to make the
data length right.
2016-11-30 14:20:05 +08:00
Wu Jian Gang 527767d31c Merge branch 'bugfix/tw8851_some_phy_cause_wifi_connect_fail' into 'master'
esp32: fix tw8851 some phy version cause wifi connect fail

Update phy version to 258 to fix tw8851
When upgrade the phy version, the RF calibration version is not change, but the calibration data format is changed and the wrong calibration data causes wifi connection failure. The solution is to make RF calibration data and phy version the same version.

See merge request !258
2016-11-29 20:15:30 +08:00
Tian Hao 6010ea713f component/esp32/: update submodule log 2016-11-29 20:07:45 +08:00
Wu Jian Gang f4df733edf Merge branch 'tw8810' into 'master'
lwip: update open socket number.

modify default number from 4 to 10

See merge request !259
2016-11-29 20:06:06 +08:00
Liu Zhi Fu d2c61cae8c esp32: update wifi lib
1. update phy to version 258 to fix wifi upgrade cause wifi connect fail issue
2. update fix_printf.sh
3. fb5a2b07 - default set ps type to WIFI_PS_NONE
2016-11-29 19:46:34 +08:00
Tian Hao 758a9e5f06 component/bt : fix compile error 2016-11-29 19:45:10 +08:00
Tian Hao 4c83238a85 component/bt : fix compile error 2016-11-29 19:25:27 +08:00
Tian Hao 5a9801aca7 Merge branch 'master' into feature/btdm_bluedroid
# Conflicts:
#	components/esp32/cpu_freq.c
#	components/esp32/lib
2016-11-29 18:38:37 +08:00
Tian Hao 5a14e8addf component/bt : use ESP_LOGx instead of printf 2016-11-29 17:42:04 +08:00
Tian Hao 9f33d8f5c0 component/bt : add write type 2016-11-29 17:27:12 +08:00
liuhan f9d2d63e75 lwip: update open socket number.
modify default number from 4 to 10
2016-11-29 16:25:17 +08:00
Tian Hao 3a3d4276f8 component/bt : cleanup the comment and pass all doxygen check 2016-11-29 15:32:29 +08:00
Tian Hao 06e2a1d4e1 component/bt : cleanup a macro 2016-11-29 14:38:58 +08:00
Wu Jian Gang de5279ce6c Merge branch 'feature/fota_ops_api' into 'master'
Add fota ops api

add ota core function implement
1. esp_ota_begin: init ota partition need to be update, output ota handle,every partition need ota should be init firstly 
2. esp_ota_write: write image data to update partition, will record wrote size automatically
3. esp_ota_end: verify image after ota ended
4. esp_ota_set_boot_partition: set next boot partition
5. esp_ota_get_boot_partition: get current running partition

See merge request !256
2016-11-29 13:45:44 +08:00
Angus Gratton 01e94998c4 Merge branch 'bugfix/mbedtls_sha384' into 'master'
Bugfix mbedtls sha384 clone()

mbedtls_sha512_clone() on a SHA-384 hash caused incorrect digest

Also adds additional mbedtls unit tests into the unit tests project (including one for this bug).

See merge request !252
2016-11-29 03:16:30 +08:00
Tian Hao f6de7ea764 component/bt : cleanup status and spell check 2016-11-28 22:40:30 +08:00
Tian Hao 9d9e758756 component/bt : add comment for doxygen
1. use doxygen check api comment
2016-11-28 21:59:04 +08:00
Liu Zhi Fu 5b4361f60a esp32: update wifi lib to add tw8913 fix
dfe73737 - tw8913 wakeup first before scan
2016-11-28 20:11:43 +08:00
Liu Zhi Fu fc2883a59a lwip: modify according code review
1. Modify tcp window size/send buffer back to 4/2
2. Disable lwip statistics by default
2016-11-28 19:54:22 +08:00
Liu Zhi Fu 9a3f9af2db esp32/lwip: some misc changes
1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5
2016-11-28 18:36:14 +08:00
Tian Zhong Xing 72422b32dc feature/fota_ops_api: add ota core api implement 2016-11-28 17:12:57 +08:00
Tian Hao fd0d28afc3 component/bt : cleanup some missing code 2016-11-28 16:39:53 +08:00
Tian Hao ff8ce12787 component/bt : cleanup the spell && redundant 2016-11-28 14:58:30 +08:00
Tian Hao 1173106a20 component/bt : change task to decease dram(heap)
1. decrease the task size(HCI cannot < 1024, btu cannot < 4096)
2. btc task can config by menuconfig(default 2048)
2016-11-25 23:37:46 +08:00
Tian Hao c9a0b9a45c component/bt : decrese dram
1. decrease some resource
2016-11-25 21:24:16 +08:00
Wu Jian Gang db1e86b3d9 Merge branch 'feature/modem_sleep' into 'master'
Feature/modem sleep



See merge request !251
2016-11-25 19:32:03 +08:00
Xia Xiaotian 55aa82f814 modem sleep: update wifi lib
1. add libwpa2.a
2016-11-25 19:06:52 +08:00
Wu Jian Gang 3f27c09728 Merge branch 'feature/wpa2_enterprise' into 'master'
Feature/wpa2 enterprise



See merge request !250
2016-11-25 18:46:29 +08:00
Xia Xiaotian 6e3b7f4ea2 wpa2 enterprise: change wpa2 enterprise APIs to esp_wifi_sta_wpa2_ent_XXX 2016-11-25 18:08:21 +08:00
Xia Xiaotian 73f4e8b2af wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +08:00
Angus Gratton 88b264cfce mbedTLS SHA: Fix cloning of SHA-384 digests
Hardware unit only reads 384 bits of state for SHA-384 LOAD,
which is enough for final digest but not enough if you plan to
resume digest in software.
2016-11-25 19:26:30 +11:00
Angus Gratton a902e2a9de mbedtls tests: Add additional MPI (bignum), SHA tests 2016-11-25 19:21:49 +11:00
Tian Hao ac87ddfb05 component/bt : close sdp to free dram
1. free 15K
2016-11-25 15:54:18 +08:00
Xia Xiaotian 16f2b119eb Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/esp32/lib
2016-11-25 15:54:00 +08:00
Wu Jian Gang 7f2c6a9d80 Merge branch 'bugfix/tw8770_fix_socket_memory_leak' into 'master'
lwip: fix socket memory leak issue

1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
    Currently ESP32 support maximum 16 TCP PCBs and all TCP PCB are allocated from heap memory. In some scenario, we may
    have memory leak issue,  for example, the application already created 16 TCP PCB, then it close 5 of them, because the TCP
    state machine, the LWIP core may not free all the 5 TCP PCB immediately, maybe some is in TIME_WAIT status, some is in 
    FIN_WAIT_1 etc. Then the application try to malloc 17th TCP PCB (the application think they just create 12 because they already
    close 5), memp_malloc() will return true because the heap is not out of memory, but actually we got 17 TCP PCB. When the 
    scenario repeat again and again (in our Audio application, it repeat more than 10000 times), more and more TCP PCB will be
    created in the system, each TCP PCB require 200B, then memory leak happen (In Audio application, I saw more than 26 TCP PCB
    are created, and 10*200=2K memory are leaked).

See merge request !223
2016-11-25 13:44:02 +08:00
Xia Xiaotian 1818af1c3e wpa2 enterprise: update wifi lib and add wpa2_printf 2016-11-25 13:26:30 +08:00
Xia Xiaotian 0dbc11e37d wpa2 enterprise: update wpa2 enterprise API comments 2016-11-25 11:03:33 +08:00
Wang Jia Lin 58d902eb78 Merge branch 'driver_merge_tmp/merge_timer' into 'master'
driver: timer

1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c

See merge request !237
2016-11-25 10:52:40 +08:00
Angus Gratton d0801fdbab Merge branch 'feature/sha_tls_integration' into 'master'
SHA acceleration integrated to mbedTLS incl. TLS sessions

Uses hardware SHA acceleration where available, fails over to software where not available.

Ref TW7112

See merge request !232
2016-11-25 10:12:29 +08:00
Angus Gratton 9f9d92b2df Merge branch 'bugfix/spi_flash_region' into 'master'
spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks

SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.

See merge request !249
2016-11-25 10:11:51 +08:00
Angus Gratton 7a93422089 Merge branch 'bugfix/ledc_divider' into 'master'
ledc: fix reported error when div_param == 256

Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).

Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.

Also added missing error for the unimplemented case of low speed mode.

Reported in https://github.com/igrr/esp32-cam-demo/issues/2

See merge request !247
2016-11-25 10:11:33 +08:00
Jeroen Domburg 7dc322273c Merge branch 'bugfix/ringbuffer_item_return_bug_report_from_chunguang' into 'master'
bugfix: ringbuffer return item api

Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR

See merge request !246
2016-11-25 09:31:20 +08:00
Tian Hao 19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao d7eb709a9c component/bt : add license header 2016-11-25 01:58:26 +08:00
Wangjialin a5ad8090cf Merge branch 'master' into driver_merge_tmp/merge_timer
# Conflicts:
#	docs/index.rst
2016-11-25 01:07:19 +08:00
Wang Jia Lin 35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Ivan Grokhotkov 5eb2d16acd Merge branch 'bugfix/uart_argument_names' into 'master'
uart: use same argument names in get/set functions

This one is pretty trivial: rename arguments so that same name is used for get and set functions.

https://github.com/espressif/esp-idf/issues/105

See merge request !248
2016-11-24 23:56:35 +08:00
Liu Zhi Fu 340b14f0b7 esp32: update wifi lib to contain bt/wifi coexist code 2016-11-24 21:37:46 +08:00
Xia Xiaotian 1cdd082a9e wpa2 enterprise: update wifi lib in master branch 2016-11-24 20:41:44 +08:00
Tian Hao b5f03a36d5 component/bt : fix sw coexit call mistake 2016-11-24 20:09:52 +08:00
Tian Hao 55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +08:00
Xia Xiaotian 4ea18083f7 wpa2 enterprise: add wifi lib 2016-11-24 19:46:37 +08:00
Xia Xiaotian b649b48eae Merge branch 'master' into feature/wpa2_enterprise
add lib
2016-11-24 19:35:30 +08:00
Ivan Grokhotkov c17ee8a914 Merge branch 'bugfix/unit_test_run' into 'master' 2016-11-24 18:29:32 +08:00
Ivan Grokhotkov 1bcd90d45d Merge branch 'feature/system_apis' into 'master'
system_* APIs cleanup

This changeset is mostly about cleaning up `system_*` APIs and moving them from libcore. It has dragged a few more changes along, however.

- `system_deep_sleep` deprecated, new name is `esp_deep_sleep`
- `system_efuse_read_mac` deprecated, new name is `esp_efuse_read_mac`
- `system_read/write_rtc_mem` removed (reason: we use linker to place code/data into RTC memory now)
- `system_get_sdk_version` deprecated. Returns "master" for now. Support for compile-time and runtime version detection will be done in a separate MR.
- `system_get_time` and variations have been deprecated. `gettimeofday` should be used instead.
- `system_restart` deprecated, new name is `esp_restart`. Rewritten code to work correctly from any of the cores.
- `system_restore` deprecated, `esp_wifi_restore` should be used instead.
- `system_get_rst_info` removed (it wasn't in a header file)
- RTC library has been updated to latest version
- Logging output from `libfoo.a` goes through `foo_printf` function now, where `foo ` is any of the library names. For libraries other than rtc and phy, this is a temporary measure, until we finish switching to esp_log library and clean up all uses of printf/ets_printf.
- ESP-IDF build will fail if any of the libraries have printf/ets_printf reference.
-  Added `esp_random` function which gets values from HW RNG. I have added code which makes sure the value is not polled too often (allows at least 16 APB cycles). Also added a header file for HW RNG (just one register).
- Moved random number generation functions used by wpa library into wpa_supplicant component.

See merge request !234
2016-11-24 18:22:50 +08:00
Xia Xiaotian 422e95db9c system_apis: update wifi lib and librtc.a
1. some refractor to debug info in wifi lib(da6280b3)

2. fix bug of hung at phy_int in librtc.a(1bb9ce1d)
2016-11-24 17:55:37 +08:00
Tian Hao 7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Tian Hao e5ceddabac component/bt : change gatt client callback param
1. change the array to point to decrease the memory occupy
2. change the sendindconfirm position
3. fix union lost
2016-11-24 15:17:49 +08:00
Angus Gratton be53a6950c spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks
SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.
2016-11-24 18:05:06 +11:00
Ivan Grokhotkov 79482bbee7 uart: use same argument names in get/set functions
https://github.com/espressif/esp-idf/issues/105
2016-11-24 13:56:18 +08:00
Ivan Grokhotkov f60e54497c ledc: fix reported error when div_param == 256
Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).
Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.
Also added missing error for the unimplemented case of low speed mode.
2016-11-24 12:27:32 +08:00
Angus Gratton 7e433ae3f4 Merge branch 'bugfix/uart_isr_rodata' into 'master'
UART driver: Fix crash in ISR due to "UART" static array moved to flash

Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.

See merge request !245
2016-11-24 12:09:46 +08:00
Wangjialin f97f198c9d driver: improve pulse counter code
1. Modify some comments in pcnt.h
2. Modify api/pcnt.rst
3. Improve example code.
4. Add status definitions in pcnt_reg.h
2016-11-24 12:01:21 +08:00
Wangjialin 6d502cebe9 bugfix: ringbuffer return item api
Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR
2016-11-24 10:31:27 +08:00
Angus Gratton 79646f41b5 Fixes for stdlib.h inclusion
Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551

rmt.c should include stdlib.h for malloc, esp_bignum,c &
https_request_main.c for abort().

FreeRTOSConfig.h is only including stdlib if
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is
included for abort() so needs to be included whenever
CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.

This change includes unconditionally in FreeRTOSConfig.h. This is to
avoid this kind of bug where compiler errors are dependent on config. I
suggest we don't change this to be more selective until we have 'make
randomconfig' style tests in CI.
2016-11-24 08:20:21 +11:00
Tian Hao 225e31b6de component/bt : change gatt client arg to union
1. decrease the args memory occupy
2. change some macro name
2016-11-23 21:27:05 +08:00
Wangjialin a97e076dec add pcnt.rst 2016-11-23 19:07:30 +08:00
Wangjialin 6db1482cd5 Merge branch 'master' into driver_merge_tmp/merge_pcnt
# Conflicts:
#	components/driver/include/driver/periph_ctrl.h
2016-11-23 18:15:54 +08:00
Wangjialin 7571b8c2e4 driver: PCNT
minor changes
2016-11-23 18:10:45 +08:00
Wangjialin c533099e08 driver: timer
1. minor modifications
2. use TIMG_WDT_INT_ENA_M instead of BIT(2) in wdt.c
3. add doc/api/timer.rst
2016-11-23 17:23:21 +08:00
Xia Xiaotian f7aeef7111 Merge branch 'master' into feature/wpa2_enterprise 2016-11-23 16:34:01 +08:00
antti 13e7e69239 remove unexisting tests in unit test CIConfig 2016-11-23 16:22:51 +08:00
antti ca76f53283 remove fp unit test Kconfig 2016-11-23 16:22:34 +08:00
Tian Hao 85aac3afa6 component/bt : decrease callback cb param size
1. decrease callback cb param size
2. add write in gatt server demo
2016-11-23 15:34:21 +08:00
Xia Xiaotian f7fb8b264f wpa2 enterprise: update wpa2 enterprise APIs 2016-11-23 15:29:01 +08:00
Tian Hao 9ec0fea8e1 component/bt : gatt arg use union
1. union is 28 bytes for each btc task msg arg
2. as gap, individual arg(not use union) is the best mem occupy.
2016-11-23 13:45:21 +08:00
Ivan Grokhotkov 50f178c1ce esp32: add some implementation comments 2016-11-23 12:55:49 +08:00
Ivan Grokhotkov 137c027274 Merge branch 'feature/integrate_unit_tests' into 'master'
Integrate unit tests into build system

This MR moves unit tests from esp-idf-tests repository into 'test' subdirectories of respective components.

Tests are run using a runner app in tools/unit-test-app.

This needs a bit of cleanup:

1. remove extra newlines added to makefiles,
2. re-format unit tests code which has tabs
3. write a document on using this test app
4. maybe some refactoring in project.mk

I think 1&2&4 need to be done in this MR, while 3 may be done in a follow-up one.

See merge request !221
2016-11-23 12:13:39 +08:00
antti 83a3ce882f add updated nvs flash test 2016-11-23 11:29:36 +08:00
Angus Gratton 1d05f41a70 UART driver: Fix crash in ISR due to "UART" static array moved to flash
Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.
2016-11-23 10:58:03 +11:00
Angus Gratton 180f4d0929 FreeRTOS: Use C11 _Static_assert to verify static "dummy" structs at compile time
Includes a tweak to make Static_task_t equal size to TCB_t when using
MPU_WRAPPERS . Matches tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE macro
in tasks.c. This isn't actually a bug (if static task allocation is off,
there is no use for Static_task_t), but it allows us to make consistent
compile-time checks that Static_task_t == TCB_t.
2016-11-23 10:22:19 +11:00
Wangjialin a3c4a70ba3 driver: add hardware timer code.
1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c
2016-11-23 02:15:27 +08:00
Daniel Campora 2a73783bc6 StaticQueue_t needs to have the same size as xQUEUE.
Without this change, building FreeRTOS with static allocation enabled succeeds, but trying to create a queue from a static buffer causes an assert because the size of static and dynamic queues differ.
2016-11-22 22:29:27 +08:00