Commit Graph

584 Commits

Author SHA1 Message Date
Darian
3b57f6d40c Merge branch 'bugfix/task_wdt_freertos_smp_unicore_build' into 'master'
esp_system: FIx TWDT SMP FreeRTOS unicore build error

See merge request espressif/esp-idf!18241
2022-05-26 09:20:33 +08:00
Song Ruo Jing
cf32e49aeb Merge branch 'refactor/cleanup_rtc_h' into 'master'
clk_tree: Prework2 of introducing clock subsystem control

Closes IDF-4934

See merge request espressif/esp-idf!17861
2022-05-26 09:16:47 +08:00
Darian Leung
8af172ec46 esp_system: FIx TWDT SMP FreeRTOS unicore build error
When configNUM_CORES = 1, vTaskCoreAffinityGet() is not defined. This
commit fixes the TWDT to omit calls to vTaskCoreAffinityGet() when building
for unicore.
2022-05-25 13:51:17 +08:00
Sachin Parekh
9a763f4ff2 esp32c2: Enable IRAM/DRAM split using PMP 2022-05-24 21:36:06 +05:30
songruojing
a5b09cf015 rtc_clk: Clean up some clock related enum and macro in soc/rtc.h, replace with new ones in
soc/clk_tree_defs.h
2022-05-24 22:59:41 +08:00
Marius Vikhammer
0687daf2c8 kconfig: move remaining kconfig options out of target component
The kconfig options are moved to the component where they are used,
mostly esp_hw_support and esp_system.
2022-05-23 17:57:45 +08:00
Armando
8532d09259 cache: access error & illegal error ll functions 2022-05-23 15:00:47 +08:00
Darian Leung
bd8b03888c esp_system: Tidy up INT WDT
This commit tidys the INT WDT code formatting, comments, and API descriptions.
2022-05-18 20:12:25 +08:00
Darian Leung
7dc6fd9ff6 esp_system: Make interrupt WDT private API
This commit makes the interrupt WDT API private. To use the API,
IDF components should now '#include "esp_private/esp_int_wdt.h"'
2022-05-18 20:12:25 +08:00
Darian
4d751b9d6b Merge branch 'feature/task_watchdog_freeertos_smp' into 'master'
esp_system: Add task watchdog user feature and fix SMP FreeRTOS idle task watchdog

Closes IDF-3340

See merge request espressif/esp-idf!17768
2022-05-17 15:13:43 +08:00
Michael (XIAO Xufeng)
b920676e59 pm: add test for RTC using 8MD256 as clock source 2022-05-14 22:35:41 +08:00
Darian Leung
7c02bde904 esp_system: Update task watchdog unit tests and example
This commit does the following:

- Update existing unit tests that use the TWDT to call the new
  esp_task_wdt_init() API
- Add a set of dedicate TWDT unit tests
- Updates the TWDT example
2022-05-13 18:01:28 +08:00
Darian Leung
5953bca376 esp_system: Add arbitrary user feature to TWDT
This commit moidifies the TWDT as follows:

- Adds a feature to allows subscribing arbitrary users to the TWDT
- Changes esp_task_wdt_init() API to accept configuration structure
- Changes esp_task_wdt_init() and esp_task_wdt_deinit() to subscribe/unsubscribe
  idle tasks of various cores.
- Adds support for SMP FreeRTOS idle tasks
- Updates startup code TWDT initialization
- Updates API documentation
2022-05-13 18:01:28 +08:00
Darian Leung
4877a9fcba esp_system: Refactor task_wdt
This commit refactors the task watchdog as follows:

- Renamed variables, types, and functions
- Replaced manual linked list implementation with SLIST()
- Moved calloc()/free() calls out of critical sections
- Shortened ISR critical sections
- Updated API description
- Updated code formatting
2022-05-13 17:57:44 +08:00
morris
24f5fecef0 hal: use ROM implementation for systimer and wdt on esp32c2 2022-05-12 05:18:57 +00:00
morris
334126315f esp32c2: level up from preview targets 2022-05-12 05:18:57 +00:00
morris
523c51818c Merge branch 'feature/c2_soc_hwsupport_code' into 'master'
ESP32-C2 (729) RTC update (Clock, PM)

Closes IDF-3833 and IDF-4874

