Commit Graph

4236 Commits

Author SHA1 Message Date
Ivan Grokhotkov
b669b415e6 Merge branch 'feature/cxx_exceptions_emg_pool' into 'master'
esp32: Adds C++ exceptions emergency pool size menuconfig option

See merge request !1561
2017-11-23 13:02:49 +08:00
Ivan Grokhotkov
2eac553062 Merge branch 'feature/pthread_key_and_cond_var_support' into 'master'
pthread: Added support for pthread condition variables

See merge request !1387
2017-11-23 13:02:40 +08:00
Amey Inamdar
edb2400742 pthread: Added support for pthread condition variables
This is required for std::condition_variable support

Signed-off-by: Amey Inamdar <amey.inamdar@gmail.com>
2017-11-23 11:26:51 +08:00
Alexey Gerenkov
7df96718a2 esp32: Adds C++ exceptions emergency pool size menuconfig option 2017-11-23 06:14:11 +03:00
Ivan Grokhotkov
597ce3b800 Merge branch 'bugfix/ringbuf_buflen_bugfix' into 'master'
Bugfix/ringbuf buflen bugfix

See merge request !1562
2017-11-22 22:30:11 +08:00
Ivan Grokhotkov
61ead8fb96 Merge branch 'bugfix/ota_example_http_request' into 'master'
ota example: Send a valid HTTP/1.0 request

See merge request !1566
2017-11-22 22:27:10 +08:00
Ivan Grokhotkov
c237c5c966 Merge branch 'bugfix/gpio_disable_api' into 'master'
driver: GPIO can be disabled by calling  gpio_set_direction

See merge request !1575
2017-11-22 22:26:54 +08:00
Ivan Grokhotkov
cf47012111 Merge branch 'feature/prs_from_github' into 'master'
PRs from Github

See merge request !1578
2017-11-22 22:26:40 +08:00
Ivan Grokhotkov
5fe91ae7cd Merge branch 'bugfix/cpp_guards' into 'master'
Add C++ guards to freertos/ringbuf.h, heap headers

See merge request !1552
2017-11-22 22:26:26 +08:00
kooho
ada33fe3dd Add GPIO input and output disable option 2017-11-22 15:00:27 +08:00
Ivan Grokhotkov
08be5213db Merge branch 'bugfix/uxportcompare_check_addr_range' into 'master'
portmacro: add assert to check address validity in uxPortCompareSet

See merge request !1519
2017-11-22 11:44:09 +08:00
Angus Gratton
3607b404c0 Merge branch 'feature/lwip_socket_pcb_num_config' into 'master'
lwip: Expose number of active socket limits in menuconfig

See merge request !1433
2017-11-22 11:36:55 +08:00
Angus Gratton
4ce68f6163 lwip: Expose number of active socket limits in menuconfig 2017-11-22 14:10:08 +11:00
Frank Sautter
157371effb Set GPIO-mode for MDC and MDIO pins
Merges #1127
2017-11-22 11:01:43 +08:00
Andrew Dikarev
08ba79cc2b return old handler from esp_log_set_vprintf()
Merges #1286
2017-11-22 11:01:43 +08:00
Vitor Massaru Iha
cf768380b1 soc: Remove redefinition of MCU_SEL_M
Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>

Merges #1290
2017-11-22 11:01:42 +08:00
Krzysztof Bociurko
969911b7c2 freertos: enabled use of pxTaskGetStackStart and cleaned up it's implementation
Merges #1298
2017-11-22 11:01:42 +08:00
Angus Gratton
4332a2c4bc Merge branch 'bugfix/cxx-exceptions-missing-stubs' into 'master'
cxx_exceptions: Add missing stubs for cxx exceptions with exceptions disabled

See merge request !1574
2017-11-22 09:26:24 +08:00
Angus Gratton
a556e1c782 heap: Add C++ header guards to heap headers
Closes https://github.com/espressif/esp-idf/issues/1195
2017-11-22 10:08:50 +11:00
Adrián Paníček
0b48d5978e ringbuf.h: Add anti name-mangling definition
When using CPP and C combination this particular file threw error on linking.

Merges https://github.com/espressif/esp-idf/pull/1249

