Wykres commitów

190 Commity (6328afdce66237cf43d8cc7a3769b4f8d45abdc8)

Autor SHA1 Wiadomość Data
Darian Leung aaf7547665 freertos: Refactor vTaskDelay() and vTaskDelayUntil() unit tests
This commit refactors the existing vTaskDelayUntil() unit test according to
the FreeRTOS unit test guidelines, and adds a new vTaskDelay() unit test.
2022-09-22 11:27:29 +08:00
Darian Leung 193e30bbf7 freertos: Rename vTaskDelayUntil unit test file 2022-09-22 11:27:29 +08:00
Darian Leung 0d9d4f60df freertos: Add unit test utilities
This commit adds "freertos_test_utils.h/c" that contains utility functions
used in FreeRTOS unit tests.
2022-09-22 11:27:29 +08:00
Darian Leung 882515fcef freertos: Add priority scheduling unit tests
This commit adds a priority scheduling unit test to test that the scheduler
always schedules the highest priority ready state task. Single core and SMP
variants of the test are both added.
2022-09-20 16:46:43 +08:00
Darian Leung 188c21319d freertos: Add test reorganization README.md and portTestMacro.h
This commit adds a README.md containing guidelines on how to refactor the
FreeRTOS unit tests for upstreaming. A portTestMacro.h header was also added
which contains port implementation specific macros used by the test cases.
2022-09-20 16:46:43 +08:00
Darian Leung 5804d2b6a7 freertos: Fix flakey event group unit tests
The event group unit tests would previously use a single call bit (the
"BIT_CALL" macro) to unblock all the test tasks. However, if one or more tasks
were delayed in calling xEventGroupWaitBits(), the other tasks would clear the
test bits, leading to the test deadlocking.

This commit updates the bits used so that each task gets their own CALL and
RESPONSE bits.
2022-08-10 16:54:25 +08:00
Ivan Grokhotkov 401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Guillaume Souchere 6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00
Darian Leung 38d974aca0 freertos: Update scheduler suspension unit tests
This commit updates unit tests for vTaskSuspendAll()/xTaskResumeAll().
2022-07-20 11:32:10 +08:00
Darian Leung ac38f9aaf1 freertos: Rename scheduler suspension test file 2022-07-20 11:32:10 +08:00
Marius Vikhammer 457e31a715 freertos: re-enable tests disabled for C2 2022-07-06 12:15:04 +08:00
Darian Leung 16e739a09e freertos: Fix flakey event group unit test
The "FreeRTOS Event Groups" main task will only wait a single tick for the created
tasks to set their response bits. This short delay may not be sufficent if the tick
frequency is high.

This commit updates the test so that

- the main task waits indefinitely for all the response bits to be set.
- created tasks are cleand up by the main task
2022-06-30 20:19:39 +08:00
Sudeep Mohanty 648f4d3a9f freertos-smp: Fix test_preemtion yield time threshold for FreeRTOS SMP
This commit adjusts the test_preemtion yield time threshold to pass when
FreeRTOS SMP is enabled.
2022-06-17 16:03:34 +02:00
Sudeep Mohanty 9a53a4abf1 freertos: refactor yield tests for freertos
This commit refactors the yield test scenarios for a more deterministic
prediction of the kernel's yielding behavior.
2022-06-13 10:57:55 +02:00
Marius Vikhammer 08c4984773 Merge branch 'bugfix/s3_psram_spinlock' into 'master'
spinlock: fixed spinlocks not working on S3 if placed in PSRAM

Closes IDF-5169, IDFGH-7560, and IDF-5007

See merge request espressif/esp-idf!18425
2022-06-09 13:02:18 +08:00
Anton Maklakov 763deaea3c freertos, tests: increase stack size for a test 2022-06-08 16:45:31 +07:00
Marius Vikhammer 486316f222 spinlock: fixed spinlocks not working on S3 if placed in PSRAM
The compare and set instruction (S32C1I) cannot be used when
lock is not in internal memory.

Closes https://github.com/espressif/esp-idf/issues/9120
2022-06-08 14:31:16 +08:00
Darian Leung 593fbe0b23 freertos: Disable scheduler suspension tests for SMP FreeRTOS
The behavior of vTaskSuspendAll() has changed in SMP FreeRTOS. This commit
disables scheduler suspension related unit tests for SMP FreeRTOS.

The tests will be updated in IDF-5201
2022-06-06 12:15:44 +08:00
Michael (XIAO Xufeng) 6a8aed12ee ci: partially enable ut tests for esp32c2
Disabled test cases are tracked in:

 IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131

- test_fatfs: IDF-5136