See merge request espressif/esp-idf!17311
2022-05-11 11:23:57 +08:00
zlq
6336f8191e C2 rtc code 2022-05-09 17:50:54 +08:00
morris
722fde218d uart: add default source clock for all targets 2022-05-09 11:26:30 +08:00
wuzhenghui
ba76b10d3f esp32c2: fix ut case header imssing 2022-05-05 17:41:11 +08:00
wuzhenghui
b530632f33 esp32c2: fix soc_caps defines 2022-05-05 17:41:11 +08:00
morris
595df1d3fa Merge branch 'refactor/move_rtc_ctrl_to_esp_hw_support' into 'master'
hw_support: move rtc_ctrl from driver to hw_support

See merge request espressif/esp-idf!17963
2022-05-05 11:57:31 +08:00
Ivan Grokhotkov
81f2a94f9a
esp_system: make dependencies on vfs and esp_wifi optional 2022-05-02 20:47:17 +02:00
morris
9ab4abfb46 hw_support: move rtc_ctrl from driver to hw_support 2022-04-29 14:28:09 +08:00
Simon
e4d85807ea Merge branch 'feature/spi_flash_esp8684_support' into 'master'
spi_flash: refactor spi_flash clock configuration logic and support esp32c2

Closes IDF-4474, IDF-4025, and IDF-4066

See merge request espressif/esp-idf!16602
2022-04-27 11:05:45 +08:00
Cao Sen Miao
4418a855ba spi_flash: refactor the spi_flash clock configuration, and add support for esp32c2 2022-04-26 15:22:37 +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
Marius Vikhammer
45c1d1cba2 Merge branch 'feature/move_target_kconfig_2' into 'master'
system: move kconfig options out of target component

See merge request espressif/esp-idf!17321
2022-04-24 13:29:43 +08:00
Marius Vikhammer
d2872095f9 soc: moved kconfig options out of the target component.
Moved the following kconfig options out of the target component:
 * CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system
 * ESP*_REV_MIN -> esp_hw_support
 * ESP*_TIME_SYSCALL -> newlib
 * ESP*_RTC_* -> esp_hw_support

Where applicable these target specific konfig names were merged into
a single common config, e.g;
CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
2022-04-21 12:09:43 +08:00
Armando (Dou Yiwen)
5bb59b00e7 Merge branch 'feature/support_bss_on_psram' into 'master'
psram: support .bss on psram on esp32s3

Closes IDF-4814, IDF-4396, IDFGH-7148, and IDFGH-7153

See merge request espressif/esp-idf!17557
2022-04-20 11:16:28 +08:00
Armando
b5de3ec953 esp_common: rename EXT_RAM_ATTR to EXT_RAM_BSS_ATTR to make it clearer
EXT_RAM_ATTR is deprecated. To put .bss on PSRAM, use this new macro EXT_RAM_BSS_ATTR
2022-04-19 19:48:00 +08:00
Armando
f8249550f8 psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00
Roland Dobai
667edfa7a9 Merge branch 'bugfix/s3_otg_compressed_flash_with_stub' into 'master'
esptool_py: Support ESP32-S3 USB OTG compressed flashing with stub

Closes ESPTOOL-372

See merge request espressif/esp-idf!17559
2022-04-14 18:26:18 +08:00
morris
cb5507f11c Merge branch 'feature/clk_tree_defs' into 'master'
clk_tree: prework of introducing clock subsystem control

Closes IDF-4892

See merge request espressif/esp-idf!17631
2022-04-13 10:36:56 +08:00
Roland Dobai
3b161a40d6 esptool_py: Update to support ESP32-S3 USB OTG compressed flashing with stub 2022-04-12 08:53:12 +00:00
songruo
60bb5c913d clk_tree: prework of introducing clk subsystem control
1. Clean up clk usage in IDF, replace rtc_clk_xtal/apb_freq_get with
   upper level API esp_clk_xtal/apb_freq
2. Fix small errors and wrong comments related to clock
3. Add clk_tree_defs.h to provide an unified clock id for each chip
   Modify the NGed drivers to adopt new clock ids
2022-04-11 12:09:06 +08:00
morris
483149e41b global: fix some potential out-of-bounds issue
...that found by Coverity Scan
2022-04-08 11:05:43 +08:00
Konstantin Kondrashov
a7578a68c0 Merge branch 'bugfix/ipc_blocking' into 'master'
esp_ipc: Fix a case when ipc_task() can wake up blocking task early

