Commit graph

965 commits

Author SHA1 Message Date
Ivan Grokhotkov 414e5ce1d5 Merge branch 'bugfix/rmt_mem_struct' into 'master'
Only fix rmt_mem_t struct definition error.

Modify the struct definition according to technical_reference_manual. 
Tested.

```
typedef volatile struct {
    struct {
        union {
            struct {
                uint32_t duration0:    15;
                uint32_t level0:       1;
                uint32_t duration1:    15;
                uint32_t level1:       1;
            };
            uint32_t val;
        } data[64];
    } chan[8];
} rmt_mem_t;
```

See merge request !186
2016-11-08 18:47:53 +08:00
Liu Zhi Fu cb5f7690a4 esp32/make: add detailed return error code for wifi APIs
1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API
2016-11-08 18:12:14 +08:00
Wu Jian Gang 0aca2506fc Merge branch 'feature/tw8387_merge_bt_wifi_coexist_code' into 'master'
esp32: merge bt/wifi coexist code

1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib

See merge request !185
2016-11-08 17:18:57 +08:00
Liu Zhi Fu 7340a77689 esp32: remove libcrypto according to review comments 2016-11-08 15:28:20 +08:00
Wangjialin 1418f886eb Only fix rmt_mem_t struct definition error. 2016-11-08 14:19:31 +08:00
Liu Zhi Fu 178db4bdd9 esp32: merge bt/wifi coexist code
1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib
2016-11-08 13:30:35 +08:00
Ivan Grokhotkov d12078b692 Revert "Merge branch 'feature/ci_checkout_same_branch_for_submodule' into 'master'"
This reverts merge request !178
2016-11-08 11:55:48 +08:00
Angus Gratton fce359b240 build system: Add support for embedded arbitrary binary or text files in .rodata
Simplifies examples of embedding a certificate file or a root cert.

This is a much cruder mechanism than the full flash filesystem we want
eventually, but still sometimes useful.
2016-11-08 11:13:54 +11:00
Angus Gratton 98a0387854 bootloader_support: Move secure boot code to bootloader_support 2016-11-08 11:13:54 +11:00
Ivan Grokhotkov 0762b050dd Merge branch 'feature/integrate_unit_test_to_ci' into 'master'
integrate unit test to CI



See merge request !167
2016-11-07 21:17:08 +08:00
Ivan Grokhotkov 314cbcdb67 Merge branch 'feature/wpa_supplicant_libcrypto_source' into 'master'
wpa_supplicant: replace pre-built crypto library with source code

This change replaces libcrypto.a pre-built library with source code from wpa_supplicant.
For now i've decided to keep the modified layout of source and header files which is used in the esp32_rtos_sdk_core project. This will make it easier to move other parts of wpa_supplicant from esp32_rtos_sdk_core into esp-idf. Once we move everything, we can rearrange the files and upgrade wpa_supplicant to latest version.

See merge request !177
2016-11-07 21:15:49 +08:00
Wangjialin e452278194 Minor changes for driver
1. remove "\n" when calling ESP_LOGX APIs.
2. modify uart_event_t for uart rx data.
3. use MICRO for uart inverse value
4. add uart_tx_data_t for internal tx function.
2016-11-07 14:16:52 +08:00
Ivan Grokhotkov c8a43508e5 Merge branch 'bugfix/osx_menuconfig_build' into 'master'
Allow OS X to build without libintl

https://github.com/espressif/esp-idf/pull/42

I have tested this with the following configurations:
- OS X with Xcode command line tools, no macports, no homebrew
- OS X with Xcode command line tools and homebrew
- OS X with Xcode IDE and macports

All three work with this change, without it the first two had issues.

See merge request !172
2016-11-07 12:55:47 +08:00
Ivan Grokhotkov b6dd8a55cd Fix build with macports/pkgconfig, silence format string warnings on OS X
Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space).
-Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs.
2016-11-07 12:27:53 +08:00
Ivan Grokhotkov 4e1c56e965 Merge branch 'feature/style_guide' into 'master'
docs: add style guide

This adds initial code style guide. Only section on code formatting is written, other sections to be added later.
Also adds scripts to format code using astyle.

See merge request !46
2016-11-07 12:26:15 +08:00
Ivan Grokhotkov 599a65657d Merge branch 'bugfix/bootloader_iram_overlap' into 'master'
fix overlap between bootloader and application IRAM ranges

