Commit Graph

13550 Commits

Author SHA1 Message Date
Sudeep Mohanty
ac0cbebb89 ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers
This commit fixes a bug in no-split and allow-split ring buffers free buffer size calculation.
When the free size available in the buffers less than the size of one item header,
the function prvGetCurMaxSizeNoSplit/AllowSplit() incorrectly returned the maxItemSize instead of 0.
This is due to the comparision between a negative and a positive value
where both operands are treated as unsigned during the comparision operation,
thereby treating the negative operand as a large integer.

Also added new unit tests to test buffer-full and almost-full conditions
where this scenario is likely to be hit.

Closes https://github.com/espressif/esp-idf/issues/7344
Closes https://github.com/espressif/esp-idf/pull/7371
2021-10-28 14:02:18 +05:30
Sudeep Mohanty
0d81eb9855 Merge branch 'bugfix/ringbuf_send_semaphore_release_order' into 'master'
esp_ringbuf: Fix order of semaphore release in xRingbufferSend

Closes IDFGH-6030 and IDFGH-6036

See merge request espressif/esp-idf!15657
2021-10-28 05:30:31 +00:00
Jiang Jiang Jian
05a618ce10 Merge branch 'feature/decouple_softap_and_8684_support' into 'master'
Feature/decouple softap and 8684 support

See merge request espressif/esp-idf!15564
2021-10-28 04:13:18 +00:00
Chen Jian Xing
4f5ab6be05 Merge branch 'bugfix/fix_phy_usb_issue' into 'master'
esp_phy: fix esp32c3/s3 PHY disable USB & RSSI issue

Closes ESPCS-710 and WIFI-3946

See merge request espressif/esp-idf!15596
2021-10-27 13:16:35 +00:00
Cao Sen Miao
bd2a524a12 Merge branch 'bugfix/esp_timer_before_init' into 'master'
esp_timer: allow querying the timer before esp_timer_init is called

Closes IDF-3570

See merge request espressif/esp-idf!14428
2021-10-27 05:49:06 +00:00
RichFalk
1222f6dd3a esp_ringbuf: Fix assertion xQueueGenericSend queue.c:818
The release of the semaphore indicating the item was successfully sent must be the last semaphore released.  The receiver may be in another task and may delete the Ringbuffer (such as with a return code across tasks design pattern) if they are through with the Ringbuffer.

The function xRingbufferSendAcquire followed by xRingbufferSendComplete had the semaphores released in the proper order and that same pattern should have been used in xRingbufferSend and xRingbufferSendFromISR.  This commit fixes this order.

Issue (IDFGH-6030) #7716 describes the problem in more detail.

Closes IDFGH-6030, https://github.com/espressif/esp-idf/issues/7716
Closes IDFGH-6036, https://github.com/espressif/esp-idf/pull/7721
2021-10-27 09:54:36 +05:30
Zhang Jun Hao
a568b4fddf esp_wifi: support station only mode for code size down 2021-10-27 11:48:22 +08:00
Island
8037e2462f Merge branch 'bugfix/heartbeat_filter_with_acceptlist' into 'master'
ble_mesh: stack: Fix heartbeat filter with accept list error

See merge request espressif/esp-idf!14529
2021-10-27 02:50:00 +00:00
David Čermák
bcbef9a8db Merge branch 'bugfix/ping_sock_0_valid' into 'master'
lw-ip: Fix ping socket create to allow for fd=0

See merge request espressif/esp-idf!15644
2021-10-26 14:27:45 +00:00
Cao Sen Miao
b0123199da esp_timer: init rtc timer and system timer in early init 2021-10-26 19:07:34 +08:00
Ivan Grokhotkov
249abb3fe8 esp_timer: allow querying the timer before esp_timer_init is called 2021-10-26 19:07:34 +08:00
Anton Maklakov
e525964f67 Merge branch 'bugfix/gdbstub_4_c3' into 'master'
Add missing function for C3

See merge request espressif/esp-idf!15538
2021-10-26 10:16:38 +00:00
Alexey Gerenkov
e777653222 Merge branch 'feature/esp32s3_apptrace' into 'master'
apptrace/trax: Adds ESP32-S3 support

Closes IDF-1785

See merge request espressif/esp-idf!14857
2021-10-26 09:50:40 +00:00
lly
fc97277e2f ble_mesh: stack: Update the license of provisioner_main.c 2021-10-26 17:44:36 +08:00
wangjialiang
0578c3a126 ble_mesh: stack: Fix heartbeat filter with accept list 2021-10-26 17:43:53 +08:00
Ivan Grokhotkov
569440bd3c Merge branch 'bugfix/highint_hdl_link_gnumake' into 'master'
esp_system: fix high level interrupt handler not linked for GNU Make