Closes IDFGH-6939

See merge request espressif/esp-idf!17508
2022-03-31 13:28:39 +08:00
morris
29e9b5b46a hw_support: move periph_ctrl from driver to hw_support 2022-03-29 11:53:31 +08:00
KonstantinKondrashov
915168c36d esp_ipc: Fix a case when ipc_task() can wake up blocking task early
Closes https://github.com/espressif/esp-idf/issues/8559
2022-03-25 21:15:40 +08:00
Ivan Grokhotkov
c70a69b1dd Merge branch 'bugfix/remove_ref_non_ex_options' into 'master'
config: removed references to non-existing kconfig options

See merge request espressif/esp-idf!17495
2022-03-25 18:02:54 +08:00
Marius Vikhammer
5618ba80f9 Merge branch 'feature/refactor_esp_sys_deps' into 'master'
esp-system: removed esp_phy and nvs dependencies, change app update and pm to weak dependencies

Closes IDF-4656

See merge request espressif/esp-idf!17092
2022-03-25 17:17:43 +08: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
Marius Vikhammer
9274a062fb esp-system: removed esp_phy and nvs dependencies, change app update and pm to weak dependencies 2022-03-22 11:19:32 +08:00
Ivan Grokhotkov
2f9d47c708 Merge branch 'feature/gdbstub_rt_multicore' into 'master'
Extension for GDBstub runtime component (multicore, breakpoints, steps etc...)

See merge request espressif/esp-idf!13896
2022-03-17 19:59:29 +08:00
Marius Vikhammer
453516fbbe Merge branch 'bugfix/replace_deprecated_options' into 'master'
kconfig: replace deprecated options with new values

See merge request espressif/esp-idf!17494
2022-03-16 09:32:55 +08:00
Marius Vikhammer
0fbae992dd config: removed references to non-existing kconfig options 2022-03-15 18:32:22 +08:00
Marius Vikhammer
ca3c056ac9 kconfig: replace deprecated options with new values 2022-03-15 16:28:53 +08:00
Anton Maklakov
0d86151b82 esp_system: fix ubsan builtins' prototypes to suppress Wbuiltin-declaration-mismatch 2022-03-14 09:31:00 +00:00
Armando (Dou Yiwen)
6ed3ffbbf1 Merge branch 'refactor/remove_redundant_rom_cache_dependency' into 'master'
cache: remove redundant rom cache dependency in bootloader

Closes IDF-4523

See merge request espressif/esp-idf!17077
2022-03-12 10:11:39 +08:00
Armando
c1cbd7bbf6 cache/mmu: implememnt cache and mmu hal APIs in bootloader 2022-03-11 22:43:11 +08:00
Laukik Hase
3b3b668256 ci: Disable failing UTs
- For ESP32 | SPIRAM_MALLOC_ALWAYSINTERNAL=0
2022-03-10 05:01:17 +00:00
Laukik Hase
6f9fc0ba8e esp_system: Place ipc_task semaphores on DRAM
- For CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL < 92, the ipc_task semaphores
  were allocated on SPIRAM rather than internal RAM
- SemaphoreHandle_t has a size of 92, thus the failure
2022-03-10 05:01:17 +00:00
Marius Vikhammer
934a3951b8 Merge branch 'feature/s2_s3_support_ext_mem_stack' into 'master'
soc: support placing task stacks in external memory for S2 and S3

Closes IDF-2797 and IDF-1805

See merge request espressif/esp-idf!16186
2022-03-09 11:57:31 +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
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
Marius Vikhammer
e543e97c7b system: fix SET_STACK macro crashing in windowoverflow8 exception
If a windowoverflow8 happened after changing the SP, the exception handler would look for
the extra save area by looking at the previous frame's SP. This SP would be a garbage value
and could cause the windowoverflow exception to write to invalid memory ares.
2022-03-04 15:25:52 +08:00
Marius Vikhammer
29db173536 Merge branch 'feature/move_target_kconfig' into 'master'
system: move kconfig options out of target component

