Angus Gratton [Wed, 13 Mar 2019 11:03:41 +0000 (22:03 +1100)]
make: Ensure that component_project_vars.mk not generated before config
* Fix the situation where component_project_vars.mk is generated before config exists
* Does not fix situation where config is changed and component_project_vars.mk contents should be
changed. This may still require a rebuild.
Angus Gratton [Wed, 13 Mar 2019 22:59:31 +0000 (09:59 +1100)]
esp32: Rename esp32.common.ld to esp32.project.ld to avoid build errors when downgrading
Linker script generator produces build/esp32/esp32.common.ld from
components/esp32/ld/esp32.common.ld.in
This works fine until IDF is downgraded to V3.1 which uses components/esp32/ld/esp32.common.ld and
doesn't track build/esp32/esp32.common.ld at all.
At this point, the linker runs in the build/esp32 directory and "-T esp32.common.ld" picks up the
linker script generated .ld file, which causes mis-builds.
As reported on forums: https://esp32.com/viewtopic.php?f=13&t=9684&p=40105
Ivan Grokhotkov [Wed, 13 Mar 2019 12:19:55 +0000 (20:19 +0800)]
examples: don't enable buffering on stdout in console examples
newlib uses significantly more stack space when printing to an
unbuffered stream. To reduce the amount of stack space required to
use the console, don’t disable buffering. linenoise should support
unbuffered stdout instead.
David Cermak [Mon, 11 Mar 2019 10:49:29 +0000 (11:49 +0100)]
mdns: fix possible crash when probing on particular interface with duplicated service instances due to naming conflicts on network
Issue: MDNS server initially sends probing packets to resolve naming confilicts with already registered service instances. In case of a conflict, instance name is altered and probing restarts. Original instance however wasnnot removed from the structure and upon service removal only one entry was removed and a dangling service might have been kept in the structure to bring about a crash.
Resolution: Keep only one instance of a service in the probing structure.
David Cermak [Mon, 4 Mar 2019 11:32:10 +0000 (12:32 +0100)]
mdns: enable pcbs before starting service thread to avoid updating pcb's internal variables from concurent tasks
possible race condition: user task runs mdns_init, which enables pcbs while mdns-task already created could execute enable/disable of the same pcbs if an appropriate system event received
David Cermak [Mon, 4 Mar 2019 10:13:52 +0000 (11:13 +0100)]
mdns: fix possible deadlock on mdns deinit calling mdns_free()
mnds_free() initiates stop and delete timer tasks, which after locking the mutex could lead to a dead lock in case timer task executed before deleting the task, as it would wait indefinitelly for unlocking the mutex. This condition is fixed by calling _mdns_stop_timer without locking the mutex, because there's no need to protect any data when stopping and deleting the timer task
David Cermak [Fri, 1 Mar 2019 15:59:38 +0000 (16:59 +0100)]
mdsn: fix race condition in updating packet data from user task when failed to allocate or queue a new service
Issue: mdns_service_add API allocates and queues an action to be processed in mdns task context; when allocation or queueing fails, allocated structure needs to be freed. Function _mdns_free_service did not only fee all the structures, but also updates packet data.
Resolution: Moved removal of packet data outside of _mdns_free_service function.
David Cermak [Mon, 25 Feb 2019 13:29:39 +0000 (14:29 +0100)]
mdns: fix possible crash when packet scheduled to transmit contained service which might have been already removed
packets scheduled to transmit are pushed to action queue and removed from tx_queue_head structure, which is searched for all remaining services and while service is removed, then service questions/asnwers are also removed from this structure. This update fixes possible crash when packet is pushed to action queue, and when service is removed, its answers are removed from tx_queue_head, but not from action queue. this could lead to a crash when the packet is poped from action queue containing questions/answers to already removed (freed) service
Mahavir Jain [Fri, 8 Mar 2019 05:30:49 +0000 (11:00 +0530)]
spi_flash: fix stale read issue for memory mapped partition
On flash program operation (either erase or write), if corresponding address has
cache mapping present then cache is explicitly flushed (for both pro and app cpu)
Ivan Grokhotkov [Mon, 4 Mar 2019 08:59:09 +0000 (16:59 +0800)]
mdns: use binary semaphore instead of mutex when searching
mdns_search_once_t::lock is used to synchronize tasks (taken by one
task and given by the other) so it should not be a mutex.
Convert to semaphore, and rename to indicate its purpose.
cmake: Fix for Python files executed directly, not via PYTHON variable
A problem if the Python interpreter used for idf.py (or set via PYTHON
variable) didn't match
"/usr/bin/env python" (or the associated executable for .py files, on
Windows).
Closes https://github.com/espressif/esp-idf/issues/3160
Possibly also fix for https://github.com/espressif/esp-idf/issues/2936
Adds build system test to catch any future direct execution of Python in
the standard build process.
Ivan Grokhotkov [Mon, 4 Mar 2019 08:59:09 +0000 (16:59 +0800)]
mdns: use binary semaphore instead of mutex when searching
mdns_search_once_t::lock is used to synchronize tasks (taken by one
task and given by the other) so it should not be a mutex.
Convert to semaphore, and rename to indicate its purpose.
zhangyanjiao [Mon, 11 Mar 2019 03:03:48 +0000 (11:03 +0800)]
modify the behavior for dhcpserver and tcpip_adapter:
1. dhcp_server: suppress send_offer debug output
2. tcpip_adapter: zero-initialize system_event_t structures
3. tcpip_adapter: pass client IP address along with SYSTEM_EVENT_AP_STAIPASSIGNED
aleks [Thu, 21 Feb 2019 08:10:21 +0000 (09:10 +0100)]
esp32: coredump header (fix linker.lf)
remove duplicated include from components/esp32/incliude/esp_core_dump.h
espcoredump/incliude/esp_core_dump.h:
fix signature of the functions esp_core_dump_to_uart() and esp_core_dump_to_uart();
add espcoredump into COMPONENT_PRIV_REQUIRES list
fix linker.lf file
morris [Tue, 26 Feb 2019 14:08:57 +0000 (22:08 +0800)]
console: fix wrong timeout settiing in join command
1. Fix wrong timeout setting in join command, also alter the default timeout value to 10 seconds
2. Don't clear the CONNECTED_BIT when connected to AP.