Closes IDFGH-5728 and IDFGH-6078

See merge request espressif/esp-idf!15615
2021-10-26 09:25:34 +00:00
chenjianxing
5918bb73d9 esp_phy: fix esp32c3/s3 phy USB & RSSI issue 2021-10-26 15:22:01 +08:00
Kevin (Lao Kaiyao)
bc1cebe042 Merge branch 'bugfix/i2s_ws_polarity_in_tdm' into 'master'
i2s: fix ws signal polarity in tdm mode

Closes IDF-4140

See merge request espressif/esp-idf!15534
2021-10-26 07:13:49 +00:00
David Cermak
7b91343ca7 lwip: Fix ping socket create to allow for fd=0
0 is a valid socket description, so should be accepted after we create a
socket. In IDF, though, it's just a theoretical issue, as customers have
to configure:
* FD_SETSIZE = CONFIG_LWIP_MAX_SOCKETS (from makefiles)
* CONFIG_VFS_SUPPORT_IO = n (from menuconfig)

(this configuration is currently broken, but if we adjust the IDF here
and there we could reproduce the issue)
2021-10-26 08:19:26 +02:00
laokaiyao
f37595dee9 i2s: fix ws signal polarity in tdm mode 2021-10-26 11:12:30 +08:00
Jakob Hasse
04dc51732b Merge branch 'feature/spi_cxx' into 'master'
[cxx]: simple spi master class

Closes IDF-3750

See merge request espressif/esp-idf!13363
2021-10-26 02:44:35 +00:00
Wei Tian Hua
23dd7a4a29 Merge branch 'bugfix/remove_assert_when_inq_done' into 'master'
component_bt: fix crash after inquiry has finished

Closes IDFGH-4967 and IDFGH-5850

See merge request espressif/esp-idf!13505
2021-10-25 10:03:28 +00:00
Guo Jia Cheng
a928411ab3 Merge branch 'feature/mdns-subtype' into 'master'
mdns: support service subtype

Closes IDFGH-3560

See merge request espressif/esp-idf!15467
2021-10-25 07:50:49 +00:00
Dmitry
1457c42f6f bugfix/esp-gdbstrub: add missing function for esp32c3/esp32h2. 2021-10-25 10:30:50 +03:00
Jakob Hasse
7efb01846f [cxx]: simple spi master class
* spi cxx unit test (CATCH-based, on host)
* added portmacro.h to driver mocking
* added simple testing app to write/read SPI,
  using an MPU9250
2021-10-25 14:56:59 +08:00
Mahavir Jain
c499fe5fa5 Merge branch 'add_agressive_revoke' into 'master'
secure_boot: Added Kconfig option for aggressive key revoke

See merge request espressif/esp-idf!14957
2021-10-25 04:00:20 +00:00
Ivan Grokhotkov
265038bea3 esp_system: fix high level interrupt handler not linked for GNU Make
In 4972605, high-level interrupt handler hook was renamed from
ld_include_highint_hdl to ld_include_panic_highint_hdl. However the
change wasn't applied in GNU Make based build system. As a result,
the default interrupt handler was linked and features which depended
on the high-level interrupt didn't work.

Closes https://github.com/espressif/esp-idf/issues/7759
Closes https://github.com/espressif/esp-idf/issues/7447
2021-10-24 11:08:40 +02:00
Darian
e5f5eb3cbb Merge branch 'refactor/freertos_deprecate_critical_nested_macros' into 'master'
freertos: Deprecate critical nested macros

Closes IDF-4036

See merge request espressif/esp-idf!15539
2021-10-23 07:42:15 +00:00
Darian
1591c4eb33 Merge branch 'feature/freertos_static_allocation_task_memory_callbacks' into 'master'
freertos: Add memory hooks for static IDLE and Timer tasks

Closes IDF-2243 and IDFGH-5804

See merge request espressif/esp-idf!15545
2021-10-23 07:20:30 +00:00
Darian
a1a125ec85 Merge branch 'bugfix/freertos_prvTaskIsTaskSuspended' into 'master'
freertos: Fix prvTaskIsTaskSuspended check

Closes IDFGH-5865

