Commit Graph

1214 Commits

Author SHA1 Message Date
Darian Leung
5d75bfdb3c
feat(freertos/smp): Update SMP FreeRTOS files to V11.1.0
This commit updates the source files of Amazon SMP FreeRTOS to upstream
V11.1.0 (https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/V11.1.0).

This version contains some new features and bugfixes. See upstream V11.1.0
release notes for more details.

Note: ESP-IDF specific changes to the source file have been preserved
2024-06-03 03:13:58 +08:00
Omar Chebib
82668dd3fe fix(riscv): make HWLP feature use direct saving of lazy saving 2024-05-21 17:27:46 +08:00
Omar Chebib
55acc5e5e7 feat(riscv): add support for PIE coprocessor and HWLP feature
FreeRTOS tasks may now freely use the PIE coprocessor and HWLP feature.
Just like the FPU, usiing these coprocessors result in the task being pinned
to the core it is currently running on.
2024-05-20 10:47:58 +08:00
Darian
2716976c72 Merge branch 'fix/freertos_scheduler_suspend_crit' into 'master'
fix(freertos/idf): Add missing critical sections to vTaskSuspendAll()

See merge request espressif/esp-idf!30829
2024-05-17 22:06:38 +08:00
Darian Leung
25efe5525d
refactor(freertos/idf): Add critical section requirements to function description
This commit adds a note regarding the critical section calling requires of some
internal functions.
2024-05-15 23:39:28 +08:00
Darian Leung
88a0227dbe
fix(freertos/idf): Add missing critical sections to vTaskSuspendAll()
vTaskSuspendAll() requires critical sections when building for SMP. Otherwise,
it is possible for a task to switch cores in between getting the core ID and
before incremented uxSchedulerSuspended.
2024-05-15 23:29:28 +08:00
Konstantin Kondrashov
aed84fa818 feat(efuse): Support Linux target 2024-05-15 16:54:45 +03:00
Jakob Hasse
9c965073d4 Merge branch 'feature/linux_backtraces' into 'master'
refactor(linux): Improved error reporting

See merge request espressif/esp-idf!30387
2024-04-25 15:57:07 +08:00
Jakob Hasse
4c5cded945 refactor(linux): Improved error reporting
* Without using GDB, segfaults and aborts are reported
  clearly now
* Without using GDB, segfaults produce a rudimentary
  backtrace now
2024-04-24 18:12:45 +02:00
Darian Leung
13c4a57a2d
fix(freertos): Fix vTaskList() parameter print order
xCoreID was previously printed as the last parameter priority to IDF v5.1, but
was changed to the third paramtere from v5.2 onwards. This commit restores the
correct ordering.

Closes https://github.com/espressif/esp-idf/issues/13675
2024-04-24 17:19:38 +08:00
Wu Zheng Hui
2c4097b4d2 Merge branch 'bugfix/fix_esp32p4_light_sleep_issues' into 'master'
fix(esp_hw_support): fix esp32p4 light sleep issues

Closes PM-96, PM-97, and IDF-9569

See merge request espressif/esp-idf!30089
2024-04-18 19:18:56 +08:00
wuzhenghui
270b9d22e4
fix(ci): fix CI unity test cases failure 2024-04-18 18:07:07 +08:00
Konstantin Kondrashov
40684a0e1c Merge branch 'feature/freertos_runtime_counter_support' into 'master'
feat(freertos): Runtime Counter support

Closes IDFGH-12057

See merge request espressif/esp-idf!30150
2024-04-18 18:01:34 +08:00
Konstantin Kondrashov
66e6a48efd feat(freertos): Runtime Counter support
Closes https://github.com/espressif/esp-idf/issues/13120
2024-04-18 10:26:38 +03:00
Jiang Jiang Jian
5f19a8797a Merge branch 'contrib/github_pr_13022' into 'master'
fix(freertos): Fix broken portable macro portTRY_ENTER_CRITICAL_SAFE()

Closes IDFGH-11943

See merge request espressif/esp-idf!30030
2024-04-17 10:41:10 +08:00
Omar Chebib
f6e935e013 fix(esp32c5): add CLIC interrupt controller support for the ESP32-C5 2024-04-16 10:38:14 +08:00
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Andy Lin
4f6deb9f61 fix(freertos): Fix broken portable macro portTRY_ENTER_CRITICAL_SAFE()
This commit fixes a bug where the portTRY_ENTER_CRITICAL_SAFE() for the
Xtensa and RISC-V FreeRTOS ports were broken as it did not correctly use
the timeout parameter.

