Commit Graph

27401 Commits

Author SHA1 Message Date
Darian Leung
facea9e25c ci: Allow test_pytest_qemu to ignore known failures 2022-12-23 16:24:57 +08:00
Mahavir Jain
d6dd8a56f3 Merge branch 'feature/logs_for_flash_enc_virtual' into 'master'
bootloader_support: Adds better logs for virtual efuses

See merge request espressif/esp-idf!21748

Closes https://github.com/espressif/esp-idf/pull/10383
2022-12-23 16:02:53 +08:00
Darian Leung
92bbf85350 freertos: Fix clang-tidy warning on pxPortInitialiseStack() 2022-12-23 15:29:17 +08:00
Darian Leung
82f28a3e09 freertos: Update FPU unit tests to run for multiple iterations
This commit updates the FreeRTOS port FPU unit tests so that they run for
multiple iterations, thus checking that a task's FPU context is properly
cleaned up on deletion.
2022-12-23 15:29:17 +08:00
Darian Leung
45badf864f freertos(IDF): Allow cross-core freeing of task memory when deleting tasks
Previously, IDF FreeRTOS would restrict the clean up of task memory (done by
vTaskDelete() or the Idle task) to only tasks pinned to the current core or
unpinned tasks. This was due to the need to clear the task's coprocessor
ownership on the other core (i.e., "_xt_coproc_owner_sa"). But this restriction
can be lifted by simply protecting access of "_xt_coproc_owner_sa" with a
spinlock.

This commit implements a "_xt_coproc_owner_sa_lock" to protect the access of
"_xt_coproc_owner_sa", thus vTaskDelete() and prvDeleteTCB() can now delete
tasks pinned to the other core so long as that task is not currently running.

Note: This fix was copied from the Xtensa port of Amazon SMP FreeRTOS
2022-12-23 15:29:17 +08:00
Darian Leung
c318c89453 freertos(IDF): Remove dependency on portUSING_MPU_WRAPPERS
This commit removes the dependency on portUSING_MPU_WRAPPERS on the Xtensa port
of IDF FreeRTOS. This dependency was added due to a hack implemented in the
upstream port that required the usage of the "xMPUSettings" member of the TCB.
The "xMPUSettings" would be used as a pointer to the task's coprocessor save
area on the stack, even though FreeRTOS MPU support was not available.

The hack has now been removed, and the CPSA pointer is now calculated using
a combination of constant offsets values and the pxEndOfStack member of the
TCB.

Note: This impelemtation was copied from the Xtensa port of Amazon SMP FreeRTOS.
2022-12-23 15:29:17 +08:00
Darian Leung
9300bef9b8 freertos(SMP): Refactor FPU handling on the Xtensa port of Amaazon SMP FreeRTOS
This commit refactors the FPU handling code on the Xtensa port of Amazon SMP
FreeRTOS in the following ways:

Auto-pinning via XT_RTOS_CP_EXC_HOOK
------------------------------------

