Commit Graph

128 Commits

Author SHA1 Message Date
Igor Udot
b5ab82ce3c Merge branch 'fix/replace_pytest_function' into 'master'
ci: replace pytest function

Closes IDFCI-1693

See merge request espressif/esp-idf!30531
2024-07-31 17:23:56 +08:00
Marius Vikhammer
77bb7c888f Merge branch 'ci/pthread_qemu_tests' into 'master'
test(pthread): fixed memory leak in QEMU tests

Closes IDFCI-2223

See merge request espressif/esp-idf!32042
2024-07-26 13:35:08 +08:00
igor.udot
8691672f03 ci: replace pytest function 2024-07-23 14:07:31 +08:00
wanlei
3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
Marius Vikhammer
f23f425d96 test(pthread): fixed memory leak in QEMU tests 2024-07-11 10:51:49 +08:00
Marius Vikhammer
15b05d59c3 Merge branch 'contrib/github_pr_14084' into 'master'
remove TLS pointer/deletion callback from correct thread (GitHub PR)

Closes IDFGH-13144

See merge request espressif/esp-idf!31766
2024-07-02 13:31:52 +08:00
Myk Melez
c1e58e7d2d fix(pthread): Remove TLS pointer/deletion callback from correct thread
Originally, pthread_internal_local_storage_destructor_callback was only called from pthread_exit
on the thread whose TLS is being destroyed.

In b3755b751e, pthread_internal_local_storage_destructor_callback
started being called from pthread_join and pthread_detach on a different thread (whichever one
called one of those functions).

But pthread_internal_local_storage_destructor_callback is still calling
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback with a NULL
xTaskToSet argument, which causes those functions to set the TLS pointer and deletion callback
for the current thread, not the thread whose TLS is being destroyed.

This commit makes pthread_internal_local_storage_destructor_callback call
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback
with the handle of the thread whose TLS is being destroyed.
2024-06-26 16:31:48 -07:00
Alexey Lapshin
ed6e497c6f feat(build): add COMPILER_STATIC_ANALYZER option 2024-06-18 14:25:37 +08:00
Jakob Hasse
bf2bbbde16 ci: Added missing generic tag to psram tests 2024-04-16 09:17:41 +02:00
Kevin (Lao Kaiyao)
432864e917 Merge branch 'ci/enable_c5_mp_ci_jobs' into 'master'
ci(esp32c5mp): enable esp32c5 build on CI

See merge request espressif/esp-idf!29895
2024-04-08 12:16:16 +08:00
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Chen Yudong
7d13f8210f ci: fix pytest generic env markers 2024-04-03 18:10:43 +08:00
Marius Vikhammer
f2fe408b99 refactor(core): reformat newlib and pthread with astyle 2024-02-27 10:00:06 +08:00
fl0wl0w
90d1dcfd76 feat(freertos): Introduced new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES
This commit replaces the use of portNUM_PROCESSORS and configNUM_CORES
macros in all of ESP-IDF. These macros are needed to realize an SMP
scenario by fetching the number of active cores FreeRTOS is running on.
Instead, a new Kconfig option, CONFIG_FREERTOS_NUMBER_OF_CORES, has been
added as a proxy for the FreeRTOS config option, configNUMBER_OF_CORES.
This new commit is now used to realize an SMP scenario in various places
in ESP-IDF.

[Sudeep Mohanty: Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES]

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2024-02-09 09:11:28 +01:00
Marius Vikhammer
2bb16ed45b refactor(pthread): decouple pthread_init from esp_system 2024-02-08 09:40:46 +08:00
Jakob Hasse
be59c94917 feat(pthread): Pthread can now use PSRAM as stack
Closes https://github.com/espressif/esp-idf/pull/10623
Closes https://github.com/espressif/esp-idf/issues/8662

Thanks to f-hoepfinger-hr-agrartechnik for the contribution
in https://github.com/espressif/esp-idf/pull/10623
2024-01-22 15:33:05 +08:00
Marius Vikhammer
8fe0f99368 change(system): enabled pthread, ringbuf and event tests 2023-12-21 11:09:42 +08:00
Jakob Hasse
a937efef1a feat(pthread): added pthread_condattr* stubs to avoid linker errors
Closes https://github.com/espressif/esp-idf/issues/12171
2023-09-26 12:17:38 +08:00
Jakob Hasse
ccaceec15d fix(pthread): fixed pthread_condvar linker hook 2023-09-12 11:17:31 +08:00
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Jakob Hasse
8042362e2a refactor: moved semaphore.h to newlib platform_include
Closes https://github.com/espressif/esp-idf/issues/11540
2023-08-08 16:45:57 +08:00
Zim Kalinowski
1f3aec2e67 bugfix(pthread): fixed log related warning 2023-07-19 15:51:56 +08:00
Zim Kalinowski
3e48e008e2 pthread: updated qemu test scripts 2023-06-13 13:05:15 +02:00
Alexey Lapshin
dfcab42a01 pthread: fix restrict keyword usage in function declarations
See https://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html
2023-05-05 13:35:19 +08:00
Jakob Hasse
852c60fee0 Merge branch 'refactor/pthread_iram' into 'master'
pthread: removed IRAM code from pthread