Merges: https://github.com/espressif/esp-idf/pull/13022
2024-04-03 14:35:31 +02:00
wuzhenghui
7408732688
fix(freertos): Updated threshold for scheduling time test for esp32p4
This commit increases the pass threshold for the scheduling time test on
esp32p4.
2024-03-27 16:19:19 +08:00
Sudeep Mohanty
c6efc57e6e fix(freertos): Re-enabled FreeRTOS unit tests for esp32p4
This commit reenables the FreeRTOS unit tests to be run during CI
pipelines for esp32p4.
2024-03-25 09:03:09 +01:00
Sudeep Mohanty
68dbbf339d fix(freertos): Updated unstable FreeRTOS unit tests
This commit fixes some flaky FreeRTOS unit tests.
2024-03-25 09:03:09 +01:00
wanlei
a611e91b2f feat(esp32c61): new chip add system and esp_timer support 2024-03-21 11:31:15 +08:00
Sudeep Mohanty
4f3cd0deb9 Merge branch 'fix/freertos_task_c_add_coverity_fix' into 'master'
fix(freertos): Fixed an issue where accessing task lists could overrun memory

Closes IDF-9412

See merge request espressif/esp-idf!29746
2024-03-20 15:54:39 +08:00
Sudeep Mohanty
42c935e2c3 fix(freertos): Fixed an issue where accessing task lists could overrun memory
This commit fixes a potential issue of illegal memory access when
accessing the various task lists in FreeRTOS while fetching tasks using
the xTaskGetNext() function.
2024-03-19 17:33:18 +01:00
Alexey Lapshin
40be44f827 feat(system): refactor linker scripts
- move .tbss to NOLOAD section
- remove xtensa-specific entities from riscv scripts
- explicit eh_frame terminator instead of "align magic"
- 80 characters line length limit
- refactor comments
- discard .rela sections (the rela data will go to relates sections)
2024-03-19 13:27:11 +04:00
laokaiyao
24d6dcb829 feat(esp32c5mp): add system related components 2024-03-18 17:34:56 +08:00
Sudeep Mohanty
abd3a3999f fix(freertos): Updated dependency list for CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER option
This commit updates the dependency for
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER to be dependent explicitly on
CONFIG_ESP_SYSTEM_PANIC_GDBSTUB or CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME
instead of CONFIG_ESP_GDBSTUB_ENABLED which caused FreeRTOS Task
Function Wrappers to be enabled even if the esp_gdbstub component was
part of the build.
2024-03-14 08:41:51 +01:00
Darian Leung
1332f2934a
feat(freertos): Add application task tag support
This commit enables support for application task tag.

- Added CONFIG_FREERTOS_USE_APPLICATION_TASK_TAG option
- Added basic unit test
2024-03-09 00:57:37 +08:00
Darian
dc86c17b38 Merge branch 'feature/freertos_smp_update_to_v11' into 'master'
FreerTOS: Update Amazon SMP FreeRTOS files to V11.0.1

See merge request espressif/esp-idf!28352
2024-03-07 15:03:21 +08:00
Darian
b7428bcf7d Merge branch 'bugfix/freertos_tick_hook_build_issue' into 'master'
fix(freertos/idf): Fix build error when CONFIG_FREERTOS_USE_TICK_HOOK is enabled

Closes IDFGH-12247

See merge request espressif/esp-idf!29380
2024-03-05 19:26:58 +08:00
Darian Leung
83c686c744
feat(freertos/smp): Update ports to support Amazon FreeRTOS v11.0.1
- vTaskPreemptionDisable()/vTaskPreemptionEnable() are no longer available in
single-core builds.
- xTaskIncrementTick() calls must now be wrapped by critical section
- Minimal Idle Task renamed to Passive Idle Task
- Port critical section APIs updated
2024-03-05 15:44:12 +08:00
Darian Leung
888678d102
feat(freertos/smp): Add ESP-IDF specific modifications
- Add ESP-IDF specific modifications to FreeRTOS-Kernel-SMP source code
- Update IDF addition source files to support V11 kernel
2024-03-05 15:44:12 +08:00
Darian Leung
421dab29fa
feat(freertos/smp): Update SMP FreeRTOS files to V11.0.1
This commit updates the source files of Amazon SMP FreeRTOS to upstream
V11.0.1 (https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/V11.0.1).

This version contains SMP support.
2024-03-05 15:44:11 +08:00
Jakob Hasse
32ecb0411c Merge branch 'fix/console_linux_target_mac' into 'master'
fix(linux): prevent build error on MacOS and optimize buffer usage on Linux

