78 Commits

Author SHA1 Message Date
Guillaume Souchere 1c2f7b435a feat(esp_system): Add linux support for freertos hooks and system init function 2026-04-01 11:46:06 +02:00
Guillaume Souchere 8232fe077a Merge branch 'feat/add-esp-cpu-linux-support' into 'master'
feat(esp_hw_support): Provide esp_cpu.h support for linux target

See merge request espressif/esp-idf!46647
2026-03-19 12:00:56 +01:00
wuzhenghui 6f1bea6a5d refactor(esp_system): ind_wdt.c refactor & code clean
1. introduce reconfigure_ticks function for wdt configuration
 2. move esp32eco3 cache livelock workaround code out from int_wdt.c
2026-03-18 11:29:51 +08:00
Guillaume Souchere 5415465164 feat(esp_hw_support): Add esp_cpu.h support for linux builds 2026-03-17 07:49:36 +01:00
gaoxiaojie fab0bb1056 fix(esp_system): clear cache error interrupt in panic handler 2025-09-24 21:30:56 +07:00
Marius Vikhammer 56e0c11bb6 feat(usb_cdc_console): moved usb-cdc ROM console to new component: esp_usb_cdc_rom_console 2025-08-22 09:37:47 +08:00
Erhan Kurubas f5ffef1556 change(app_trace): move gcov component to the esp-component-registry 2025-08-11 13:24:42 +03:00
Gao Xu c59b42ca9e Merge branch 'fix/fix_h4_wrong_spinlock' into 'master'
fix(esp_system): fix wrong spinlock num on H4

See merge request espressif/esp-idf!39924
2025-06-24 10:50:29 +08:00
Konstantin Kondrashov ff0408c087 feat(esp_system): Adds Kconfigs to place code in IRAM 2025-06-23 13:23:33 +03:00
Omar Chebib e6e898e9de fix(esp_system): fix the usage conditions of os_spinlock 2025-06-23 16:24:52 +08:00
C.S.M f76d50c279 refactor(system): Make it usable in tee build 2025-06-18 11:56:08 +08:00
Guillaume Souchere ae7c8691d9 fix(esp_vfs_console): USB CDC read when non blocking
In non blocking mode, the read function is expected
to return weather data is available for reading or not.

In case data are available but the size does not match
the expected size, the function read should return whatever
data is available.

Previously, the function was returning -1 with errno set
to EWOULDBLOCK even if the size of data in the buffer was
less than the requested size. It would only return the
available data if the size in the buffer was greater or equal
to the requested size.

The implementation of cdcacm_read is modified to return the avilable
data from the buffer even is the size is lesser than the requested
size.
2025-01-30 08:51:54 +01:00
Omar Chebib d6cd339e46 fix: take into account MR comments 2025-01-09 11:57:02 +08:00
Guillaume Souchere 181c903b0b feat(usb_cdc): Add select functionality 2024-11-26 06:12:37 +01:00
Marius Vikhammer 6e51c0525d fix(wdt): changed register dump on non panic task WDT to be more descriptive
Closes https://github.com/espressif/esp-idf/issues/14400
2024-08-22 10:48:26 +08:00
Konstantin Kondrashov aed84fa818 feat(efuse): Support Linux target 2024-05-15 16:54:45 +03:00
KonstantinKondrashov a3bfb3f857 feat(ipc): Adds a new no blocking IPC call 2024-03-22 19:49:42 +02:00
Erhan Kurubas 7234303e9e feat(system): move esp_dbg_stubs_init into component 2024-01-31 20:12:45 +01:00
Marius Vikhammer 06850e0e1e refactor(system): removed esp_system from astyle ignore list and reformated it 2024-01-30 15:17:15 +08:00
Darian Leung f50d83413e refactor(tools): Tidy up core component files copyright ignore
Some files that should have their copyrights checked are still placed on the
copyright ignore list.

- These entries have been tidied up
- Copyrights of those files have been updated.
2024-01-22 18:07:35 +08:00
Omar Chebib 5cdf145f55 refactor(riscv): refactor crosscore interrupt 2024-01-18 16:27:36 +08:00
Marius Vikhammer 9f1d001849 Merge branch 'feat/cache_error_c6_h2' into 'master'
fix(panic): fixed cache error being reported as illegal instruction

Closes IDF-6398, IDF-5657, IDF-7015, and IDF-6733

See merge request espressif/esp-idf!27430
2023-12-21 10:32:06 +08:00
Marius Vikhammer 9a6de4cb3e fix(panic): fixed cache error being reported as illegal instruction
On riscv chips accessing cache mapped memory regions over the ibus would
result in an illegal instructions exception triggering faster than the cache
error interrupt/exception.

