Commit Graph

162 Commits

Author SHA1 Message Date
laokaiyao
8677216576 esp32h2: renaming esp32h2 to esp32h4 2022-11-08 17:05:33 +08:00
Ivan Grokhotkov
7e2f261a58
freertos, app_trace, heap: use esp_cpu_get_cycle_count to get ccount
portGET_RUN_TIME_COUNTER_VALUE should only be used in the kernel.
2022-10-12 11:20:55 +02:00
Darian Leung
77f2eba57e freeRTOS: Synchronize queue functions to v10.4.3
This commit synchronizes multiple functions in queue.c with upstream v10.4.3.
Multi-core modifications are then reapplied to these functions. The following
functions were modified:

prvNotifyQueueSetContainer()
xQueueGenericCreateStatic()
xQueueGenericCreate()
xQueueGetMutexHolder()
xQueueCreateCountingSemaphoreStatic()
xQueueCreateCountingSemaphore()
xQueueGenericSend()
xQueueGenericSendFromISR()
xQueueReceiveFromISR()
uxQueueMessagesWaiting()
prvUnlockQueue()
prvIsQueueFull()
xQueueAddToSet()
xQueueRemoveFromSet()
prvNotifyQueueSetContainer()

Note: The SEGGER_SYSVIEW traceQUEUE_SEND() macro was updated as the
      xCopyPosition argument is no longer available in scenarios where the
      macro is called.
2022-09-19 21:30:32 +08:00
Ivan Grokhotkov
0332b8db07 Revert "Merge branch 'feature/freertos_10.4.3_sync_various_functions' into 'master'"
This reverts merge request !19761
2022-09-12 19:53:09 +08:00
Darian Leung
48e03e4cbd freeRTOS: Synchronize queue functions to v10.4.3
This commit synchronizes multiple functions in queue.c with upstream v10.4.3.
Multi-core modifications are then reapplied to these functions. The following
functions were modified:

prvNotifyQueueSetContainer()
xQueueGenericCreateStatic()
xQueueGenericCreate()
xQueueGetMutexHolder()
xQueueCreateCountingSemaphoreStatic()
xQueueCreateCountingSemaphore()
xQueueGenericSend()
xQueueGenericSendFromISR()
xQueueReceiveFromISR()
uxQueueMessagesWaiting()
prvUnlockQueue()
prvIsQueueFull()
xQueueAddToSet()
xQueueRemoveFromSet()
prvNotifyQueueSetContainer()

Note: The SEGGER_SYSVIEW traceQUEUE_SEND() macro was updated as the
      xCopyPosition argument is no longer available in scenarios where the
      macro is called.
2022-09-07 23:34:52 +08:00
Alexey Gerenkov
e5085db5f0 sysview: Adds FreeRTOS SMP port 2022-08-25 13:08:19 +03:00
Alexey Gerenkov
030f3b7534 sysview: Fixes IDLE tasks detection via name comparison 2022-08-25 11:23:21 +03:00
Darian Leung
fb960f42b3 freertos: Synchronize vTaskPlaceOnEventList...() functions to v10.4.3
This commit synchronizes the following vTaskPlaceOnEventList...() with
upstream v10.4.3.

The functions updated are:

- vTaskPlaceOnEventList()
- vTaskPlaceOnUnorderedEventList()
- vTaskPlaceOnEventListRestricted()

The traceTASK_DELAY_UNTIL() macro has also been updated.
2022-08-24 16:03:10 +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
Guillaume Souchere
0bac33ed41 esp_system: Remove deprecate section from esp_cpu.h
- Remove esp_cpu_in_ocd_mode() from esp_cpu.h. Users should call esp_cpu_dbgr_is_attached() instead.
- Remove esp_cpu_get_ccount() from esp_cpu.h. Users should call esp_cpu_get_cycle_count() instead.
- Remove esp_cpu_set_ccount() from esp_cpu.h. Users should call esp_cpu_set_cycle_count() instead.
- Other IDF components updated to call esp_cpu_dbgr_is_attached(), esp_cpu_get_cycle_count() and esp_cpu_set_cycle_count() as well.
2022-07-22 00:06:06 +08: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
Ivan Grokhotkov
a334cd50ce
app_trace: perform initialization using ESP_SYSTEM_INIT_FN 2022-07-12 16:58:15 +02:00
Marius Vikhammer
82daa80eac apptrace: move all apptrace related functions to IRAM
Closes: https://github.com/espressif/esp-idf/issues/9131
2022-06-23 16:54:24 +08:00
Konstantin Kondrashov
b824f68b35 Merge branch 'feature/move_dport_workaround_to_g0' into 'master'
dport_access: Move DPORT workaround to G0

Closes IDF-2177

See merge request espressif/esp-idf!17961
2022-06-01 12:11:12 +08:00
KonstantinKondrashov
ac4c7d99fe dport: Move DPORT workaround to G0 2022-05-31 13:44:18 +08:00
Darian Leung
daa950d9ed freertos: Replace portSET_INTERRUPT_MASK_FROM_ISR() call for SMP
The behavior of portSET_INTERRUPT_MASK_FROM_ISR() has changed in SMP FreeRTOS. It's
previous behavior is now implemented in portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS().