- test_pm: IDF-5053

- test_cache_mmu: IDF-5138

- test_partitions: IDF-5137

- test_vfs: IDF-5139

- test_freertos: IDF-5140

- test_wpa_supplicant: IDF-5046

- test_mbedtls: IDF-5141

- test_pthread: IDF-5142

- test_protocomm: IDF-5143

- test_lightsleep: IDF-5053

- test_taskwdt: IDF-5055

- test_tcp_transport: IDF-5144

- test_app_update: IDF-5145

- test_timer: IDF-5052

- test_spi: IDF-5146

- test_rtc_clk: IDF-5060

- test_heap: IDF-5167

ci: fixed issues for tests of libgcc, ets_timer, newlib

test_pm: support on C2
2022-06-02 14:23:35 +08:00
Sudeep Mohanty 7476e197ad freertos: fix test_preemtion test
Increased the yield count threshold to work for both SMP FreeRTOS and
IDF FreeRTOS.
2022-05-30 13:19:26 +05:30
Darian 1ec59e6982 Merge branch 'bugfix/update_eTaskGetState_unit_test' into 'master'
FreeRTOS: Refactor eTaskGetState() test for FreeRTOS SMP

Closes IDF-5073

See merge request espressif/esp-idf!18228
2022-05-30 11:44:51 +08:00
Darian Leung 49256fe5c9 freertos: Refactor TLSP deletion callback test
- Add a new test case for SMP FreeRTOS
- Old test case is preserved. To be removed in the future
2022-05-28 21:36:39 +08:00
Darian Leung ef6afa1324 freertos: Refactor eTaskGetState() unit test
This commit refactors the eTaskGetState() unit test to work on FreeRTOS SMP
2022-05-28 21:36:23 +08:00
Darian Leung 56d45f9999 freertos: Fix queue set tests for SMP FreeRTOS
The "Test Queue sets thread safety" tests relied on IDF FreeRTOS specific
scheduling behavior, thus resulting in the test getting stuck when running
with SMP FreeRTOS.

This commit updates and refactors the tests to work on both IDF and SMP FreeRTOS.
2022-05-19 16:28:10 +08:00
Sudeep Mohanty ffae594e8b freertos: ignore freertos yield test failures
This commit updates the freertos yield tests to be ignored by the CI
during failures.
2022-05-12 13:57:02 +05:30
Mahavir Jain dec3db6913 Merge branch 'bugfix/freertos_stack_tcb_alloc_order' into 'master'
freertos: fix allocation order for stack and TCB per portSTACK_GROWTH

See merge request espressif/esp-idf!18042
2022-05-11 18:09:49 +08:00
Mahavir Jain 318f723042
freertos: extend snapshot test to check return status of `vTaskGetSnapshot` 2022-05-10 14:19:17 +05:30
Sudeep Mohanty 3ea1c8bf96 freertos: add freertos unit test to verify yielding behavior of the kernel
This commit adds a unit test to verify the task yielding behavior of the
FreeRTOS SMP kernel.
2022-05-09 03:48:07 +00:00
morris e7295c3577 gptimer: added enable/disable functions 2022-05-06 18:18:39 +08:00
Ivan Grokhotkov 708e99497b
global: add dependency on esp_timer component and include esp_timer.h
Some components were including esp_timer.h without declaring a
dependency on esp_timer component. This used to work due to a
transitive public dependency on esp_timer from freertos component.
Add explicit dependencies where needed.
Also some source files were using esp_timer functions without
including the header file. This used to work because esp_timer.h was
included from freertos port header file. This commit adds esp_timer.h
includes where needed.
2022-04-25 18:39:23 +02:00
Zim Kalinowski dad8b50876 freertos: move test files to appropriate subfolders 2022-04-21 07:55:34 +00:00
Darian fc9c6a6cfb Merge branch 'feature/freertos_smp_port_local_storage' into 'master'
freertos: Disable portUSING_MPU_WRAPPERS

Closes IDF-4563

See merge request espressif/esp-idf!17409
2022-04-19 19:52:29 +08:00
Darian Leung 839476b461 freertos: Add SMP FreeRTOS coprocessor unit tests 2022-04-19 13:35:30 +08:00
morris f32a89826c clk_tree: added default clock source for peripheral 2022-04-14 15:44:56 +08:00
Darian Leung 8c88c6f68f freertos: Update task snapshot unit tests
This commit updates the task snapshot unit tests as follows:

- Both uxTaskGetSnapshotAll() and vTaskGetSnapshot() are now both tested
- Test cases are now dependent on CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
2022-04-01 22:01:16 +08:00
Marius Vikhammer 0fbae992dd config: removed references to non-existing kconfig options 2022-03-15 18:32:22 +08:00
Darian Leung 27f5c90e2e freertos: Fix usage of vTaskSuspendAll()/xTaskResumeAll()
IDF FreeRTOS uses vTaskSuspendAll()/xTaskResumeAll() to stop preemption
on a particular core. However, those functions behave differently in FreeRTOS SMP.
This commit replaces all calls of vTaskSuspendAll()/xTaskResumeAll() with
vTaskPreemptionDisable()/vTaskPreemptionEnable() when compiling with SMP FreeRTOS.
2022-03-08 14:59:18 +08:00
Darian Leung 883da858b0 freertos: Fix various build errors
This commit fixes various build errors in IDF (and tests) when compiling
with SMP FreeRTOS:

- Updated usage of xTaskGetIdleTaskHandle()
- Disable sysview tracing macros
- Update some task snapshot functions
- Disabled test_freertos_hooks.c test as vApplicationIdleHook() and
  vApplicationTickHook() are used.
2022-03-08 14:59:18 +08:00
Sudeep Mohanty a9fda54d39 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
Darian Leung 5f5daaa420 freertos: Remove legacy hooks
This commit refactors the legacy hooks as follows:

- Removed CONFIG_FREERTOS_LEGACY_HOOKS
- FreeRTOS hooks are now enabled via:
    - CONFIG_FREERTOS_USE_IDLE_HOOK
    - CONFIG_FREERTOS_USE_TICK_HOOK
- Update IDF hooks documentation
2022-02-18 19:56:35 +08:00
Darian Leung 57fd78f5ba freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
2022-02-09 23:05:45 +08:00
morris 705788a13f unit_tests: replace legacy timer group with gptimer 2022-01-07 14:59:09 +08:00
Marius Vikhammer 7255497146 freertos: remove FREERTOS_ASSERT option
Freertos asserts are now configured the same way as all other asserts in IDF,
i.e. by configuring COMPILER_OPTIMIZATION_ASSERTION_LEVEL.
2022-01-07 09:16:48 +08:00
Sudeep Mohanty e22b4007d3 esp_hw_support: Removed deprecated CPU util functions
The following files were deleted:
- components/esp_hw_support/include/soc/cpu.h
- components/soc/esp32s3/include/soc/cpu.h

The following functions are deprecated:
- get_sp()

The following functions declared in soc/cpu.h are now moved to esp_cpu.h:
- esp_cpu_configure_region_protection()

The following functions declared in soc/cpu.h are now moved to components/xtensa/include/esp_cpu_utils.h:
- esp_cpu_process_stack_pc()

All files with soc/cpu.h inclusion are updated to include esp_cpu.h instead.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-28 16:58:37 +05:30
Cao Sen Miao e81841318f CI: Enable ESP8684 build stage CI on master 2021-12-13 19:18:47 +08:00
Sudeep Mohanty 40c1f3e06e freertos: update module handles to struct type
This commit updates the handles for the timer, task and event_group
modules to struct type. This matches upstream freertos source.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-06 08:37:06 +05:30
Darian Leung 289730820b freertos: Add missing INCLUDE_ configurations for some functions
This commit adds missing INCLUDE_ configurations to FreeRTOSConfig.h for
the following functions:

- xTaskAbortDelay()
- xTaskGetHandle()

Unit tests for these functions were also added.

Closes https://github.com/espressif/esp-idf/issues/7902
2021-11-25 00:04:07 +08:00
Darian Leung 9b3796d2f1 freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions
Add TRY_ENTRY_CRITICAL() API to all for timeouts when entering critical sections.
The following port API were added:
- portTRY_ENTER_CRITICAL()
- portTRY_ENTER_CRITICAL_ISR()
- portTRY_ENTER_CRITICAL_SAFE()

Deprecated legacy spinlock API in favor of spinlock.h. The following API were deprecated:
- vPortCPUInitializeMutex()
- vPortCPUAcquireMutex()
- vPortCPUAcquireMutexTimeout()
- vPortCPUReleaseMutex()

Other Changes:
- Added portMUX_INITIALIZE() to replace vPortCPUInitializeMutex()
- The assembly of the critical section functions ends up being about 50 instructions longer,
  thus the spinlock test pass threshold had to be increased to account for the extra runtime.

Closes https://github.com/espressif/esp-idf/issues/5301
2021-11-22 13:28:39 +08:00
Roland Dobai 766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Omar Chebib 9d5923a13e IPC: Move ipc sources to esp_system
IPC shall be put back into esp_system as it is an 'OS additions'.
2021-11-11 10:30:01 +08:00