(Amended to add INC_FREERTOS_H guard, comment on #endif)
2017-11-22 10:08:15 +11:00
Piyush Shah
4f33339c1d test_ringbuf: Add tests for arbitrary length ring buffer
This will test the ring buffer for buffer length that is not
a multiple of 4

Signed-off-by: Piyush Shah <piyush@espressif.com>
2017-11-21 17:18:54 +05:30
Piyush Shah
7dd9c4f57f ringbuf: Fixes to header files for better understanding
1. Usage of this module required applications to include additional
files. What files to include is not very intuitive. Instead, it is
better for the header file itself to include other files as required.
2. Even though it may seem logical, it is better to explicitly mention
that an item needs to be "Returned" after a Receive

Signed-off-by: Piyush Shah <piyush@espressif.com>
2017-11-21 17:16:04 +05:30
Piyush Shah
62f44e45df ringbuf: Bugfixes for managing arbitrary sizes of ring buffer
It was observed that if the ring buffer size provided by application
is not a multiple of 4, some checks were failing (as read_ptr and write_ptr
could shoot beyond the ring buffer boundary), thereby causing asserts.
Simply wrapping around the pointers for such cases fixes the issue.

Moreover, because of the logic for maintaining 4-byte boundary,
it was also possible that a wrap-around occurred for some data,
even when the actual size remaining was sufficient for it.
Eg. Buffer available: 34, data size: 34, 4-byte aligned size: 36
Since the logic compares against 36, it writes 34 bytes and does a
wraparound. But since all 34 bytes are already written, there is
nothing to write after wrapping. It is better to just re-set the
write pointer to the dtart of ring buffer in such cases.

Tested send/receive for various arbitrary sizes of data and for
arbitrary sizes of ring buffer.

Alternative Solutions:
1) Allow only sizes which are multiples of 4, and return error otherwise.
Appropriate code and documentation change would be required
2) Allow arbitrary sizes, but internally add upto 3 bytes to make
the total size a multiple of 4

Signed-off-by: Piyush Shah <piyush@espressif.com>
2017-11-21 17:15:53 +05:30
Ivan Grokhotkov
6e1453e864 Merge branch 'feature/bot' into 'master'
CI: support customize test with @bot

See merge request !1502
2017-11-21 18:43:56 +08:00
Amey Inamdar
78ed138453 cxx_exceptions: Add missing stubs for cxx exceptions with exceptions
disabled

The misssing stubs get pulled in from the toolchain's libstdc++ also
causing to pull in defined stubs. This results in redefinition of
symbols. Fixing it by simply adding the missing stubs when exceptions
are disabled.

Signed-off-by: Amey Inamdar <amey.inamdar@gmail.com>
2017-11-21 12:41:49 +05:30
Ivan Grokhotkov
46673bb6f1 Merge branch 'bugfix/rtc_apll_disable' into 'master'
soc/rtc: don't power down BIAS_I2C along with APLL if other PLL is used

See merge request !1568
2017-11-21 12:13:07 +08:00
Ivan Grokhotkov
d135a017f4 Merge branch 'bugfix/ut_startup_time' into 'master'
By default, don't print test menu in unit-test-app

See merge request !1565
2017-11-21 12:12:46 +08:00
Angus Gratton
dc994e9c88 ota example: Send a valid HTTP/1.0 request
Was sending an invalid HTTP/1.1 request which many web servers rejected.

Thanks @chegawara for pointing this out on IRC.

Ref:
https://github.com/espressif/esp-idf/issues/231#issuecomment-300287523
2017-11-21 09:02:58 +11:00
Angus Gratton
93c75b4978 Merge branch 'bugfix/update_BOD_voltages' into 'master'
esp32/Update brownout voltages

See merge request !1520
2017-11-21 05:37:55 +08:00
Ivan Grokhotkov
2eae440646 unit-test-app: reduce startup delay, clean up 2017-11-20 17:51:27 +08:00
He Yin Ling
81f806e676 test: change initial condition of unit test:
now UT App will not print test menu by default. it will print a prompt
to indicate it's ready. we can check this prompt instead of delay.
2017-11-20 17:51:27 +08:00
Ivan Grokhotkov
5117364c13 unit-test-app: don't print the list of tests by default
This reduces unit-test-app startup time when there are a lot of tests
included, speeding up unit tests in CI.
2017-11-20 17:51:27 +08:00
Ivan Grokhotkov
024e4c4337 Merge branch 'feature/openssl_cn_hostname_verification' into 'master'
openssl: Add CN hostname verification

See merge request !1554
2017-11-20 15:59:15 +08:00
Ivan Grokhotkov
18f4696371 Merge branch 'bugfix/pthread_test_mem_leaks' into 'master'
pthread: Fixes memory leaks and stack overflow in tests

See merge request !1563
2017-11-20 15:58:53 +08:00
Ivan Grokhotkov
4b8f55aadf Merge branch 'bugfix/minor_fixes_github' into 'master'
Minor fixes from github

