Ivan Grokhotkov [Fri, 22 Feb 2019 09:28:43 +0000 (17:28 +0800)]
nvs: do eager cleanup of HashListBlocks
Previously when HashList was removing items, HashListBlocks were
removed lazily. This resulted in empty HashListBlocks dangling around
in full pages, even when all items have been erased. These blocks
would only be deleted when NVS was re-initialized
(nvs_flash_deinit/nvs_flash_init).
This change does eager cleanup instead, based on the code from
@negativekelvin offered in
https://github.com/espressif/esp-idf/issues/1642#issuecomment-367227994.
Anurag Kar [Fri, 1 Feb 2019 13:11:46 +0000 (18:41 +0530)]
http_server examples : Updated tests and examples to demonstrate usage of `httpd_register_err_handler()` and accommodate for changes in default error handler behavior
Anurag Kar [Fri, 1 Feb 2019 12:17:41 +0000 (17:47 +0530)]
http_server : Added feature for invoking user configurable handlers during server errors
Added APIs :
* httpd_resp_send_err() : for sending HTTP error responses for error codes given by httpd_err_code_t. It uses TCP_NODELAY option to ensure that HTTP error responses reach the client before socket is closed.
* httpd_register_err_handler() : for registering HTTP error handler functions of type httpd_err_handler_func_t.
The default behavior, on encountering errors during processing of HTTP requests, is now to send HTTP error response (if possible) and close the underlying socket. User configurable handlers can be used to override this behavior for each error individually (except for 500 Internal Server Error).
Tian Hao [Thu, 14 Feb 2019 08:52:17 +0000 (16:52 +0800)]
component/esp32 : fix coexist lc protect cause memory corrupted
The bug will cause memory corrupted (the largest range is from 0x3ffc0000 ~ 0x3ffc8000),
some strange error will happen, like IllegalInstruction, LoadProhibited and .etc.
Angus Gratton [Mon, 18 Feb 2019 22:06:31 +0000 (06:06 +0800)]
Merge branch 'feature/docs_add-ons_and_extensions' into 'master'
docs: This is a quick reference of more than a dozen and-ons and extensions prepared over the last two years to add contents, improve look & feel and cut on maintenance of the ESP-IDF documentation.
krzychb [Sun, 10 Feb 2019 18:14:28 +0000 (19:14 +0100)]
docs: This is a quick reference of more than a dozen and-ons and extensions prepared over the last two years to add contents, improve look & feel and cut on maintenance of the ESP-IDF documentation.
spi: fix the bug of connecting SPI peripheral to read-only pins
The requirements of pin capabilites is different for spi master and
slave. The master needs CS, SCLK, MOSI to be output-able, while slave
needs MISO to be output-able.
Previous code is for master only.
This commit allows to place other 3 pins than MISO on input-only pins
for slaves. Refactoring for spi_common is also included.
David Cermak [Fri, 15 Feb 2019 12:46:51 +0000 (13:46 +0100)]
mdns: fix malfuctional query_txt
when running a query for a single txt, result entries were not created and attached to result structure. this issue was introduced when fixing memory leak in txt structure, which worked correctly for PTR queries, but caused trouble for TXT query.
Anurag Kar [Fri, 8 Feb 2019 10:28:57 +0000 (15:58 +0530)]
provisioning examples : typos fixed and minor change in timer callback execution
Note : Examples have been updated to prevent invocation of bluedroid/wifi APIs from inside timer callback when stopping provisioning. Workaround is to spawn new task from inside the timer callback.
Anurag Kar [Fri, 8 Feb 2019 09:12:49 +0000 (14:42 +0530)]
protocomm security : memory leaks fixed
List of changes:
* Corner case exceptions are properly handled to ensure release of memory occupied by security infrastructure
* fixed erroneous cleanup of security instance by protocomm_console
Anurag Kar [Fri, 8 Feb 2019 06:36:23 +0000 (12:06 +0530)]
protocomm : version endpoint behavior simplified
List of changes:
* Version endpoint now sends the set version string instead of verifying the incoming version string. This simplifies fetching version info from the provisioning application.
* esp_prov script updated to expect version string as response.
Added:
* set a secure version in app/bootloader.
* description anti-rollback to ota part
* emulate the secure_version write and read operations
* efuse_em partition.
* a description about a rollback for native_ota_example.
Ivan Grokhotkov [Wed, 13 Feb 2019 03:40:48 +0000 (11:40 +0800)]
make: fix issues related to EXTRA_COMPONENT_DIRS
1. When one of the COMPONENT_DIRS points to a component directory
(i.e. a directory containing component.mk, not a directory of multiple
components), and there is a subdirectory in it which also contains
a component, the subdirectory was mistakenly added to the list of
components and compiled.
2. When one of the COMPONENT_DIRS points to a component directory, and
the parent directory contained a directory with the same name as
another component, that directory would be mistakenly added to the
COMPONENT_PATHS.
and Makefile sets EXTRA_COMPONENT_DIRS=$(realpath ../mycomponent),
then "esp32" directory which is at the same level as mycomponent
was added to COMPONENT_PATHS.
3. If EXTRA_COMPONENT_DIRS pointed to a directory with a list of
components, and one of the subdirectories was not a component, but
had the same name as another component, than that directory would be
mistakenly added to COMPONENT_PATHS instead of the real esp32
component directory.
For example:
my_components/
my_component/
component.mk
my_component.c
esp32/
(some random stuff)
and EXTRA_COMPONENT_DIRS would point to my_components/, then "esp32"
directory would be added to COMPONENT_PATHS instead of the real esp32
component directory.
aleks [Tue, 12 Feb 2019 09:16:04 +0000 (10:16 +0100)]
coredump:fix test artifacts
Move existing core dump files into espcoredump component folder
Add KConfig, linker.lf, make and CMakeList.txt for new component
Existing functionality separated into core_dump_common, core_dump_flash, core_dump_uart
Update test_core_dump.c and make files to link it as unit test
Update according to review:
Move target and RTOS related functionality into separated file (core_dump_port.c).
Fix test logs and test elf files
aleks [Tue, 29 Jan 2019 14:49:56 +0000 (15:49 +0100)]
coredump: improvements refactoring
Move existing core dump files into espcoredump component folder
Add KConfig, linker.lf, make and CMakeList.txt for new component
Existing functionality separated into core_dump_common, core_dump_flash, core_dump_uart
Update test_core_dump.c and make files to link it as unit test
Update according to review:
Move target and RTOS related functionality into separated file (core_dump_port.c).