This change moves the action of enabling APP CPU cache into the application startup code.
Therefore we don't need to use IRAM for the final stage of bootloader, and application can use all 0x20000 of IRAM.
This fixes crashes which happened when application used enough of IRAM to overlap with bootloader functions.

See merge request !176
2016-11-07 12:12:31 +08:00
Ivan Grokhotkov faad29234a Merge branch 'feature/ci_checkout_same_branch_for_submodule' into 'master'
Feature/ci checkout same branch for submodule

esp-idf have several submodules like wifi-lib, bt-lib. 

esp-idf branches may need to use specific branches in submodules to get build pass and do test.

This feature will first try to checkout the branch with same name for all submodules for jobs which uses global `before_script`

See merge request !178
2016-11-07 12:12:13 +08:00
Krzysztof 025bb47302 Non-Volatile Storage (NVS) example
Demonstrates how to read and write a value using NVS.
The value tracks number of ESP32 module restarts.
Example also shows how to use basic diagnostics if read / write
operation was successful.
2016-11-06 18:19:49 +01:00
Yinling 522f83ae3d remove unnecessary "git fetch" and add echo submodule path 2016-11-06 22:58:31 +08:00
Yinling 3051c74488 No need to deinit submodules as use clean clone by config 2016-11-06 22:53:23 +08:00
Yinling d093dcbbb7 try to checkout same branch for submodule in CI jobs 2016-11-06 22:43:12 +08:00
Krzysztof c3f7d15246 Instructions to prepare documentation 2016-11-05 17:19:31 +01:00
Krzysztof 3eaf1ec907 All API Reference docs updated to match header files
1. Wi-Fi <api/esp_wifi>
2. Bluetooth <api/bt>
2. GPIO <api/gpio>
4. LED
Control <api/ledc>
5. Logging <api/log>
6. Non-Volatile Storage
<api/nvs_flash>
7. Virtual Filesystem <api/vfs>
2016-11-05 17:18:25 +01:00
Krzysztof 7bcd68fb30 deep-sleep-stub added + TOC outline
TOC outline to show overal planned structure
2016-11-05 17:13:44 +01:00
Krzysztof adca98348e Resolved issue with version / release on Read the Docs
Read the Docs is building documentation referencing to specific releases
on GitHub.
Changing version / release  in this script is breaking menu in bottom
left corner
Now version / release should change only for local builds and not for
builds on Read the Docs
2016-11-05 17:11:40 +01:00
Krzysztof 9c2ab4559d Fixed section header style
Please follow https://docs.python.org/devguide/documenting.html#sections
2016-11-05 17:06:55 +01:00
Krzysztof b981b195be Fixed broken links 2016-11-05 17:04:35 +01:00
Ivan Grokhotkov 8089afd453 build fix 2016-11-04 15:52:45 +08:00
Ivan Grokhotkov 2d88fc0329 wpa_supplicant: replace pre-built crypto library with source code 2016-11-04 14:58:47 +08:00
Wangjialin 3ec23f1b83 Modify as Angus's suggestion:
1. Set XXX_TAG static, remove extern XXX_TAG in uart.h/ledc.h/gpio.h
2. I removed uart_set/get_print_port() functions, these functions are not well tested, I removed them for now.
3. Modify some function names for uart_read/write_bytes
4. Modify uart_write_bytes and uart_write_bytes_with_break.
2016-11-04 12:52:34 +08:00
Ivan Grokhotkov 2fa00ebd90 ld scripts: fix overlap between bootloader and application IRAM ranges 2016-11-04 12:18:57 +08:00
Ivan Grokhotkov 8bdcf0c5f7 newlib: fix compilation error when no timers are enabled in menuconfig 2016-11-04 10:55:25 +08:00
Wangjialin 15474b9b7e Merge branch 'master' into driver_merge_tmp/merge_uart 2016-11-04 02:56:41 +08:00
Wangjialin a6b3be6734 Update UART driver
1. fix bug in ringbuffer.c:
    When return an dummy item, free_ptr might exceed rd_ptr, so the write_ptr would overwrite rd_ptr in this case.