See merge request espressif/esp-idf!16893
2022-03-03 09:39:54 +08:00
Omar Chebib
2571aaf3c9 G0: target component (components/esp32*) doesn't depend on driver anymore 2022-03-02 04:21:00 +00:00
Marius Vikhammer
bb88338118 system: move kconfig options out of target component
Moved the following kconfig options out of the target component:
 * ESP32_X_BROWNOUT_* -> esp_system
 * ESP32_X_DEBUG_OCDAWARE -> esp_system
 * APP_NO_BLOBS -> build type (main kconfig)
2022-03-02 01:22:26 +00:00
Dmitry
a8c3fe56c8 This commit add to GDBstup:
1. Multicore suupor
2. Stepping
3. Console output
4. Update example + readme
5. Jumps
2022-03-01 19:49:24 +03:00
Mahavir Jain
15ab3466fa Merge branch 'contrib/github_pr_8467' into 'master'
Fix typos. (GitHub PR)

Closes IDFGH-6843

See merge request espressif/esp-idf!17289
2022-02-28 16:50:33 +08:00
Mahavir Jain
47fb454baa esp_system: Fix copyright header 2022-02-28 11:41:02 +05:30
Konstantin Kondrashov
44e5ac2c59 Merge branch 'feature/efuse_hal' into 'master'
hal: Adds efuse hal layer

See merge request espressif/esp-idf!16354
2022-02-28 13:38:43 +08:00
Eva Dengler
9fd621c7ad Fix typos.
alignement -> alignment
2022-02-25 19:32:15 +01:00
KonstantinKondrashov
9605f3eb1a soc: Adds efuse hal
Replaced eFuse ROM funcs with hal layer
2022-02-24 22:20:09 +08:00
Alexey Gerenkov
dea45a9d72 riscv: Use semihosting to set breakpoint and watchpoint when running under debugger 2022-02-24 08:55:40 +00:00
Martin Vychodil
0e52b9d230 System: Memory section .rtc.dummy removed
ESP32H2 doesn't support access to RTC memory through various buses, thus .rtc.dummy section
makes no sense here. The section is used for blind padding in LD script - to provide proper section offsets)
2022-02-22 13:52:46 +01:00
Song Ruo Jing
da3b7f106b Merge branch 'feature/support_esp32c2_reset_cause' into 'master'
esp_system: support esp32c2 reset reason

Closes IDF-3832 and IDF-4244

See merge request espressif/esp-idf!17158
2022-02-22 03:12:44 +00:00
songruojing
b860fa96e0 esp_system: support esp32c2 reset reason 2022-02-15 13:50:22 +08:00
Marius Vikhammer
edb76f14d6 esp_timer: remove legacy ESP32 FRC timer implementation. 2022-02-10 15:17:49 +08:00
Darian
61639fe1ec Merge branch 'refactor/freertos_remove_legacy_types' into 'master'
FreeRTOS: Remove usage of legacy data types

Closes IDF-4566

See merge request espressif/esp-idf!16680
2022-02-10 04:57:00 +00:00
Song Ruo Jing
40d1102ca5 Merge branch 'bugfix/cpu_reset_perip_clk_disable' into 'master'
esp_system: change range comparsion for reset reason to specifc cpu reset reason comparison

See merge request espressif/esp-idf!15492
2022-02-10 03:44:15 +00: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
songruojing
c1dedb33fa esp_system: replace the range comparsion for reset reason in perip clk init with specific reset reason check, also add a test case in LEDC to check for the perip clk not being disabled after cpu reset 2022-02-09 15:54:34 +08:00
morris
ef00bd59dc esp_rom: extract int matrix route and cpu ticks getter 2022-02-09 13:52:20 +08:00
Marius Vikhammer
0ffeaf9350 Merge branch 'feature/confgen_rename_many_to_one' into 'master'
kconfig: update confgen to handle sdkconfig.rename with target specific markup

Closes IDF-4544

See merge request espressif/esp-idf!16949
2022-02-08 02:38:22 +00:00
Darian Leung
3336b057d6 xtensa: Move saving of a0 register to match upstream
Upstream xtensa exception handling will save PS, PC, and a0 registers
together when saving a minimal context. This commit ppdates the xtensa
exception handling to match upstream behavior.
2022-02-03 17:08:14 +08:00
Marius Vikhammer
23c55946a6 kconfig: also parse target specific sdkconfig.rename.TARGET files
Adds functionality for target specific sdkconfig.rename files which can be
used when certain renames are only needed for a specific target.
2022-01-31 11:36:08 +08:00
Sudeep Mohanty
2fc9bd61bf ulp: refactor ulp component
This commit refactors the ulp component.
Files are now divided based on type of ulp, viz., fsm or risc-v.
Files common to both are maintained in the ulp_common folder.

