OVMS3-idf/components
Ivan Grokhotkov b1c754bbb5 Merge branch 'feature/cplusplus' into 'master'
C++ support

This change adds necessary support for compiling C++ programs:
- linking against libstdc++
- implementation of static initialization guards using FreeRTOS primitives: since we don't have condition variables at our disposal, and we don't want to allocate a synchronization primitive for every guard variable generated by the compiler, we imitate condition variables using a combination of a mutex, counting semaphore, and a counter (based on [Microsoft Research paper](https://www.microsoft.com/en-us/research/wp-content/uploads/2004/12/ImplementingCVs.pdf), albeit because we don't need *arbitrary* code to use these CVs, implementation gets simpler).

Note that libstdc++ also contains an implementation of `__cxa_guard_{acquire,release,abort}` functions. These implementations come from an `#ifndef GXX_THREADS` branch, i.e. are not aware of multthreading. There are three ways of replacing these libstdc++ functions with our implementation:

1. Move our code into gcc. Pros: cleanest solution. Cons: Such changes are unlikely to be merged by any upstream, so we end up maintaining our own forks of {gcc,crosstool-ng}.
2. Use library as it is built by crosstool, use `ar` to delete one object file (`guards.o`), add this library to ESP-IDF. Pros: easy to implement. Cons: libstdc++ is a 15MB binary 😯 
3. Keep using libstdc++ from crosstool, force our implementation to be linked using a `-u` linker flag. Pros: no impact on repo size, easy to implement. Cons: somewhat less clean than 1 (and about as hacky as 2).

For the reasons mentioned, option (3) looks like the best tradeoff.

Ref. TW6702

See merge request !364
2017-01-07 18:50:12 +08:00
..
app_update examples: Add OTA demo 2016-12-29 17:37:17 +08:00
bootloader Merge branch 'feature/bootloader_rng' into 'master' 2017-01-07 18:46:10 +08:00
bootloader_support bootloader: Enable early boot RNG entropy source 2017-01-04 17:07:12 +11:00
bt component/bt : blufi add version 2017-01-06 17:40:46 +08:00
coap components/coap: Add libcoap port for ESP32 platform 2016-12-30 15:05:26 +08:00
cxx cxx: implement static initialization guards 2017-01-06 16:07:33 +08:00
driver Add SPI Master driver, example, test and docs 2017-01-06 14:20:32 +08:00
esp32 Merge branch 'feature/cplusplus' into 'master' 2017-01-07 18:50:12 +08:00
esptool_py build system: Add 'make monitor' target from arduino-esp32 2017-01-03 10:59:10 +11:00
ethernet ethernet : fix sometimes ethernet init fail bug 2017-01-06 13:49:42 +08:00
expat Build system: Raise warning level 2016-11-16 15:57:34 +11:00
freertos lwip/freertos/esp32: add throughput optimization related code 2017-01-05 11:37:08 +08:00
idf_test CI: update known issues 2017-01-04 19:27:58 +08:00
json build system: Refactor component.mk to not need component_common.mk 2016-11-10 15:52:22 +11:00
log catch log output from WiFi libs 2016-11-22 21:14:36 +08:00
lwip Merge branch 'feature/lwip-rcvbuf-option' into 'master' 2017-01-07 18:45:37 +08:00
mbedtls Merge branch 'feature/intr_alloc' into 'master' 2016-12-09 14:00:39 +08:00
micro-ecc micro-ecc: Add submodule dependency 2016-11-17 09:18:51 +11:00
newlib panic handlers: Print the PC address where abort() was called, don't dump registers 2016-12-28 10:09:40 +11:00
nghttp components/coap: Add libcoap port for ESP32 platform 2016-12-30 15:05:26 +08:00
nvs_flash add updated nvs flash test 2016-11-23 11:29:36 +08:00
openssl remove legacy definitions from esp_types.h 2016-11-22 21:14:36 +08:00
partition_table Secure boot: Option for app & partition table signing to happen outside build system 2016-12-19 13:12:05 +11:00
spi_flash spi_flash: Standardise argument types & names used for flash offsets 2016-12-22 15:07:02 +11:00
tcpip_adapter Merge branch 'bugfix/tcpip_adapter_set_ip_info' into 'master' 2016-12-20 11:18:17 +08:00
ulp ulp: document peripherals accessible using RD_REG and WR_REG 2016-12-16 20:32:34 +08:00
vfs docs: fix Doxygen warnings, fail CI build on Doxygen warnings 2016-11-16 22:44:22 +08:00
wpa_supplicant wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +08:00
xtensa-debug-module build system: Refactor component.mk to not need component_common.mk 2016-11-10 15:52:22 +11:00