This commit replaces all portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR()
calls with portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS() respectively
2022-05-30 06:11:24 +08:00
morris
722fde218d uart: add default source clock for all targets 2022-05-09 11:26:30 +08:00
morris
e7295c3577 gptimer: added enable/disable functions 2022-05-06 18:18:39 +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
morris
f32a89826c clk_tree: added default clock source for peripheral 2022-04-14 15:44:56 +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
Dmitry
1ee7953ebe app_trace: add support for UART to the app trace module.
Add support for UART to the SystemView.
2022-03-23 17:51:14 +03: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
Omar Chebib
2571aaf3c9 G0: target component (components/esp32*) doesn't depend on driver anymore 2022-03-02 04:21:00 +00:00
Alexey Gerenkov
dea45a9d72 riscv: Use semihosting to set breakpoint and watchpoint when running under debugger 2022-02-24 08:55:40 +00:00
Ivan Grokhotkov
d3f1867725 Merge branch 'bugfix/apptrace_copyright_headers' into 'master'
app_trace: add SPDX headers, mention SystemView in copyrights doc

See merge request espressif/esp-idf!17029
2022-02-07 10:38:58 +00:00
Ivan Grokhotkov
4cedf84626
app_trace: add SPDX headers, mention SystemView in copyrights doc
Signed-off-by: Ivan Grokhotkov <ivan@espressif.com>
2022-02-03 17:44:59 +01:00
Erhan Kurubas
88889e2f88 esp32c3: fix portSTACK_GROWTH redefinition error 2022-02-03 14:55:49 +01:00
Ivan Grokhotkov
876f4d6a1c vfs: add support for semihosting on ESP32-C3 2022-01-14 17:29:03 +01:00
morris
1267738149 cmake: using toolchain prefix determined by cmake itself 2022-01-10 10:06:09 +08:00
morris
02f6b83f47 app_trace: support gptimer as timestamp source 2022-01-07 14:59:09 +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
Cao Sen Miao
7f0a746e6a move brownout trax cache_int_err to private folder 2021-11-26 18:27:53 +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
Sudeep Mohanty
722a6b7cf4 docs: update programming guide for esp32s3 chip independent system chapters
This commit updates the chip independent system chapters of the
programming guide for esp32s3.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-11-23 12:48:10 +05:30
Darian Leung
9b3796d2f1 freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions
Add TRY_ENTRY_CRITICAL() API to all for timeouts when entering critical sections.
The following port API were added:
- portTRY_ENTER_CRITICAL()
- portTRY_ENTER_CRITICAL_ISR()
- portTRY_ENTER_CRITICAL_SAFE()

Deprecated legacy spinlock API in favor of spinlock.h. The following API were deprecated:
- vPortCPUInitializeMutex()
- vPortCPUAcquireMutex()
- vPortCPUAcquireMutexTimeout()
- vPortCPUReleaseMutex()

Other Changes:
- Added portMUX_INITIALIZE() to replace vPortCPUInitializeMutex()
- The assembly of the critical section functions ends up being about 50 instructions longer,
  thus the spinlock test pass threshold had to be increased to account for the extra runtime.

Closes https://github.com/espressif/esp-idf/issues/5301
2021-11-22 13:28:39 +08:00
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Omar Chebib
9d5923a13e IPC: Move ipc sources to esp_system
IPC shall be put back into esp_system as it is an 'OS additions'.
2021-11-11 10:30:01 +08:00
Alexey Gerenkov
e4e4bbae5e gcov: Do not use shrunk ROM's fake stdout and stderr FILE struct 2021-11-04 01:33:24 +03:00
Alexey Gerenkov
bb9cd84cdc debug_stubs: Refactor and add support for RISCV 2021-11-04 01:33:24 +03:00
Alexey Gerenkov
e777653222 Merge branch 'feature/esp32s3_apptrace' into 'master'
apptrace/trax: Adds ESP32-S3 support

Closes IDF-1785

See merge request espressif/esp-idf!14857
2021-10-26 09:50:40 +00:00
Alexey Gerenkov
111ba5bbe6 trax: Adds ESP32-S3 support 2021-10-22 23:36:28 +03:00
Alexey Gerenkov
5911eb3f3e apptrace: Adds ESP32-S3 support 2021-10-22 23:24:00 +03:00
Darian Leung
d6f2fa4bab freertos: Remove critical nested macros
This commit removes the following critical nested macros as follows:

- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()

They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.

Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
2021-10-22 13:17:20 +08:00
morris
e2275b1f63 gptimer: clean up hal and ll for driver-ng 2021-10-20 18:40:08 +08:00
Zim Kalinowski
538911e9ee reconcile traces 2021-09-07 15:57:50 +08:00
Erhan Kurubas
2a5d0a041e gcov: add stub table size entry 2021-08-20 15:00:55 +08:00
Erhan Kurubas
ca88b269ed gcov: add gcov callback into the ipc task 2021-08-20 15:00:55 +08:00