Commit Graph

23 Commits

Author SHA1 Message Date
Darian Leung
e21ab0332b freertos(IDF): Refactor port heap functions
Vanilla FreeRTOS expects applications to use one of the heap implementations
provided by FreeRTOS (i.e., heap_x.c), where functions such as pvPortMalloc()
and vPortFree() are defined in the heap implementation.

However, ESP-IDF already provides its own heap implementation
(i.e., esp_heap_caps.h). Thus, the pvPortMallc()/vPortFree() functions were
previously overriden by macro to call esp_heap functions directly.

This commit refactors the FreeRTOS port's heap as such:

- Added a heap_idf.c that implements all of the heap related functions required
  by FreeRTOS source
- All dynamic memory allocated by FreeRTOS is from internal memory. Thus, the
  FreeRTOS heap is the internal memory subset of the ESP-IDF heap.
- Removed some old macros to reduce diff from upstream source code.
2023-03-06 16:00:29 +08:00
Darian Leung
c97523ae0a freertos: Fix stream buffer send-receive test
The stream buffer send-receive test preivously contained the following bugs:

- "sender" task would send 101 bytes instead of 100
- The main task would return before "sender" task sends its 101st item. Thus
  the sender task would cause memory corruption when accessing "tc" structure
  allocated on the main task's stack

This commit fixes and simplifies the stream buffer test.
2023-02-23 12:52:28 +08:00
Cao Sen Miao
fd3e0b0b18 esp32h2(ci): enable target test 2023-02-15 10:20:43 +08:00
Marius Vikhammer
25abc7f6d8 ci: update idf-core related tests for C6 2023-02-13 13:01:57 +08:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +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
Song Ruo Jing
1575b9e43a ci: Disable all currently failed target tests for esp32c6 2022-11-28 12:09:08 +08:00
Jakob Hasse
73d9d83a2f feat(freertos): make num of task notifications configurable
Closes https://github.com/espressif/esp-idf/issues/9349
2022-11-15 09:36:42 +01:00
Darian Leung
5e5a40f7ac freertos: Add Amazon SMP FreeRTOS unit test configuration 2022-11-10 16:01:15 +08:00
Zim Kalinowski
b354b457c8 Merge branch 'feature/freertos_smp_enable_static_task_cleanup' into 'master'
freertos-smp: Enable static task cleanup

See merge request espressif/esp-idf!20870
2022-11-04 19:18:03 +08:00
Darian Leung
95cfd32871 freertos: Fix flakey task delay tests
This commit fixes flakey task delay tests when running on IDF FreeRTOS. IN IDF
FreeRTOS, core 1's tick interrupts could be up to (< 1 tick) out of phase from
core 0's tick interrupt, thus the measured delay time on core 1 could last 1
tick longer. This commit makes the test detla 2 ticks for IDF FreeRTOS.
2022-11-03 18:22:58 +08:00
Sudeep Mohanty
defd6c4ec1 freertos-smp: Enable static task cleanup
This commit enables Static task cleanup feature for FreeRTOS SMP.
2022-11-02 11:24:07 +01:00
Song Ruo Jing
2557e24a28 ci: Enable esp32c6 example, test_apps, and unit tests CI build stage 2022-11-01 11:23:21 +08:00
Zim Kalinowski
09587b84c2 freertos: final test cleanup 2022-10-25 17:41:29 +02:00
Darian Leung
96fce0c9c4 freertos: Fix/remove flakey tests after migration
This commit fixes/ignores flakey freertos unit tests after migrating them to
the test app:

- Added vTaskDelay() before teardown to prevent memory leaks
- Adjusted the "main" task's priority so that scheudling tasks would work
- pytest now only runs tests that are not ignored
- Reset tests are temporarily ignored. Will be enabled to dedicate reset tests.
- Some flakey tests are fixed by adjusting delays and stack sizes.
2022-10-23 20:02:14 +08:00
Darian Leung
c36e06c45c freertos: Add test app sdkconfig
This commit adds the sdkconfig files for the FreeRTOS test app. These
configurations were dervied from the various legacy unit test app's
config files that included the FreeRTOS component.

This commit tries to keep a 1 to 1 config parity with the legacy test app.
Meaning, if FreeRTOS test were run on a particular target with a particular
config, that config will be represented in one of the test app's
sdkconfig.ci.XXX files.

However, the following configurations were removed for FreeRTOS tests:

- The "freertos_flash" option was removed due to redudancy (already tested in
  freertos_options)
2022-10-23 20:02:14 +08:00
Darian Leung
a50a238c18 freertos: Tidy up test organization
Some tests were placed in the incorrect test groups (i.e., kernel, port,
performance etc). This commit fixes those placements.

The following redundant tests were also removed:

- "test_panic.c" as behavior is already covered in esp_system tests
2022-10-23 19:56:47 +08:00
Darian Leung
54d7a3bb66 freertos: Migrate misc tests to test app
This commit migrates the "misc" tests to the test app as a component.
2022-10-23 19:56:47 +08:00
Darian Leung
87c3cc57d1 freertos: Migrate performance tests to test app
This commit migrates the "performance" tests to the test app as a component.
2022-10-23 19:56:47 +08:00
Darian Leung
df9aa722af freertos: Migrate port tests to test app
This commit migrates the "port" tests to the test app as a component.
2022-10-23 19:56:47 +08:00
Darian Leung
df4bfeee5b freertos: Migrate kernel tests to test app
This commit renames the "integration" tests to "kernel" test and migrates them
to the test app as a component.
2022-10-23 19:56:47 +08:00
Darian Leung
60edaa4152 freertos: Add blank freertos test app
This commit adds a blank FreeRTOS test app in preparation for migrating of
FreeRTOS unit tests to the created test app.
2022-10-23 19:56:47 +08:00
Marius Vikhammer
38d30548d4 freertos: fixed ORIG_INCLUDE_PATH cmake property having the wrong path
FreeRTOS include path was changed, but ORIG_INCLUDE_PATH wasn't updated to reflect this.
2022-08-24 18:43:28 +08:00