The "_xt_coproc_exc" exception would previously automatically pin a task that
uses the FPU to the current core (to ensure that we can lazy save the task's FPU
context). However, this would mean that "xtensa_vectors.S" would need to be
OS-aware (to read the task's TCB structure).

This is now refactored so that "_xt_coproc_exc" calls a CP exception hook
function ("XT_RTOS_CP_EXC_HOOK") implemented in "portasm.S", thus allowing
"xtensa_vectors.S" to remain OS agnostic.

Using macros to acquire owner spinlock
--------------------------------------

The taking and relasing of the "_xt_coproc_owner_sa_lock" is now mostly
abstracted as the "spinlock_take" and "spinlock_release" macro. As a result,
"_xt_coproc_release" and "_xt_coproc_exc" are refactored so that:

- They are closer to their upstream (original) versions
- The spinlock is only taken when building for multicore
- The spinlock held region is shortened (now only protects the instructions
  that access the "_xt_coproc_owner_sa" array

Other Changes
-------------

- Updated placing and comments of various "offset_..." constants used by
  portasm.S
- Update description of "get_cpsa_from_tcb" assembly macro
- Tidied up some typos in the ".S" files
2022-12-23 15:29:17 +08:00
Darian Leung
fd48daf278 freertos(SMP): Fix SMP FreeRTOS Xtensa port FPU/Coproccessor bugs
This commit fixes the following FPU/Coprocessor bugs in the Xtensa port of
Amazon SMP FreeRTOS:

- vPortCleanUpCoprocArea() does not calculate the correct pointer to the
task's CPSA (located on the task's stack). This can result in
    - _xt_coproc_release() not releasing the task's CP ownership
    - The next coprocessor exception will write the current CP owner (i.e., the
      deleted task's CPSA) leading to memory corruption
- _xt_coproc_release() writes xCoreID instead of 0 when clearing a CP owner.
  This results in the next CP exception trying to load the CP owner's CPSA at
  the address of "xCoreID", leading to a double exception.
2022-12-23 15:29:17 +08:00
Laukik Hase
b3fa7fcf73
esp_local_ctrl: Add support for insecure HTTP server transport 2022-12-23 12:14:25 +05:30
laokaiyao
ec812c1370 adc: add ADC target test for esp32c6 2022-12-23 14:05:56 +08:00
Jakob Hasse
4934487be4 Merge branch 'refactor/esp_event_test_delay' into 'master'
refactor(esp_event): reduced test run time

Closes IDF-6322

See merge request espressif/esp-idf!21612
2022-12-23 12:43:28 +08:00
laokaiyao
5333ac81bf adc: support ADC on esp32c6 (driver/test/example) 2022-12-23 11:24:06 +08:00
laokaiyao
e27f3e3128 adc: support ADC on esp32c6 (hal) 2022-12-23 11:24:06 +08:00
muhaidong
66465ad7d7 esp_wifi: Remove -Wno-format compile option for FTM example, iperf example, roaming example 2022-12-23 11:05:17 +08:00
Kevin (Lao Kaiyao)
42c6ae3522 Merge branch 'feature/support_rtcio_on_c6' into 'master'
rtcio: support rtcio on c6

Closes IDF-6027

See merge request espressif/esp-idf!21603
2022-12-23 10:56:49 +08:00
Jiang Jiang Jian
0d6b9e463f Merge branch 'bugfix/avoid_ftm_initiator_mode_on_softap' into 'master'
Avoid ftm initiator mode on softap

Closes WIFI-5084, WIFI-5072, and WIFI-5078

See merge request espressif/esp-idf!21491
2022-12-23 10:41:33 +08:00
Wang Meng Yang
7269f3c1f2 Merge branch 'bugfix/remove_Wno_format_in_bluedroid_bt_examples' into 'master'
Remove `-Wno-format` compile option for bluedroid classic bluetooth examples

Closes IDF-6436

See merge request espressif/esp-idf!21529
2022-12-23 10:22:25 +08:00
Darian
14394ed783 Merge branch 'bugfix/esp_pm_and_sleep_build_errors' into 'master'
esp_system: Fix various PM and sleep build errors

Closes IDFGH-8930

See merge request espressif/esp-idf!21606
2022-12-23 03:42:57 +08:00
Darian
d534d08244 Merge branch 'bugfix/flakey_gptimer_tests' into 'master'
Driver: Fix flakey gptimer tests by allowing larger count deltas

See merge request espressif/esp-idf!21766
2022-12-23 03:18:08 +08:00
Rahul Tank
8ff7d526b0 Merge branch 'bugfix/remove_global_min_max_def' into 'master'
Nimble: Removes global min/max definition causing problems with other libraries

See merge request espressif/esp-idf!21652
2022-12-22 22:53:45 +08:00
KonstantinKondrashov
92de037883 efuse: Hides the FLASH_ENCRYPTION_MODE_RELEASE option when using EFUSE_VIRTUAL 2022-12-22 20:03:42 +08:00
Omar Chebib
835263e50a Coredump: add a test to check that coredump supports stacks in SPIRAM 2022-12-22 12:47:22 +01:00
Omar Chebib
42b2169542 coredump: add support for stacks in external RAM
Tasks having their stacks in SPIRAM can now be part of the coredump written to flash
2022-12-22 12:47:22 +01:00
Harshit Malpani
5cf26f61c0 Merge branch 'bugfix/protocol_components_no_format_cflag' into 'master'
Remove "-Wno-format" from protocol example specific components

See merge request espressif/esp-idf!21734
2022-12-22 18:54:48 +08:00
Darian
68e1e7d756 Merge branch 'bugfix/esp32s3_int_wdt' into 'master'
system: disable interrupts in esp_restart_noos_dig to fix infinite int_wdt on ESP32-S3

Closes IDF-6559

See merge request espressif/esp-idf!21755
2022-12-22 18:24:01 +08:00
Shu Chen
0215575606 Merge branch 'feature/esp32c6_ieee802154_support' into 'master'
ieee802154: add ieee802154 support for esp32c6

See merge request espressif/esp-idf!21615
2022-12-22 18:01:58 +08:00
Darian Leung
acd88e3f5e driver: Fix flakey gptimer tests by allowing larger count deltas 2022-12-22 17:57:00 +08:00
Ivan Grokhotkov
2a1e5e1939
tools: fix RISC-V GDB not being installed for C2, C6, H2 2022-12-22 10:11:48 +01:00
Shang Zhou
5cf0d92503 Merge branch 'docs/update_esp32_c3_devkitc_2_pin_layout' into 'master'
docs: Update pin layout diagram for ESP32-C3-DevKitC-02

Closes DOC-2927 and DOC-3164

See merge request espressif/esp-idf!21430
2022-12-22 16:55:52 +08:00
Shang Zhou
b5d27aa436 docs: Update pin layout diagram for ESP32-C3-DevKitC-02 2022-12-22 16:55:51 +08:00
Song Ruo Jing
36cdf88a5b Merge branch 'contrib/github_pr_10402' into 'master'
ledc: move callback to IRAM as it's called from an ISR (GitHub PR)

Closes IDFGH-8990

See merge request espressif/esp-idf!21711
2022-12-22 16:55:29 +08:00
Jakob Hasse
58f58c25a6 Merge branch 'docs/test_linux' into 'master'
docs: refactored and updated Linux target docs

See merge request espressif/esp-idf!21236
2022-12-22 16:36:51 +08:00
gauri patankar
f4a2829a70 esp_wifi: Update wifi libs
1. Avoid ftm initiator mode on softap
2. Fix home channel issue in ftm for apsta mode
3. Fix int overflow for T1-T4 counter variable
2022-12-22 14:00:32 +05:30
Ivan Grokhotkov
6020bb0f90 Merge branch 'feature/gdbstub_esp32c2' into 'master'
gdb stub: re-enable for ESP32-C2

Closes IDF-4135 and IDF-4245

See merge request espressif/esp-idf!21386
2022-12-22 16:00:01 +08:00
Song Ruo Jing
5d300b9bc1 Merge branch 'refactor/ledc_unit_test' into 'master'
ledc: Move ledc unit test to test_apps pytest framework

Closes IDF-5502

See merge request espressif/esp-idf!21723
2022-12-22 15:24:47 +08:00
Mahavir Jain
59c306764e Merge branch 'bugfix/remove_s3_dis_boot_remap_efuse_bit' into 'master'
docs: remove mention of DIS_BOOT_REMAP for chips other than ESP32-S2

See merge request espressif/esp-idf!21740
2022-12-22 14:50:11 +08:00
Song Ruo Jing
1a6e1aba3d ledc: Add check for whether the registered callback is in iram in ledc_cb_register 2022-12-22 14:38:58 +08:00
laokaiyao
7a002ab7a6 rtcio: support rtcio on c6 2022-12-22 14:14:38 +08:00
Jiang Jiang Jian
cfef24863f Merge branch 'bugfix/esp32c2_rev_1_1' into 'master'
esp32c2: fixed chip revision of ECO2

See merge request espressif/esp-idf!21735
2022-12-22 13:12:45 +08:00
chli
c158ec579b ledc: move callback to IRAM, it's called from an ISR 2022-12-22 12:11:32 +08:00
Kevin (Lao Kaiyao)
7e29d113ae Merge branch 'bugfix/add_unity_sig_sync_for_i2s_tdm_test' into 'master'
i2s_test: fixed rx_update stuck issue

Closes IDFCI-1527

See merge request espressif/esp-idf!21308
2022-12-22 11:27:52 +08:00
morris
32cd193ddf rmt: support pll clock source on esp32c6 2022-12-22 11:25:54 +08:00
Jack
f4953c453a doc: add esp now changes to migration guides 2022-12-22 11:20:01 +08:00
morris
c6e452a871 mcpwm: enable test on esp32c6 2022-12-22 11:17:38 +08:00
Chen Yu Dong
d3716c439d Merge branch 'ci/add_generic_to_xtal_26mhz_runners' into 'master'
CI: add generic to xtal_26mhz jobs

See merge request espressif/esp-idf!21725
2022-12-22 10:56:25 +08:00
xiaqilin
57a6abdad1 ieee802154: add support ieee802154 for esp32c6 2022-12-22 10:45:23 +08:00
Ivan Grokhotkov
0c9ac7df6d
system: disable interrupts in esp_restart_noos_dig 2022-12-21 21:58:59 +01:00
Djordje Nedic
370bc8a59d tools: Add tests for idf_size.py esp32c6 output
This MR adds tests for idf_size.py support for the esp32c6 chip.
2022-12-21 20:11:08 +01:00
Mahavir Jain
9c99080841 Merge branch 'fix/wifi_prov_scan_method' into 'master'
Changed wifi provisioning scan method

See merge request espressif/esp-idf!20408
2022-12-22 01:20:25 +08:00
Ivan Grokhotkov
03c542ecf7
test_build_system: fix incomplete env returned by get_idf_build_env
Previously get_idf_build_env didn't include the default environment
(os.environ) in its output, so the environment only contained the
variables returned by "idf_tools.py export".
If PATH already contains all the right paths, "idf_tools.py export"
doesn't return the PATH variable.
Therefore the environment returned by get_idf_build_env was usually
incomplete. Fix by combining the output of "idf_tools.py export" with
os.environ.
2022-12-21 17:22:55 +01:00