This commit also adds menuconfig options for ULP within the ulp
component instead of presenting target specific configuations for ulp.
2022-01-27 11:54:42 +05:30
laokaiyao
cf049e15ed esp8684: rename target to esp32c2 2022-01-19 11:08:57 +08:00
Zim Kalinowski
d0890037c5 Merge branch 'feature/esp_ipc_isr_init_in_ipc_task' into 'master'
esp_system: ipc_isr does not use its own initialization task, it is done from ipc_task()

See merge request espressif/esp-idf!16495
2022-01-18 00:54:37 +00:00
Ivan Grokhotkov
876f4d6a1c vfs: add support for semihosting on ESP32-C3 2022-01-14 17:29:03 +01:00
KonstantinKondrashov
f49787ac9f esp_system: ipc_isr does not use its own initialization task, it is done from ipc_task()
It helps to reduce the memory usage at startup.

Closes https://github.com/espressif/esp-idf/issues/8111
2022-01-13 21:28:08 +08:00
Armando
7240ad2b3a psram: refactor spiram.c on esp32s2 2022-01-13 11:07:57 +08:00
Omar Chebib
b0afae5e60 espcoredump: fix a bug where tracked DRAM data where not dumped
Variables marked as COREDUMP_DRAM_ATTR will now be part of the core dump.

* Closes https://github.com/espressif/esp-idf/issues/8151
2022-01-06 16:53:35 +08:00
Cao Sen Miao
3a4db97cec spi_flash: move patch files to common rom patch folder 2021-12-30 14:05:12 +08:00
Cao Sen Miao
3dd1cfea18 spi_flash: refactor spi_flash.h to decline duplicated code 2021-12-30 14:05:12 +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
morris
0afafb743d Merge branch 'bugfix/app_compatible_with_3_1_bootloader' into 'master'
esp_system: Fix RTC_WDT protection in esp_restart_noos

See merge request espressif/esp-idf!16480
2021-12-24 03:43:52 +00:00
Martin Vychodil
16891e7a6c System: fix RTCFAST section alignment
This bugfix contains 3 fixes:
1. .rtc_dummy section is removed (not needed for C3)
2. .rtc_text section is padded with 16B for possible CPU prefetch
3. .rtc_text section is aligned to 4B boundary to comply with PMS Memprot requirements
2021-12-23 19:58:39 +08:00
KonstantinKondrashov
ff96769b0e esp_system: Fix RTC_WDT protection in esp_restart_noos
Fixed issue - v4.3 app not compatible with 3.1 bootloader
2021-12-21 14:48:14 +08:00
Martin Vychodil
dd938eb952 System/Security: Memprot API unified (ESP32C3)
Unified Memory protection API for all PMS-aware chips (ESP32C3)

Closes JIRA IDF-3849
2021-12-21 01:50:36 +01:00
Ivan Grokhotkov
5b3b5f006f Merge branch 'feature/cmake_weak_deps_helper' into 'master'
cmake: add idf_component_optional_requires utility function, simplify some component dependencies

Closes IDF-3086

See merge request espressif/esp-idf!16373
2021-12-16 13:46:45 +00:00
Cao Sen Miao
e3d14858c7 rtc_clk: change clock source from xtal to pll on real board(ESP8684) 2021-12-15 12:21:11 +08:00
Ivan Grokhotkov
8df306ab60 freertos,esp_system: make dependencies on some components optional
Dependencies on gdbstub, espcoredump, app_trace will only be added
if these components are present in the build.
2021-12-13 18:39:49 +01:00
Cao Sen Miao
e81841318f CI: Enable ESP8684 build stage CI on master 2021-12-13 19:18:47 +08:00
Cao Sen Miao
7f0a746e6a move brownout trax cache_int_err to private folder 2021-11-26 18:27:53 +08:00
Cao Sen Miao
c794808297 cache_err_int: delete old headers 2021-11-26 14:56:30 +08:00
Cao Sen Miao
eddc196081 esp_clk: refactor target/clk.h to private/esp_clk.h 2021-11-26 14:56:30 +08:00