Skip to content

Commit 594ce88

Browse files
authored
Merge branch 'espressif:release/v5.5' into release/v5.5
2 parents dcc920f + 02c5f2d commit 594ce88

File tree

1,092 files changed

+80202
-59817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,092 files changed

+80202
-59817
lines changed

.gitlab/ci/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pytest_build_system_macos:
237237
PYENV_VERSION: "3.9"
238238
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
239239
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
240-
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
240+
241241
build_docker:
242242
extends:
243243
- .before_script:minimal

.gitlab/ci/default-build-test-rules.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ extra_default_build_targets:
1414

1515
bypass_check_test_targets:
1616
- esp32h21
17-
- esp32c61
1817
- esp32h4
1918
- esp32c5
2019

.gitlab/ci/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ check_submodule_sync:
1919
dependencies: []
2020
script:
2121
- git submodule deinit --force .
22+
- rm -rf .git/modules # remove all the cached metadata
2223
# setting the default remote URL to the public one, to resolve relative location URLs
2324
- git config remote.origin.url ${PUBLIC_IDF_URL}
2425
# check if all submodules are correctly synced to public repository

.gitlab/ci/host-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ test_cli_installer:
113113
script:
114114
# Tools must be downloaded for testing
115115
# We could use "idf_tools.py download all", but we don't want to install clang because of its huge size
116-
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
116+
# cmake@version that is supported
117+
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake [email protected]
117118
- cd ${IDF_PATH}/tools/test_idf_tools
118119
- python3 -m pip install jsonschema
119120
- python3 ./test_idf_tools.py -v

.gitlab/ci/test-win.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
after_script: []
1919

2020
test_cli_installer_win:
21+
rules:
22+
- when: never
2123
extends:
2224
- .host_test_win_template
2325
- .rules:labels:windows_pytest_build_system
@@ -33,7 +35,8 @@ test_cli_installer_win:
3335
allow_failure: true
3436
script:
3537
# Tools must be downloaded for testing
36-
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
38+
# cmake@version that is supported
39+
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake [email protected]
3740
- cd ${IDF_PATH}\tools\test_idf_tools
3841
- python -m pip install jsonschema
3942
- python .\test_idf_tools.py

components/app_trace/app_trace_membufs_proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
9292
// switch to new block
9393
proto->state.in_block++;
9494

95-
proto->hw->swap(new_block_num);
95+
proto->hw->swap(new_block_num, proto->state.markers[prev_block_num]);
9696

9797
// handle data from host
9898
esp_hostdata_hdr_t *hdr = (esp_hostdata_hdr_t *)proto->blocks[new_block_num].start;

components/app_trace/port/riscv/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static uint8_t *esp_apptrace_riscv_down_buffer_get(esp_apptrace_riscv_data_t *hw
5050
static esp_err_t esp_apptrace_riscv_down_buffer_put(esp_apptrace_riscv_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
5151
static bool esp_apptrace_riscv_host_is_connected(esp_apptrace_riscv_data_t *hw_data);
5252
static esp_err_t esp_apptrace_riscv_buffer_swap_start(uint32_t curr_block_id);
53-
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id);
53+
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len);
5454
static esp_err_t esp_apptrace_riscv_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len);
5555
static bool esp_apptrace_riscv_host_data_pending(void);
5656

@@ -353,7 +353,7 @@ static esp_err_t esp_apptrace_riscv_buffer_swap_end(uint32_t new_block_id, uint3
353353
return ESP_OK;
354354
}
355355

356-
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id)
356+
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len)
357357
{
358358
/* do nothing */
359359
return ESP_OK;

components/app_trace/port/xtensa/port.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static uint8_t *esp_apptrace_trax_down_buffer_get(esp_apptrace_trax_data_t *hw_d
208208
static esp_err_t esp_apptrace_trax_down_buffer_put(esp_apptrace_trax_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
209209
static bool esp_apptrace_trax_host_is_connected(esp_apptrace_trax_data_t *hw_data);
210210
static esp_err_t esp_apptrace_trax_buffer_swap_start(uint32_t curr_block_id);
211-
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id);
211+
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len);
212212
static esp_err_t esp_apptrace_trax_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len);
213213
static bool esp_apptrace_trax_host_data_pending(void);
214214

@@ -526,21 +526,21 @@ static esp_err_t esp_apptrace_trax_buffer_swap_end(uint32_t new_block_id, uint32
526526
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
527527
uint32_t host_connected = ESP_APPTRACE_TRAX_HOST_CONNECT & ctrl_reg;
528528

529-
/* calculate CRC16 of the already switched block */
530-
if (prev_block_len > 0) {
531-
const uint8_t *prev_block_start = s_trax_blocks[!((new_block_id % 2))];
532-
uint16_t crc16 = esp_rom_crc16_le(0, prev_block_start, prev_block_len);
533-
eri_write(ESP_APPTRACE_TRAX_CRC16_REG, crc16 | ESP_APPTRACE_CRC_INDICATOR);
534-
ESP_APPTRACE_LOGD("CRC16:%x %d @%x", crc16, prev_block_len, prev_block_start);
535-
}
536529
eri_write(ESP_APPTRACE_TRAX_CTRL_REG, ESP_APPTRACE_TRAX_BLOCK_ID(new_block_id) |
537530
host_connected | ESP_APPTRACE_TRAX_BLOCK_LEN(prev_block_len));
538531
esp_apptrace_trax_buffer_swap_unlock();
539532
return ESP_OK;
540533
}
541534

