Commit Graph

744 Commits

Author SHA1 Message Date
Armando (Dou Yiwen)
5e8db9669d Merge branch 'refactor/move_soc_memory_types_helper_functions_to_esp_hw_support' into 'master'
hw_support: move soc_memory_types.h helper functions into esp_hw_support (G1)

Closes IDF-4858

See merge request espressif/esp-idf!17657
2022-04-10 19:10:33 +08:00
Darian
59202fe43e Merge branch 'bugfix/freertos_smp_cmakelist' into 'master'
freertos: Fix CMakeLists.txt to include esp_additions/private_include

See merge request espressif/esp-idf!17715
2022-04-08 21:35:44 +08:00
Darian Leung
7ea0106b3f freertos: Fix CMakeLists.txt to include esp_additions/private_include 2022-04-08 17:23:52 +08:00
Armando
c4bcf1117c esp_hw_support: move soc_memory_types.h helper functions into esp_hw_support 2022-04-08 11:46:10 +08:00
Sudeep Mohanty
f2d355992b Merge branch 'refactor/remove-portmacro-deprecated-apis' into 'master'
freertos: remove portmacro_deprtecated.h file

Closes IDF-4746

See merge request espressif/esp-idf!17661
2022-04-07 14:36:25 +08:00
Darian
7554194bf1 Merge branch 'feature/freertos_smp_port_idle_hooks' into 'master'
freertos: Update idle hooks for SMP

Closes IDF-3337

See merge request espressif/esp-idf!17407
2022-04-06 08:24:04 +08:00
Sudeep Mohanty
129e613f15 freertos: remove portmacro_deprtecated.h file
This commit removes the portmacro_deprecated.h file and the deprecated
APIs contained in it. Alternate APIs to use are noted in the migration
guide.
2022-04-05 04:38:35 +00:00
Darian Leung
e6d43ab56f freertos: Update SMP idle hooks
This commit updates the usage of idle hooks in SMP FreeRTOS as follows:

- IDF style idle hooks are now called from vApplicationMinimalIdleHook()
- If the user provdies their own vApplicationMinimalIdleHook(), it can be
  wrapped using -Wl,--wrap if CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK is
  enabled.
- SMP port no longer uses vApplicationIdleHook() as it's only called from
  the prvIdleTask() and not every prvMinimalIdleTask()
2022-04-01 22:08:45 +08:00
Darian Leung
8c88c6f68f freertos: Update task snapshot unit tests
This commit updates the task snapshot unit tests as follows:

- Both uxTaskGetSnapshotAll() and vTaskGetSnapshot() are now both tested
- Test cases are now dependent on CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
2022-04-01 22:01:16 +08:00
Darian Leung
80f0c64c2a freertos: Update task snapshot
This commit updates task snapshot as follows:

- Refactored implementation to increase readability
- Implementation moved into freertos_tasks_c_additions.h
- freertos_tasks_c_additions.h made a private header
- Support SMP FreeRTOS
- Removed configENABLE_TASK_SNAPSHOT option. CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
  is direclty used instead.
2022-04-01 22:01:16 +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
morris
b40f05ddda Merge branch 'bugfix/freertos_smp_type_warning' into 'master'
freertos: Fix SMP build warning in xTaskCreateStaticPinnedToCore

