Wykres commitów

15029 Commity (653fa702b47d67ba2327db3e8733734e98e2f8be)

Autor SHA1 Wiadomość Data
Angus Gratton c90d6ae9af examples: Move idf_as_lib sdkconfig file to the project directory
Also add some explanation about configuring the project in the README

Previously with the default build-esp32.sh script, the build directory was
deleted and recreated so the project would always be built with default config.
2020-10-14 19:30:30 +11:00
KonstantinKondrashov 66b9b589cb efuse: Adds support for esp32-s2 chip 2020-10-14 16:26:51 +08:00
Angus Gratton a1d3f2b291 Merge branch 'feature/freertos_upstream_plus_tlsf_allocator_preview' into 'master'
freertos/heap: Preview branch containing TLSF allocator and FreeRTOS 10 kernel

Closes IDF-1637 and IDFGH-3859

See merge request espressif/esp-idf!8414
2020-10-14 15:58:51 +08:00
Ivan Grokhotkov 840efc2f54 docs: describe power management logic for ESP32-S2, fix translation 2020-10-14 09:05:10 +02:00
Angus Gratton ba3a6f68b4 driver test: Don't use ESP32-S2 CS1 pin for output test
On a ESP32-S2 with PSRAM attached, this may cause a crash
2020-10-14 16:18:55 +11:00
Angus Gratton cbb721c3ca ci: Bump ESP32-S2 UT jobs 2020-10-14 16:11:49 +11:00
Angus Gratton bf85348034 tlsf: Enable asserts 2020-10-14 16:11:49 +11:00
Angus Gratton 1224ae9a42 freertos: Use configured idle task stack size not minimum task stack size for idle tasks 2020-10-14 16:11:49 +11:00
Angus Gratton 30b5aab77a freertos: Fix some edge cases around un-pinned tasks migrating cores 2020-10-14 16:11:49 +11:00
Felipe Neves dfa2d547a7 freertos: pin timer task in core 0 plus fixed in SMP race conditions
freertos: replace the freertos regular malloc to the specific malloc from xtensa port for tcb and stack allocations

freertos: avoid the cpu1 to unwind pended ticks when xTaskResumeAll is called insed of an ISR

freertos: protected the xPortGetCoreID functions with missing critical sections

tests: re-eanble the ignored tests that was failling before race-condition fixes
2020-10-14 16:11:49 +11:00
Felipe Neves 3057b76a7e tests: re-add all disabled tests and all disabled configurations 2020-10-14 16:11:49 +11:00
Felipe Neves 206540909e freertos: readd task checking for stack overflow macros 2020-10-14 16:11:49 +11:00
Felipe Neves 656b706ea4 freertos: added core-ID member to task status structure aloowing its tracing.
Closes https://github.com/espressif/esp-idf/issues/5763
2020-10-14 16:11:39 +11:00
Anton Maklakov a16152a78e Merge branch 'ci/sonarqube_exclude_list' into 'master'
CI: Exclude list for sonarqube

See merge request espressif/esp-idf!10793
2020-10-14 12:26:24 +08:00
Felipe Neves f3783ba258 app_trace/sysview: fixed freertos tracing calling plus sync apptrace component with the master branch version
docs: remove reference to backported features in freertos 10 api-reference.
2020-10-13 23:52:03 +00:00
Felipe Neves d8ed9be1d4 freertos/timer: fix the static timer creation
Removes the not used spinlock field inside timer object which was causing assertion fail
2020-10-13 23:52:03 +00:00
Felipe Neves bd9b921713 heap_tlsf: added implementation of TLSF allocator
heap: ported tlsf allocator into multi heap

heap_host_tests: added tlsf allocator into host test

heap_host_test: update freebytes after using free

heap_tests: tlsf now passing on host tests without poisoning

multi_heap: added support for memalign using tlsf implementation

heap_caps: removed heap_caps_aligned_free

heap/test: fixed broken aligned alloc test build

heap: added poisoning pattern when blocks are being merged

heap/tests: added timing tests for memory allocation

heap: reduced tlsf structure overhead

heap/tlsf: made all short functions inside of tlsf  module as inline to improve timings

heap: moved tlsf heap routines outside of flash memory

newlib: linked multiheap memalign with newlib memalign function

heap: moved block member functions to a separate file so multi_heap can use the functions

heap/test: improved the tlsf timing test

heap/test: added memalign on aligned alloc tests