542-
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id)
535+
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len)
543536
{
537+
/* Before switching to the new block, calculate CRC16 of the current block */
538+
if (prev_block_len > 0) {
539+
const uint8_t *prev_block_start = s_trax_blocks[!((new_block_id % 2))];
540+
uint16_t crc16 = esp_rom_crc16_le(0, prev_block_start, prev_block_len);
541+
eri_write(ESP_APPTRACE_TRAX_CRC16_REG, crc16 | ESP_APPTRACE_CRC_INDICATOR);
542+
ESP_APPTRACE_LOGD("CRC16:%x %d @%x", crc16, prev_block_len, prev_block_start);
543+
}
544544
esp_apptrace_trax_select_memory_block(new_block_id);
545545
return ESP_OK;
546546
}

components/app_trace/private_include/esp_app_trace_membufs_proto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ typedef struct {
2929

3030
typedef struct {
3131
esp_err_t (*swap_start)(uint32_t curr_block_id);
32-
esp_err_t (*swap)(uint32_t new_block_id);
32+
esp_err_t (*swap)(uint32_t new_block_id, uint32_t prev_block_len);
3333
esp_err_t (*swap_end)(uint32_t new_block_id, uint32_t prev_block_len);
3434
bool (*host_data_pending)(void);
3535
} esp_apptrace_membufs_proto_hw_t;

components/app_trace/sys_view/Sample/FreeRTOSV10.4/Config/esp/SEGGER_SYSVIEW_Config_FreeRTOS.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: BSD-1-Clause
55
*
6-
* SPDX-FileContributor: 2017-2024 Espressif Systems (Shanghai) CO LTD
6+
* SPDX-FileContributor: 2017-2025 Espressif Systems (Shanghai) CO LTD
77
*/
88
/*********************************************************************
99
* SEGGER Microcontroller GmbH *
@@ -65,6 +65,7 @@ Revision: $Rev: 7745 $
6565
#include "esp_app_trace.h"
6666
#include "esp_app_trace_util.h"
6767
#include "esp_intr_alloc.h"
68+
#include "esp_clk_tree.h"
6869
#include "esp_cpu.h"
6970
#include "soc/soc.h"
7071
#include "soc/interrupts.h"
@@ -84,11 +85,7 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
8485
// The target device name
8586
#define SYSVIEW_DEVICE_NAME CONFIG_IDF_TARGET
8687
// The target core name
87-
#if CONFIG_IDF_TARGET_ARCH_XTENSA
88-
#define SYSVIEW_CORE_NAME "xtensa"
89-
#elif CONFIG_IDF_TARGET_ARCH_RISCV
90-
#define SYSVIEW_CORE_NAME "riscv"
91-
#endif
88+
#define SYSVIEW_CORE_NAME "core0" // In dual core, this will be renamed by OpenOCD as core1
9289

9390
// Determine which timer to use as timestamp source
9491
#if CONFIG_APPTRACE_SV_TS_SOURCE_CCOUNT
@@ -105,9 +102,6 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
105102
// Timer group timer divisor
106103
#define SYSVIEW_TIMER_DIV 2
107104

108-
// Frequency of the timestamp, using APB as GPTimer source clock
109-
#define SYSVIEW_TIMESTAMP_FREQ (esp_clk_apb_freq() / SYSVIEW_TIMER_DIV)
110-
111105
// GPTimer handle
112106
gptimer_handle_t s_sv_gptimer;
113107

@@ -177,30 +171,38 @@ static void _cbSendSystemDesc(void) {
177171
*
178172
**********************************************************************
179173
*/
180-
static void SEGGER_SYSVIEW_TS_Init(void)
174+
static int SEGGER_SYSVIEW_TS_Init(void)
181175
{
182176
/* We only need to initialize something if we use Timer Group.
183177
* esp_timer and ccount can be used as is.
184178
*/
185179
#if TS_USE_TIMERGROUP
180+
// get clock source frequency
181+
uint32_t counter_src_hz = 0;
182+
ESP_ERROR_CHECK(esp_clk_tree_src_get_freq_hz(
183+
(soc_module_clk_t)GPTIMER_CLK_SRC_DEFAULT,
184+
ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, &counter_src_hz));
186185
gptimer_config_t config = {
187186
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
188187
.direction = GPTIMER_COUNT_UP,
189-
.resolution_hz = SYSVIEW_TIMESTAMP_FREQ,
188+
.resolution_hz = counter_src_hz / SYSVIEW_TIMER_DIV,
190189
};
191190
// pick any free GPTimer instance
192191
ESP_ERROR_CHECK(gptimer_new_timer(&config, &s_sv_gptimer));
193192
/* Start counting */
194193
gptimer_enable(s_sv_gptimer);
195194
gptimer_start(s_sv_gptimer);
195+
return config.resolution_hz;
196+
#else
197+
return SYSVIEW_TIMESTAMP_FREQ;
196198
#endif // TS_USE_TIMERGROUP
197199
}
198200

199201
void SEGGER_SYSVIEW_Conf(void) {
200202
U32 disable_evts = 0;
201203

202-
SEGGER_SYSVIEW_TS_Init();
203-
SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ,
204+
int timestamp_freq = SEGGER_SYSVIEW_TS_Init();
205+
SEGGER_SYSVIEW_Init(timestamp_freq, SYSVIEW_CPU_FREQ,
204206
&SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc);
205207
SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
206208

0 commit comments

Comments
 (0)