See merge request espressif/esp-idf!17548
2022-03-23 16:19:03 +08:00
Darian Leung
63d15957d2 freertos: Fix SMP build warning in xTaskCreateStaticPinnedToCore 2022-03-22 23:51: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
Darian Leung
199df492b7 freertos: Update task creation pinned to core functions
This commit updates the "xTaskCreate...PinnedToCore()" functions to
call the "xTaskCreate...AffinitySet()" equivalent functions.
2022-03-21 11:37:21 +08:00
Darian Leung
6a38499172 freertos: Add task creation with affinity functions to FreeRTOS SMP
This commit syncs adds task creation with affinity functions to
FreeRTOS SMP by syncing with upstrea commit
a97741a08d
2022-03-21 11:09:24 +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
0fbae992dd config: removed references to non-existing kconfig options 2022-03-15 18:32:22 +08:00
Erhan Kurubas
c5f5c84f67 freertos_additions: add debug params table for openocd 2022-03-11 11:33:08 +01:00
Darian Leung
94c2467dd6 esp_common: Rename esp_macro.h to esp_macros.h 2022-03-10 21:22:35 +08:00
Vladimir Chistyakov
216703c0ef esp_macro: Fix CHOOSE_MACRO_VA_ARG() for C++20
Closes https://github.com/espressif/esp-idf/pull/8372
Closes https://github.com/espressif/esp-idf/issues/8371