See merge request espressif/esp-idf!15369
2021-10-23 07:08:21 +00:00
Alexey Gerenkov
111ba5bbe6 trax: Adds ESP32-S3 support 2021-10-22 23:36:28 +03:00
Alexey Gerenkov
5911eb3f3e apptrace: Adds ESP32-S3 support 2021-10-22 23:24:00 +03:00
Alex Lisitsyn
bdf0298009 Bugfix/modbus fix copyright headers 2021-10-23 01:23:03 +08:00
David Čermák
fb24a2941c Merge branch 'feature/add_dhcp_option' into 'master'
lwip/dhcp: add configure for enable vendor class identify option

Closes IDFGH-4998

See merge request espressif/esp-idf!13867
2021-10-22 14:37:22 +00:00
Chinmay Chhajed
0319dcd23d Merge branch 'bugfix/nimble_x_component_key_check' into 'master'
NimBLE: Compare only x component of public key before pairing.

Closes BT-1928

See merge request espressif/esp-idf!15035
2021-10-22 12:37:02 +00:00
Sachin Parekh
724fdbc9f1 secure_boot: Do not allow key revocation in bootloader 2021-10-22 12:20:14 +05:30
Sachin Parekh
8ff3dbc05d secure_boot: Added Kconfig option for aggressive key revoke
Applicable to S2, C3, and S3
2021-10-22 12:20:14 +05:30
Darian Leung
0df4e80b97 freertos: Fix prvTaskIsTaskSuspended check
This commit fixes prvTaskIsTaskSuspended(). Both pending ready lists
should be checked to confirm that is truly suspended.

Closes https://github.com/espressif/esp-idf/issues/7564
2021-10-22 13:17:29 +08:00
Darian Leung
d6f2fa4bab freertos: Remove critical nested macros
This commit removes the following critical nested macros as follows:

- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()

They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.

Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
2021-10-22 13:17:20 +08:00
Darian Leung
359a3d396d freertos: Add memory hooks for static IDLE and Timer tasks
This commit adds the following hook functions to obtain memory
for the IDLE and Timer Daemon tasks when configSUPPORT_STATIC_ALLOCATION
is enabled:

- vApplicationGetIdleTaskMemory()
- vApplicationGetTimerTaskMemory()

Currently, both functions simply allocate from the same memory as
regular tasks (i.e., internal memory for both the stack and TCB)

Closes https://github.com/espressif/esp-idf/issues/7511
2021-10-22 12:21:15 +08:00
Guo Jia Cheng
c1d3b295e8 Merge branch 'feature/trel' into 'master'
br: support Thread Radio Encapsulation Link (TREL)

See merge request espressif/esp-idf!15106
2021-10-22 03:31:41 +00:00
Liu Han
49cd81ccf3 lwip/dhcp: add configure for enable vendor class identify option
Closes https://github.com/espressif/esp-idf/issues/6786
2021-10-22 11:17:59 +08:00
Anton Maklakov
1c44c3b966 Merge branch 'feature/toolchain_2021r2' into 'master'
Bring 2021r2 toolchains

Closes GCC-156, IDF-3571, IDF-842, IDFGH-4276, IDFGH-920, and IDFGH-790

See merge request espressif/esp-idf!15149
2021-10-22 01:03:16 +00:00
xiongweichao
d5c3342a46 Remove assert when inq done
Closes https://github.com/espressif/esp-idf/issues/6759
2021-10-21 20:08:37 +08:00
Jiacheng Guo
1e5c5f38d9 br: support Thread Radio Encapsulation Link (TREL)
TREL allows sending 15.4 frames on the backbone link by encapsulating it
in an UDP packet.
2021-10-21 19:55:58 +08:00
Ivan Grokhotkov
c9b84c2b2c Merge branch 'bugfix/newlib_fix_stdatomic_clang' into 'master'
newlib: fix clang atomics

See merge request espressif/esp-idf!15581
2021-10-21 11:37:18 +00:00
Wu Zheng Hui
001c29b077 bootloader: Simplify multi-chip control logic of the cache 2021-10-21 18:09:37 +08:00
Omar Chebib
e7b1640199 Merge branch 'feature/fat_configure_volumes_kconfig' into 'master'
FAT: Number of volumes can now be configured through menuconfig

Closes IDFGH-5806

See merge request espressif/esp-idf!15445
2021-10-21 06:49:07 +00:00
Mahavir Jain
950ca2ec3c Merge branch 'refactor/using_generic_error_check_in_esp_http_client' into 'master'
esp_http_client: apply generic error check macros

Closes IDF-3037

See merge request espressif/esp-idf!15391
2021-10-21 05:26:54 +00:00
Anton Maklakov
a047b15314 Merge branch 'version/v5.0.0' into 'master'
version: starting v5.0.0 development

See merge request espressif/esp-idf!15580
2021-10-21 03:37:51 +00:00