heap: moved tlsf configuration constants to a separated file

heap: added random allocations test with timings

heap: modified the calculation of heap free bytes

heap: make aligned free true deprecated functions and update their documentation

heap: add extra assert after successive mallocs on small allocation host test

heap: remove legacy aligned alloc implementation.

performance: added malloc and free time performance default values
2020-10-13 23:52:03 +00:00
Felipe Neves a3c90bf59a freertos: merged freertos 10 kernel files into IDF
freertos/port: update the port files and split into xtensa and riscv ports

freertos: separated cpu files from rest of the kernel sources

freertos/port_xtensa: separated private include files into a folder

freertos/tasks: added task create pinned to core function do not break current IDF API

freertos/tasks: mimiced task create pinned function into tasks.c to do not break the IDF API.

freertos: freertos component now compiling

freertos: freertos component now building

freertos: moved critical sections outside from FR kernel section to portable section

portmacro_xtensa: add void indentifier on functions that take no arguments

freertos: fix critical sections implementation to match with their function prototype

freertos: add cmake changes of freertos into make

freertos: remove portDONT_DISCARD attribute from switch context function, it was breaking the docs building.

freertos: fix conflicitng types of vApplicationSleep function

license: update the license of freertos

freertos: Doxygen comments refactored to render them correctly on docs

freertos: added new functions of freertos into the documentation

freertos: added message buffers and stream buffers to documentation

sysview: update freertos system view to the compatible with version 10

freertos: fixed event group  documentation rendering

freertos:  update static task structure to match the actual tcb size

freertos: removed backported test functions

freertos/smp: brought SMP code to  FreeRTOS 10 port

freertos/portmacro: added missing crosscore interrupt for yielding tasks

freertos: replaced soft-critical sections with hard-critical sections used by SMP

freertos: placed muxes inside of kernel objects

freertos: replaced original FR critical sections with SMP enabled spinlocks critical sections

freertos: moved xtensa port files to a separated folder

freertos: added multiple instance of global variables required to SMP

freertos: added SMP modifications on specific tasks module functions

freertos: added TLS deletion function to task module

freertos/tls: initialize TLS deletion callback to avoid crashing when calling task delete

freertos: modified vTaskDelete to do not erase current task that runs on other core

freertos: reverted taskhandle and timerhandle as void* type

freertos: fixed de-referencing void pointer to get run time counter

freertos: fix system view trace enter macro arguments

freertos: Replaced soft critical sections with spinlocks on event_groups

freertos: fixed tick function to avoid calling tick hooks twice

freertos: Nofity give checking per CPU if schedule is suspended

freertos: added mpu release on TCB deletion

freertos: Added SMP changes when deleting a TCB on idle task

freertos/license: update freertos license in COPYRIGHT.rst

freertos: unicore configurations can use task create pinned to core, it will be always pinned to core 0

freertos/portmacro: added cpu_hal_get_core_id() function instead of inline assembly

freertos/xtensa:  update xtensa specific files used in master branch

newlib/locks: revert the preemption checking in lock acquisition and release

ref_clock: fix initial state of ref_clock interrupt handler

freertos: added missing critical sections and yielding checkings

freertos: remove magic numbers in vTaskDelete

freertos: added missing critical section in prvIsQueueEmpty
2020-10-13 23:52:03 +00:00
Ivan Grokhotkov 2218ac91c2 tools/ci: fix import error when running ttfw tests locally 2020-10-13 18:09:22 +02:00
Ivan Grokhotkov b1d64d1a61 test/panic: add gdbstub test configuration 2020-10-13 18:09:22 +02:00
Ivan Grokhotkov 51d86081b8 gdbstub: fix thread list generation
This commit fixes an issue with gdbstub, where it would list threads
with TIDs 1 to N in qfThreadInfo/qsThreadInfo responses, and then
would tell GDB that the current TID is 0 in the qC response. This
caused an assertion failure in GDB, because it couldn't find the
thread structure corresponding to TID 0:

src/gdb/gdb/thread.c:93: internal-error: thread_info* inferior_thread(): Assertion `tp' failed.

The issue was caused by the logic of qfThreadInfo/qsThreadInfo.
If the "paniced" task index was 1, the code would report it in the
response to qfThreadInfo, and then mistakenly skip task with index 0
in qsThreadInfo, due to the use of pre-increment instead of a
post-increment.

With that issue fixed, GDB assertion doesn't happen anymore. However
the code contained a deeper problem, which manifested itself in the
fact that GDB would incorrectly show task index 0 as the current task,
after the above fix.

Previous version of the code assumed that when GDB requests the thread
list, it uses the first thread returned by the target as the "default"
thread, and subsequently shows the user that the program is stopped
in that thread. This assumption was incorrect. In fact, after
connecting to a remote target, GDB obtains information about the
"default" or "current" thread from two sources:
1. the 'thread' special register indicated in the status response
   ($T00thread;00000001#ee)
2. if the target has only sent the plain stop response ($T00#ee), GDB
   would ask for the current thread using a qC packet.
With that in mind, it is not necessary to report the paniced task as
the first task in qfThreadInfo response. We can simply returns the
tasks in their natural order, and then indicate the current task in
the qS packet response.

However even that change does not fully resolve the issues with task
list. The previous version of this code also incorrectly interpreted
the meaning of GDB TIDs -1 and 0. When GDB sends an "Hg0" command
early in the connection process, it doesn't expect the server to set
task 0 as the current task, as the code assumed. Rather, it tells the
server to "set any (arbitrary) task as the current one", and the most
logical thing to do for the server that is already in "stopped" state
is to keep the current task selection.

Since TID 0 has a special meaning in GDB remote protocol, gdbstub code
is now modified to map task indices (which start from 0) to GDB TIDs.
GDB TIDs are arbitrary, and for simplicity we keep the same order and
start counting them from 1.

The summary of all the above changes is:

1. Use "task index + 1" as the TID reported to GDB
2. Report the tasks in natural order; don't complicate the code to
   make the paniced task first in the list.
3. Centralize modification of 'current_task_index' and 'regfile'
   in the new 'set_active_task' function, to improve encapsulation.
2020-10-13 18:09:22 +02:00
Ivan Grokhotkov 4dc1195ca5 esp_system: fix incorrect critical section usage in usb_console
spinlock_acquire does not disable interrupts, whereas
portENTER_CRITICAL does.

Closes IDF-2049
2020-10-13 17:39:31 +02:00
baohongde 3f97f1d67a components/bt: Make sleep avaliable in hli(for future use) 2020-10-13 19:45:03 +08:00
me-no-dev d535b8c458 Fix BT HIDH write allocates 1 byte less and returns ok on failed malloc
Fixes: https://github.com/espressif/esp-idf/issues/5781
2020-10-13 14:30:12 +03:00
Jiang Jiang Jian f10f27c01a Merge branch 'bugfix/ipv6_address_get_fail_after_wifi_disconnect' into 'master'
lw-ip:ipv6 address get fail after wifi disconnect

Closes ESPCS-442

See merge request espressif/esp-idf!9438
2020-10-13 12:14:46 +08:00
Jiang Jiang Jian 138f036b55 Merge branch 'bugfix/pmf_softap_coex_issue' into 'master'
Fix issues related to PMF and WPA2-Enterprise

Closes WIFI-2852, WIFI-2704, and WIFI-2863

See merge request espressif/esp-idf!10523
2020-10-13 11:43:41 +08:00
Angus Gratton af57f5f520 Merge branch 'bugfix/secure_boot_v2_ota_verification' into 'master'
Secure Boot V2: Fixes the OTA regression with secure boot in ESP32-V3

Closes IDFGH-4032

See merge request espressif/esp-idf!10600
2020-10-13 07:09:44 +08:00
Angus Gratton ff8d05466e Merge branch 'bugfix/deep_sleep_stub_heap_rtc_fast_mem' into 'master'
deep sleep: Calculate RTC CRC without using any stack or other RTC heap memory

Closes IDF-2242

See merge request espressif/esp-idf!10741
2020-10-13 06:17:50 +08:00
Mahavir Jain 0b71a0a46d Merge branch 'bugfix/esp_https_ota_error_codes' into 'master'
esp_https_ota: fix error code formatting

See merge request espressif/esp-idf!10809
2020-10-12 22:39:31 +08:00
Michael (XIAO Xufeng) fc7433d610 Merge branch 'feature/twai_isr_runs_with_cache_disabled' into 'master'
TWAI: ISR runs when cache is disabled

See merge request espressif/esp-idf!9920
2020-10-12 20:18:36 +08:00
Ivan Grokhotkov 85f919a428 esp_https_ota: fix error code formatting 2020-10-12 13:46:15 +02:00
Michael (XIAO Xufeng) f5e4638c54 Merge branch 'feature/tusb_cdc_without_timer' into 'master'
Update `tinyusb_cdcacm_write_flush` to using ticks counting instead of the FreeRTOS timer

See merge request espressif/esp-idf!10738
2020-10-12 19:45:57 +08:00
Andrei Gramakov ab33f55e1b tinyusb: Fix a strncpy-related warning caused by a wrong argument
The issue was in using with `strncpy` a size of source array instead of using a size of destination array.
2020-10-12 12:30:42 +02:00
Jiang Jiang Jian b8d26ca389 Merge branch 'bugfix/assert_no_IRAM_ATTR' into 'master'
components/bt: btdm fix cache disable crash

See merge request espressif/esp-idf!10778
2020-10-12 16:58:26 +08:00
Sachin Billore ca194295f7 Doc: Added S2 HMAC downstream JTAG support
Closes IDF-802
2020-10-12 14:17:43 +05:30
Michael (XIAO Xufeng) b821025312 Merge branch 'bugfix/uart_test_debug' into 'master'
driver: add diagnostic information into UART test, enable flow control

See merge request espressif/esp-idf!10627
2020-10-12 15:50:33 +08:00
fuzhibo 9cd5e6f8c9 bugfix(adc): missing ranges of ADC codes in ESP32 2020-10-12 07:41:03 +00:00
Angus Gratton ff4d82c7d2 Merge branch 'feature/sha_hal' into 'master'
SHA: add HAL layer and refactor

See merge request espressif/esp-idf!10065
2020-10-12 15:15:28 +08:00
Supreet Deshpande 2356be7c7a Secure Boot V2: Fixes the OTA regression with secure boot in ESP32-V3
Closes https://github.com/espressif/esp-idf/issues/5905
2020-10-12 07:15:16 +00:00
Island 64fa998c0f Merge branch 'optimize/ble_mesh_make_buf_config_invisible' into 'master'
ble_mesh: stack: Make mesh buf debug option invisible

See merge request espressif/esp-idf!10777
2020-10-12 14:14:50 +08:00
Michael (XIAO Xufeng) 3c167497ad Merge branch 'bugfix/esp_flash_erase_timeout' into 'master'
esp_flash: change timeout threshold and can close timeout

Closes IDF-2023

See merge request espressif/esp-idf!10138
2020-10-12 12:49:36 +08:00
Fu Hanxi 31c03a95da CI: Exclude list for sonarqube 2020-10-12 12:27:42 +08:00
Cao Sen Miao b9f6efd99a esp_flash: change timeout threshold and can close timeout 2020-10-12 10:43:25 +08:00
xueyunfei 91fd587fb7 lwip/ipv6:ipv6 address get fail after wifi disconnect 2020-10-12 10:40:22 +08:00
lly 0d3c724281 ble_mesh: stack: Make mesh buf debug option invisible 2020-10-12 02:26:47 +00:00
Island 2b374ab7b8 Merge branch 'feat/ble_mesh_device_properties_v2' into 'master'
ble_mesh: Update mesh device property to v2

See merge request espressif/esp-idf!10754
2020-10-12 10:13:27 +08:00
Michael (XIAO Xufeng) 47e5dfb120 Merge branch 'feature/test_for_ext_flash_HSPI_on_esp32s2' into 'master'
spi_flash: add unit tests for HSPI on esp32s2

See merge request espressif/esp-idf!10040
2020-10-12 10:06:49 +08:00
lly d3aa32c2ec ble_mesh: stack: Add mesh device properties v2 definitions
Also fixes wrong characteristic value length of some device
properties.
2020-10-12 00:39:58 +00:00
lly 0b57cdf85b ble_mesh: stack: Move device property to model common part 2020-10-12 00:39:58 +00:00
Angus Gratton 562ab01046 deep sleep: Calculate RTC CRC immediately before deep sleep, without using RAM
Fix for issues where RTC FAST memory is updated as part of going into deep
sleep. Very high risk if heaps are in RTC memory - in particular task stacks
may be in RTC memory, but also other variables.

Also fixes potential concurrency problems as RTC FAST memory is not accessible
by CPU during the CRC calculation itself.

Method:
- Disable interrupts (currently for single core only, will need update for S3)
- Load all registers before calculating CRC or going to sleep
2020-10-12 11:19:56 +11:00