Fixes for github issues
This MR contains a bunch of small fixes for issues raised on Github and esp32.com forum:
- vfs doesn't check error code returned by open syscall
- spi_flash doesn't work when built in release mode
- duplicate definition of O_NONBLOCK when combining LwIP socket.h with sys/fcntl.h
- wrong order of creation of standard streams
- `_times_r` returning incorrect values, causing `clock`to return double of the actual time
- driver/gpio.h: comment fix
- wifi event handlers: fix incorrect MAC address printed by logging statements
- move some functions out of IRAM when compiling for bootloader
Please check commit descriptions for links to issues/forum posts and more details.
See merge request !183
newlib: fix compilation error when no timers are enabled in menuconfig
I have checked that three options (RTC/RTC+FRC1/FRC1) work, but didn't check "None" option.
This adds some missing ifdef blocks to remove "unused function/variable" warnings and fixes the use of `__errno_r` in a non-reentrant function.
See merge request !174
LwIP will define O_NONBLOCK in sockets.h if it isn't defined yet.
If sys/fcntl.h is included after socket.h, there will be duplicate definition.
Work around by including sys/fcntl.h into lwipopts.h.
https://github.com/espressif/esp-idf/issues/75
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
See merge request !187
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
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
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
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.
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
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
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
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.
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.
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
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