Added a cache error check in the panic handler, if any cache errors are active
the panic handler will now report a cache error, even if the trigger exception
was a illegal instructions.
2023-12-04 10:49:00 +08:00
Ivan Grokhotkov 75c92c3a66 refactor(startup): implement registration of core init functions
Similar to how the secondary init functions were already registered
via ESP_SYSTEM_INIT_FN, do the same for the core init functions.
This MR doesn't actually move the init functions into respective
components yet. This has to be carefully done in follow-up MRs.
2023-11-27 10:20:51 +01:00
KonstantinKondrashov 7a878bdc50 feat(esp_system): Support IPC_ISR for ESP32P4 2023-09-15 23:38:12 +08:00
wuzhenghui 6fea0260a3 fix(esp_system): suppress compiler warning if ESP_SYSTEM_PANIC_SILENT_REBOOT is enabled 2023-09-12 16:30:42 +08:00
Erhan Kurubas 4714521b21 feat(coredump): add panic details to the elf file 2023-08-24 10:20:56 +02:00
Armando a336b94527 feat(esp_system): base support on p4 2023-07-25 05:59:10 +00:00
Martin Vychodil 65bc1ed055 System: remove digital-system reset within OS restart when Memprot on 2023-06-26 20:22:59 +02:00
Zim Kalinowski dc7ff8676c Merge branch 'feature/libunwind_backtracing' into 'master'
System: implement libunwind library for RISC-V backtracing

Closes IDFGH-6189

See merge request espressif/esp-idf!18147
2023-05-16 14:19:16 +08:00
Omar Chebib eeaa40f71d System: implement libunwind library for RISC-V backtracing
Closes https://github.com/espressif/esp-idf/issues/7866

A minimal x86 implementation has also been added, it is used to perform a host test.
2023-05-15 11:19:03 +08:00
Jakob Hasse c8791f30c0 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-11 16:07:45 +08:00
morris 083d9e7c0f mcpwm: reset peripheral in restart, panic and halt
mcpwm is commonly used in power eletronic area, when restart happens,
make sure the mcpwm generator is not working.

closes https://github.com/espressif/esp-idf/issues/11324
2023-05-06 15:58:58 +08:00
laokaiyao bf2a7b2df6 esp32h4: removed esp32h4 related codes 2023-04-23 12:03:07 +00:00
Ivan Grokhotkov 9924d9f271 esp_system: usb_console support for ESP32-S3
Closes https://github.com/espressif/esp-idf/issues/8879
Closes https://github.com/espressif/esp-idf/issues/8738
2023-04-12 11:17:41 +02:00
Marius Vikhammer 5d26a0de9a wdt: add support for H2 2023-02-23 11:22:51 +08:00
Armando a49d074cbb esp_system: include FreeRTOS.h explicitly in critical_section.h
Prior to this commit, if only critical_section.h is included, there
might be error about portNUM_PROCESSORS undeclared.

As critical_section.h should be OS-agnostic, added FreeRTOS.h in it
2023-02-16 15:12:13 +08:00
Marius Vikhammer 5e9e8c396f wdt: add support for WDTs on C6 2023-01-19 12:58:26 +08:00
Cao Sen Miao 8cc9260f86 ESP32H2: Add system support for ESP32H2 2022-12-07 11:38:51 +08:00
Jakob Hasse fd04374aa5 feat (driver) added new critical section API to UART driver 2022-11-25 18:11:35 +01:00
laokaiyao 8677216576 esp32h2: renaming esp32h2 to esp32h4 2022-11-08 17:05:33 +08:00
Song Ruo Jing 1eb9a24a48 esp_system: Minor update for esp32c6 2022-09-26 20:32:13 +08:00
Omar Chebib 6798bfc4b0 TWDT: the Kconfig option ESP_TASK_WDT_EN is now used to enable Task Watchdog 2022-09-15 14:37:59 +08:00
Omar Chebib 30d12af191 TWDT: refactor the TWDT to be driver agnostic
This refactoring brings a private API for the TWDT implementation, which
can now use a hardware timer (Timer Group) or a software timer (esp_timer)
2022-09-15 14:37:59 +08:00
Omar Chebib 53c7dd4efc WDT: implement interrupt wdt and task wdt for ESP32-C2
ESP32-C2 has a single group timer, thus it will use it for the interrupt watchdog,
which is more critical than the task watchdog. The latter is implement in
software thanks to the `esp_timer`component.
2022-09-15 14:37:59 +08:00
wuzhenghui ab09c07fdd esp32c6: add esp_system support 2022-09-06 09:13:20 +00:00
Jakob Hasse 3f95fdcb15 feat (esp_system): simple os abstraction layer for critical sections 2022-08-17 10:04:35 +02:00
Omar Chebib e25cda2c40 Task WDT: Interuptee task stack is now used for backtracing, regardless of the CPU core
For RISC-V and Xtensa targets, in case a panic needs to happen when
Task WDT is triggered (ESP_TASK_WDT_PANIC), the interruptee's stack
is now used for printing the backtrace.
Abort after Task Watchdog is triggered can happen on APP CPU (second core).
2022-08-02 12:41:14 +08:00
Ivan Grokhotkov bf10146a15 esp_system, vfs: fix incomplete blocking reads in vfs_cdcacm
Blocking read from cdcacm VFS could return less bytes than requested.
This didn’t match the behaviour of other VFS drivers, and higher level
code could misbehave.
2022-07-28 17:28:08 +02: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