[darian@espressif.com: Updated macro description and commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2022-03-08 20:21:26 +08:00
Darian Leung
c2f2b1e228 freertos: Add SMP FreeRTOS porting notes
This commit adds some notes about the SMP FreeRTOS port
2022-03-08 14:59:18 +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
Darian Leung
883da858b0 freertos: Fix various build errors
This commit fixes various build errors in IDF (and tests) when compiling
with SMP FreeRTOS:

- Updated usage of xTaskGetIdleTaskHandle()
- Disable sysview tracing macros
- Update some task snapshot functions
- Disabled test_freertos_hooks.c test as vApplicationIdleHook() and
  vApplicationTickHook() are used.
2022-03-08 14:59:18 +08:00
Darian Leung
9da5d7c40a freertos: Add changes to FreeRTOS SMP sources
This commit adds the necessary changes to the FreeRTOS SMP source and
and header files so that it can be compatible with ESP-IDF.
2022-03-08 14:59:18 +08:00
Darian Leung
37c270b337 freertos: Update Xtensa port files to support FreeRTOS SMP
This commit updates the copied Xtensa port to support the new porting interfaces
of the FreeRTOS SMP kernel. These modifications are mainly contained in

- FreeRTOSConfig.h
- FreeRTOSConfig_smp.h
- portmacro.h
- port.c

Some porting interfaces have changed in FreeRTOS SMP. In order to allow building
with IDF, compatibility interfaces have been added.
2022-03-08 14:59:18 +08:00
Darian Leung
163ddc3818 freertos: Update components CMakeLists.txt and Add SMP Kconfig option
This commit does the following:

- Add a Kconfig option to select between the IDF FreeRTOS kernel and the
  FreeRTOS SMP kernel.
- Updates the freertos component's CMakeLists.txt so that FreeRTOS SMP
  files are now built based the the new configuration option.

This commit WILL NOT compile. The port files for FreeRTOS SMP still need to
be updated.
2022-03-08 14:59:18 +08:00
Darian Leung
89dd2fe7f5 freertos: Copy IDF xtensa port files
This commit copies over ESP-IDF Xtensa portable files to the
FreeRTOS-Kernel-SMP directory. No changes were made, this commit
only copies the portable source files.

Notes:
- This commit WILL NOT compile
- Some SPDX header dates were updated to pass pre-commit check
2022-03-08 14:59:18 +08:00
Darian Leung
2d1afaf35b freertos: Add FreeRTOS SMP upstream files
This commit copies over the sources files from
https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/smp based on the
commit 4832377117b4198db43009f2b548497d9cdbf8da

The FreeRTOS SMP sources are added to components/freertos/FreeRTOS-Kernel-SMP

Notes:
- This commit WILL NOT compile correctly. It simply copies over sources files
- copyright_ignore.txt entries added so that we can avoid using SPDX headers
- Portable files are not added yet
2022-03-08 14:58:57 +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
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
Alexey Gerenkov
dea45a9d72 riscv: Use semihosting to set breakpoint and watchpoint when running under debugger 2022-02-24 08:55:40 +00:00
Alexey Gerenkov
088e940528 riscv: Fixes GDB backtrace end function to point to prvTaskExitError 2022-02-24 08:55:40 +00:00
Marius Vikhammer
06d8a5bf33 Merge branch 'bugfix/inline_intrmask_from_isr' into 'master'
freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR

Closes IDFGH-6669

See merge request espressif/esp-idf!16970
2022-02-23 01:05:40 +00:00
Darian Leung
5f5daaa420 freertos: Remove legacy hooks
This commit refactors the legacy hooks as follows:

- Removed CONFIG_FREERTOS_LEGACY_HOOKS
- FreeRTOS hooks are now enabled via:
    - CONFIG_FREERTOS_USE_IDLE_HOOK
    - CONFIG_FREERTOS_USE_TICK_HOOK
- Update IDF hooks documentation
2022-02-18 19:56:35 +08:00
Jakob Hasse
d5e1362e14 bugfix (freertos): added stdint.h to linux portmacro header 2022-02-16 16:51:22 +08:00
Darian Leung
2cebfcf885 freertos: Refactor configuration files
This commit refactors the FreeRTOS configuration headers as follows:

- Layout is now similar to FreeRTOSConfig.h found in other upstream demos
- Separate out Vanilla FreeRTOS configurations and ESP-IDF additions
- Move/remove some irrelevant/unused macros and configurations
2022-02-10 21:23:46 +08: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
morris
ef00bd59dc esp_rom: extract int matrix route and cpu ticks getter 2022-02-09 13:52:20 +08:00
Darian
a00117cb7f Merge branch 'refactor/freertos_macro_selection' into 'master'
freertos: Add CHOOSE_MACRO_VA_ARG selector

See merge request espressif/esp-idf!16904
2022-02-08 06:48:14 +00:00
Darian Leung
c5fd79547a freertos: Add CHOOSE_MACRO_VA_ARG selector
This commit adds a CHOOSE_MACRO_VA_ARG() selector to allow selection between two
versions of a macro based on the number of arguments. This replaces the previous
portGET_ARGUMENT_COUNT() selector.

- portYIELD_FROM_ISR() now uses CHOOSE_MACRO_VA_ARG()
- portYIELD_FROM_ISR(arg) version added to risc-v port
- Old vPortEvaluateYieldFromISR() and portGET_ARGUMENT_COUNT removed
2022-02-07 20:01:11 +08:00
Marius Vikhammer
0fc8ede204 freertos: add pm_trace header include 2022-02-07 17:44:33 +08:00
Marius Vikhammer
8220b2bb34 freertos: always inline xPortSetInterruptMaskFromISR and vPortClearInterruptMaskFromISR
These were called from IRAM context where the caller expect them to be inlined
and accessible when cache is disabled. This was not the case when compiled with -O0.

Closes https://github.com/espressif/esp-idf/issues/8301
2022-02-07 11:32:45 +08:00
Darian Leung
1c60d6a895 freertos: Add SPDX license identifiers and update xtensa port files
This commit does the following:

- Adds SPDX license identifiers to FreeRTOS sources. Remove those FreeRTOS sources from
  the copyright ignore list.
- Update xtensa port files to match FreeRTOS v10.4.3. Added SPDX license identifiers
  to the port files.
- Fixed some improperly licensed files
- Removed portbenchmark.h from RISC-V port
2022-02-03 17:08:14 +08: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
laokaiyao
cf049e15ed esp8684: rename target to esp32c2 2022-01-19 11:08:57 +08:00
morris
705788a13f unit_tests: replace legacy timer group with gptimer 2022-01-07 14:59:09 +08:00
Marius Vikhammer
7255497146 freertos: remove FREERTOS_ASSERT option
Freertos asserts are now configured the same way as all other asserts in IDF,
i.e. by configuring COMPILER_OPTIMIZATION_ASSERTION_LEVEL.
2022-01-07 09:16:48 +08:00
morris
869bed1bb5 soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00