Commit graph

1002 commits

Author SHA1 Message Date
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
Yinling fdff6b2b01 run unit test case by case name 2016-11-02 19:08:55 +08:00
Ivan Grokhotkov c534dedf2d newlib: implement time syscalls 2016-11-02 17:31:35 +08:00
Dong Heng 0aadc58b87 Merge branch 'master' into feature/openssl 2016-11-02 15:46:52 +08:00
Angus Gratton aceb6517c0 Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00
Jeroen Domburg 3af7872839 Merge branch 'bugfix/small_fixes' into 'master'
OpenOCD doc fix, fix gdbstub

- Fixes a few typos in the OpenOCD docs
- Fix compiling with gdbstub as panic handler

See merge request !165
2016-11-02 10:27:26 +08:00
Jeroen Domburg d0fac3c395 Language tweaking 2016-11-02 10:26:02 +08:00
Angus Gratton 04beb8baba Add documentation for bootloader secure boot stage 2016-11-02 10:41:59 +11:00
Angus Gratton 4ba1b73eba build system: Add espefuse/espsecure support for secure boot 2016-11-02 10:41:59 +11:00
Angus Gratton cf732bb663 esp32: efuse_reg add bit values for read & write disable flags 2016-11-02 10:41:59 +11:00
Angus Gratton f10cc7dc8e bootloader: Refactor secure boot digest generation 2016-11-02 10:41:59 +11:00
Ivan Grokhotkov 1cab448c73 Merge branch 'driver_merge_tmp/modify_gpio_ledc_h' into 'master'
Fix header docs for GPIO and LEDC drivers

Modify gpio.h and ledc.h according to documenting-code.rst

See merge request !166
2016-11-01 22:46:29 +08:00
Wangjialin e1f0c98ef5 Modify gpio.h and ledc.h 2016-11-01 22:35:42 +08:00
Ivan Grokhotkov 0df0d74d5d Merge branch 'bugfix/only_deploy_when_test_pass' into 'master'
fix bug that deploy when test failed:

test report will be a single stage. The result of test report will be calculated from the result of all test jobs in test stage. So it will only deploy when all test job passed.

See merge request !140
2016-11-01 22:27:37 +08:00