Closes IDF-7147

See merge request espressif/esp-idf!23213
2023-04-19 15:31:19 +08:00
Jakob Hasse
e7312cccea pthread: added pthread_rwlock_tryrd/wrlock()
Closes https://github.com/espressif/esp-idf/issues/9229
2023-04-17 16:16:11 +08:00
Jakob Hasse
999fa28187 pthread: removed IRAM code from pthread
* Currently, the underlying FreeRTOS API functions
  used for the pthread implementation are not
  ISR-safe, hence the removal of IRAM placement.
2023-04-17 10:19:33 +08:00
Jakob Hasse
45c8b8ba10 pthread: Implemented POSIX unnamed semaphore 2023-03-21 10:23:58 +08:00
Jakob Hasse
8e2e61ad83 pthread: unit test builds only necessary components 2023-03-14 09:37:01 +08:00
Jakob Hasse
be7859ad43 pthread: fixed wrong deletion of condvar in unit test 2023-03-14 09:37:01 +08:00
Jakob Hasse
0769298b3b Merge branch 'contrib/github_pr_8987' into 'master'
pthread: avoid heap alloc in pthread_cond_timedwait if possible (GitHub PR)

Closes IDFGH-7409

See merge request espressif/esp-idf!22702
2023-03-13 19:34:21 +08:00
Zim Kalinowski
ff3a3ac411 pthread: fix and re-enable no-format warnings 2023-03-12 21:49:57 +01:00
MacDue
253b952f4d pthread: avoid heap alloc in pthread_cond_timedwait 2023-03-10 15:52:27 +08:00
Omar Chebib
5e5343d429 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
David Cermak
fa97004faf lwip: Support for linux target
Implement linux port layer and reuse the original FreeRTOS layer
that's compiled and used on linux target as well, by means of FreeRTOS
simulator.
2023-01-31 08:43:45 +01:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
Zim Kalinowski
7627a12045 pthread: enable qemu tests 2022-12-13 21:42:58 +01:00
Sudeep Mohanty
b3755b751e pthread: Remove pthread TLS cleanup dependency on FreeRTOS Static Task Cleanup Hook
This commit removes the need to define the vTaskCleanupTCB hook in
pthread to cleanup the thread-specific data before a thread is deleted.
2022-11-02 09:52:28 +01:00
Song Ruo Jing
be0fdfa176 soc: Add a soc cap, SOC_CLK_RC_FAST_D256_SUPPORTED, for whether the target has the RC_FAST_D256 clock 2022-11-01 11:23:26 +08:00
Ivan Grokhotkov
4a69a3f7ef Merge branch 'feature/cmake_use_new_features' into 'master'
cmake: use features introduced between 3.5 and 3.16

Closes IDF-5955

See merge request espressif/esp-idf!19819
2022-09-21 11:05:06 +08:00
Ivan Grokhotkov
c392c06216
cmake: remove -D prefix from COMPILE_DEFINITIONS property
Unlike COMPILE_OPTIONS, COMPILE_DEFINITIONS CMake property assumes
values without the -D prefix, such as NAME or NAME=VAL.
Previously, IDF build system was passing COMPILE_DEFINITIONS build
property to CMake COMPILE_OPTIONS property, so -D prefix was not
a problem.
Now that COMPILE_DEFINITIONS CMake property is used, -D prefix has
to be removed.

(Note that this doesn't affect 'target_compile_definitions' function,
which strips -D prefix before adding the definition to the property.)
2022-09-20 11:08:02 +02:00
Marius Vikhammer
46c092c04a pthread: migrate unit tests to pytest test app 2022-09-19 17:43:33 +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
Darian Leung
781d06af73 esp_hw_support: Remove compare_set.h API
This function removes the following legacy atomic CAS functions:

From compare_set.h (file removed):
- compare_and_set_native()
- compare_and_set_extram()

From portmacro.h
- uxPortCompareSet()
- uxPortCompareSetExtram()

Users should call esp_cpu_compare_and_set() instead as this function hides the details
of atomic CAS on internal and external RAM addresses.

Due to the removal of compare_set.h, some missing header includes are also fixed in this commit.
2022-07-22 00:06:06 +08:00
Marius Vikhammer
c6260e66e5 system: re-enable esp_event, real_time_stats and pthread examples and test for C2 2022-06-23 02:05:46 +00:00
Darian Leung
97cf44cbe0 freertos: Fix SMP FreeRTOS TSLP deletion callback tests
The TLSP deletion callback feature is not compatible with the CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
option. However, the "freertos_options" unit test configuration will enable that option.

This commit disables all CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP related features when compiling with
SMP FreeRTOS.
2022-06-17 21:57:11 +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
Anton Maklakov
8ea1a2b1e8 pthread: add missing header 2022-05-30 12:43:36 +07: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
Anton Maklakov
68e5d9d585 Remove IRAM_ATTR from any function declarations
IRAM_ATTR expands to a unique section attribute. Applying it to both
declaration and definition results in a section conflict.
2022-03-22 09:58:50 +00:00