See merge request espressif/esp-idf!29176
2024-03-05 09:59:55 +08:00
Darian Leung
f9965e3092
change(freertos): Test tick and idle hooks in options test
Add CONFIG_FREERTOS_USE_TICK_HOOK and CONFIG_FREERTOS_USE_IDLE_HOOK to
sdkconfig.ci.freertos_options to ensure those options are tested.
2024-03-04 22:34:13 +08:00
Darian Leung
dec3786d30
fix(freertos/idf): Fix build error when CONFIG_FREERTOS_USE_TICK_HOOK is enabled
Closes https://github.com/espressif/esp-idf/issues/13297
2024-03-04 22:34:12 +08:00
Sudeep Mohanty
e4f167df25 Merge branch 'fix/freertos_optimize_critical_sections' into 'master'
fix(riscv): Updated RISC-V functions to set interrupt threshold for CLIC targets

Closes IDFCI-2033, IDFCI-2034, IDF-8090, and IDF-8117

See merge request espressif/esp-idf!29055
2024-03-01 17:51:14 +08:00
Jakob Hasse
f9c9e18bca fix(linux): prevent build error on MacOS and optimize buffer usage on Linux 2024-03-01 11:01:15 +08:00
Alexey Lapshin
fdb7a43752 Merge branch 'feature/esp32p4_concontiguous_mem_mvp' into 'master'
feat(esp_system): allow .bss to spill over into L2MEM above 0x4ff40000 on P4

See merge request espressif/esp-idf!28783
2024-02-29 16:28:13 +08:00
Alexey Lapshin
824c8e0593 feat(esp_system): allow .bss to spill over into L2MEM above 0x4ff40000
This commit introduce SOC_MEM_NON_CONTIGUOUS_SRAM flag (that enebled for
esp32p4). If SOC_MEM_NON_CONTIGUOUS_SRAM is enabled:

- LDFLAGS+=--enable-non-contiguous-regions
- ldgen.py replaces "arrays[*]" from sections.ld.in with objects under
  SURROUND keyword. (e.g. from linker.lf: data -> dram0_data SURROUND(foo))
- "mapping[*]" - refers to all other data

If SOC_MEM_NON_CONTIGUOUS_SRAM, sections.ld.in file should contain at
least one block of code like this (otherwise it does not make sense):

  .dram0.bss (NOLOAD) :
  {
    arrays[dram0_bss]
    mapping[dram0_bss]
  } > sram_low

  .dram1.bss (NOLOAD) :
  {
    /* do not place here arrays[dram0_bss] because it may be splited
     * between segments */
    mapping[dram0_bss]
  } > sram_high
2024-02-28 19:41:25 +04:00
Sudeep Mohanty
459ff8348f fix(riscv): Added RISC-V functions to set interrupt threshold for CLIC targets
This commit added the RISC-V utility functions to set the interrupt
threshold for CLIC targets by using direct register value writes.
This makes the functions more efficient during run-time.
This is done to improve the critical section enter and exit performance on esp32p4.
2024-02-28 08:51:37 +01: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
Jakub Kocka
0b00e49ac5 fix: Fixed KConfig files that were not succesfully checked 2024-02-02 14:13:45 +01:00
Sudeep Mohanty
061da98124 refactor(freertos): Updated FreeRTOS component files to astyle format
This commit updates the FreeRTOS component source files (excluding
upstream source files) to the astyle coding format.
2024-01-31 16:41:58 +08:00
Ivan Grokhotkov
ecccad727f Merge branch 'bugfix/macos_build_linux_target_freertos' into 'master'
fix(freertos): override select function without relying on -Wl,--wrap

See merge request espressif/esp-idf!28065
2024-01-24 04:14:00 +08:00
Ivan Grokhotkov
f5cd3b7ff4
fix(freertos): override select function without relying on -Wl,--wrap
This commit changes the approach used to override select function
in FreeRTOS simulator.

The previous approach relied on '--wrap', which is a feature of GNU
linker that performs symbol substitution at link time. Sadly this
feature is not present in macOS linker.

The alternative solution is to define 'select' wrapper as a regular
(exported) symbol, preventing it from being loaded from system
libraries. To call the "real" select implementation we use dlsym
function and find the function pointer at run time. This solution
works on both Linux and macOS.
2024-01-23 16:57:38 +01:00
Ivan Grokhotkov
66431a62d1
fix(freertos): warning fix for building with IDF_TARGET=linux on macOS 2024-01-23 16:57:37 +01:00
Erhan Kurubas
029a0582e1 feat(coredump): improve the probability of accessing healthy TCBs 2024-01-22 00:18:28 +08:00
Omar Chebib
cdde05335e Merge branch 'refactor/riscv_interrupt' into 'master'
refactor(riscv): Refactor crosscore interrupts and core interrupt code

Closes IDF-5720, DOC-5177, and IDF-7899

See merge request espressif/esp-idf!27845
2024-01-19 10:51:04 +08:00
Omar Chebib
102d5bbf72 refactor(riscv): added a new API for the interrupts 2024-01-18 16:36:53 +08:00