See merge request !1555
2017-11-20 15:58:34 +08:00
Ivan Grokhotkov
3369f15fa3 soc/rtc: don't power down BIAS_I2C along with APLL if other PLL is used
If enable == false, and SOC_CLK_SEL == PLL, the code would would
erroneously set RTC_CNTL_BIAS_I2C_FORCE_PD. This change fixes the logic.
2017-11-20 15:27:16 +08:00
Andy Green
ae1f1e9b84 openssl wrapper: introduce X509_VERIFY_PARAM_set/clear_hostflags
This defines the OpenSSL X509_CHECK_FLAG_...s and the set/clear
accessors.  Since none of them are supported, the set / clear
accessor currently always does nothing and returns error.

This call is often part of the generic openssl user code to
set up certificate verification.  This patch allows it to
compile for ESP32 and decide at runtime what to do about
unsupported flags.

Merges https://github.com/espressif/esp-idf/pull/980
2017-11-20 16:25:57 +11:00
Angus Gratton
4395f7c94e Merge branch 'feature/spi_flash_lock_recursive' into 'master'
spi_flash: Expose recursive op_lock for atomic multi-part flash operations

See merge request !1556
2017-11-20 13:24:41 +08:00
Andy Green
effc6c6d0d openssl wrapper: introduce X509_VERIFY_PARAM_set1_host
This lets the user code set the mbedtls hostname using the standard OpenSSL
X509_VERIFY_PARAM_set1_host() API semantics.

The API takes an X509_VERIFY_PARAM pointer.  We use the fact that is
a composed member of the SSL struct to derive the SSL pointer.

The X509_VERIFY_PARAM_set1_host() is unusual in that it can accept a
NUL terminated C string as usual, or a nonterminated pointer + length.
This implementation converts the latter to the former if given, before
using it.

This is enough for user code to get the openssl wrapper to make
mbedtls confirm the CN on the peer cert belongs to the hostname used
to reach it, by doing, eg

	X509_VERIFY_PARAM_set1_host(SSL_get0_param(myssl), myhostname, 0);

Merges https://github.com/espressif/esp-idf/pull/980
2017-11-20 16:24:06 +11:00
Andy Green
0f02a38262 openssl wrapper: introduce SSL_get0_param
This adds the standard OpenSSL api to get a pointer to the SSL struct's
X509_VERIFY_PARAM.  We need this for the OpenSSL api to set the peer
hostname introduced in the next patch.

Part of https://github.com/espressif/esp-idf/pull/980
2017-11-20 16:23:18 +11:00
Angus Gratton
4b8c90bce0 doc: Unify the two sections about the "dialout" group on Linux
An addition to https://github.com/espressif/esp-idf/pull/1158
2017-11-20 16:10:38 +11:00
Angus Gratton
05dd46cd72 udp_perf/tcp_perf examples: Erase NVS if no more free pages
Follows same pattern as other examples.

Amendment to https://github.com/espressif/esp-idf/pull/1279
2017-11-20 16:07:52 +11:00
petermccloud
3b84c1e8fa fixed broken udp_perf example by adding nvs_flash
Merges https://github.com/espressif/esp-idf/pull/1279
2017-11-20 16:07:00 +11:00
petermccloud
0dea8bca46 fixed broken tcp_perf example by adding nvs_flash 2017-11-20 16:06:59 +11:00
Angus Gratton
f54e99008d spi: Add ESP_ERR_NO_MEM to spi_device_queue_trans() documentation
Ref https://github.com/espressif/esp-idf/pull/1243#issuecomment-343103414
2017-11-20 16:06:59 +11:00
Angus Gratton
7a924bd85a spi_flash: Expose an accessor the current SPI flash guard functions
Change places which uses g_flash_guard_default_ops to use this. Probably exact same data, but a bit
cleaner.
2017-11-20 15:54:31 +11:00
Angus Gratton
e72e5a9706 spi_flash: Make spi_flash op_lock/op_unlock recursive
Allows chaining of multiple flash operations as an atomic operation.
2017-11-20 15:54:31 +11:00
Darian Leung
91ccf588d1 esp32/Update brownout voltages
This commit updates the voltages of each brownout level in Kconfig.
Note that there is some variation of brownout voltage between each chip.
2017-11-20 12:26:13 +08:00
Ivan Grokhotkov
1fbd3ffac8 Merge branch 'feature/fatfs_r013a' into 'master'
fatfs: update to R0.13a

See merge request !1524
2017-11-20 10:16:39 +08:00
Ivan Grokhotkov
148130066f Merge branch 'feature/esp32_stack_protector' into 'master'
esp32: Adds Stack Smashing Protection Feature

See merge request !1537
2017-11-20 10:16:15 +08:00