2. Delete UART tx task in buffer mode. UART ISR will copy the data from tx buffer to fifo.
2016-11-04 02:48:25 +08:00
Wangjialin 9ed7c4f8bc fix ringbuffer bug. 2016-11-03 23:30:54 +08:00
Sandeep Mistry e96d4a0a32 Allow OS X to build without libintl 2016-11-03 21:40:52 +08:00
Ivan Grokhotkov e314f42b0c nvs: fix Page::findItem and Storage::findItem regression
When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found.
Incidentally, Storage::findItem reused itemIndex when starting search at next page.
So,
- if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index,
- first page has a few empty items at the end (but is marked full),
- next search looked up the item on the second page,
- index of the item on the second page was less than the cached index on the first page,
then the search would fail because cached starting index was reused.

This change fixes both sides of the problem:
- Page::findItem shouldn't modify itemIndex argument if item is not found
- Storage::findItem should not reuse itemIndex between pages

Two tests have been added.
2016-11-03 20:18:30 +08:00
Ivan Grokhotkov 4d3ed9efde docs: update style guide 2016-11-03 19:07:41 +08:00
Ivan Grokhotkov b717e44eb2 tools: add code formatter rules for Eclipse
Generated with Eclipse Neon, should work in earlier versions as well.

This file can be imported
- into the workspace via Preferences > C++ > Code Style > Formatter > Import
- or into the project via Project Preferences > C++ General > Formatter > Import

Configuration options in Eclipse are not exactly the same as in astyle.
There may be some discrepancy between the format astyle and Eclipse will produce.
If anyone notices that, please let me know.
2016-11-03 18:41:00 +08:00
Ivan Grokhotkov 6602d6b7f2 docs: add style guide
This adds initial code style guide. Only section on code formatting is written, other sections to be added later.
Also adds scripts to format code using astyle.
2016-11-03 18:41:00 +08:00
Wangjialin 8282c73ac2 debug ring buffer error. 2016-11-03 18:28:36 +08:00
Ivan Grokhotkov abecab7525 Merge branch 'feature/time_syscalls' into 'master'
implement time syscalls

This change adds optional support for libc time functions.
New menuconfig option allows selecting FRC1,  RTC, both, or none to be used for timekeeping.

- If only FRC1 timer is used, gettimeofday will provide time at
		  microsecond resolution. Time will not be preserved when going
		  into deep sleep mode.
- If both FRC1 and RTC timers are used, timekeeping will
		  continue in deep sleep. Time will be reported at 1 microsecond
		  resolution.
- If only RTC timer is used, timekeeping will continue in
		  deep sleep, but time will be measured at 6.(6) microsecond
		  resolution. Also the gettimeofday function itself may take 
		  longer to run.
- If no timers are used, gettimeofday function will return -1 and
		  set errno to ENOSYS. 

`times` function returns time derived from FreeRTOS ticks. It reports all as 'system' time, 'user' time is reported as zero.

`settimeofday` function may be used to set current time.

LwIP SNTP module is hooked up into the system through `settimeofday`/`gettimeofday`.

Example demonstrating this functionality is also added.

ref. TW6415

See merge request !168
2016-11-03 18:02:58 +08:00
Ivan Grokhotkov bc4f1c90a7 conver tabs to spaces in frc_timer_reg.h 2016-11-03 17:44:23 +08:00
Ivan Grokhotkov 299655e3be esp32: add choice for RTC clock source
For now only one option is supported: internal RC oscillator
2016-11-03 17:37:15 +08:00
Ivan Grokhotkov 5035f51c4e Merge branch 'feature/openssl' into 'master'
Feature/openssl

The first openssl interface version based on mbedtls and some of these interface just have the function , not effectively.

See merge request !100
2016-11-03 15:37:28 +08:00
Ivan Grokhotkov eb2c633cbf newlib: implement settimeofday, integrate LwIP SNTP, add SNTP example 2016-11-03 12:46:46 +08:00
He Yin Ling 47910466ce Set result "Succeed" for passed cases 2016-11-02 20:54:22 +08:00
He Yin Ling e56b745527 incorrect "/", should be "\" 2016-11-02 20:21:46 +08:00
He Yin Ling c12aeb1127 add case select by name mark " before case name 2016-11-02 20:12:43 +08:00
Yinling 2e319705ec forget to break when test succeed 2016-11-02 19:41:33 +08:00