Skip to content

Commit 8af9bb6

Browse files
committed
test(uhci): enable the psram test in CI
1 parent 852466e commit 8af9bb6

File tree

10 files changed

+27
-12
lines changed

10 files changed

+27
-12
lines changed

components/esp_driver_uart/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ menu "ESP-Driver:UHCI Configurations"
1616
config UHCI_ISR_HANDLER_IN_IRAM
1717
bool "Place UHCI ISR function into IRAM"
1818
default n
19+
select GDMA_CTRL_FUNC_IN_IRAM if SOC_GDMA_SUPPORTED
1920
help
2021
If this option is not selected, UHCI interrupt will be disabled for a long time and
2122
may cause data lost when doing spi flash operation.

components/esp_driver_uart/linker.lf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ entries:
1818
uhci: uhci_gdma_tx_callback_eof (noflash)
1919
uhci: uhci_do_transmit (noflash)
2020

21-
[mapping:uhci_driver_gdma]
21+
[mapping:uhci_driver_gdma_link]
2222
archive: libesp_hw_support.a
2323
entries:
2424
if UHCI_ISR_HANDLER_IN_IRAM = y:
2525
gdma_link: gdma_link_count_buffer_size_till_eof (noflash)
2626
gdma_link: gdma_link_mount_buffers (noflash)
2727
gdma_link: gdma_link_get_head_addr (noflash)
28-
gdma: gdma_start (noflash)
29-
gdma: gdma_stop (noflash)
30-
gdma: gdma_reset (noflash)

components/esp_driver_uart/src/uhci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ esp_err_t uhci_register_event_callbacks(uhci_controller_handle_t uhci_ctrl, cons
539539
{
540540
ESP_RETURN_ON_FALSE(uhci_ctrl && cbs, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
541541

542-
#if CONFIG_UHCI_ISR_CACHE_SAFE
542+
#if CONFIG_UHCI_ISR_HANDLER_IN_IRAM
543543
if (cbs->on_rx_trans_event) {
544544
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_rx_trans_event), ESP_ERR_INVALID_ARG, TAG, "on_rx_trans_event callback not in IRAM");
545545
}

components/esp_driver_uart/test_apps/.build-test-rules.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ components/esp_driver_uart/test_apps/uart_vfs:
3232
components/esp_driver_uart/test_apps/uhci:
3333
disable:
3434
- if: SOC_UHCI_SUPPORTED != 1
35-
- if: CONFIG_NAME == "psram" and SOC_AHB_GDMA_SUPPORT_PSRAM != 1
3635
depends_components:
3736
- esp_driver_uart

components/esp_driver_uart/test_apps/uhci/main/test_uhci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static void uhci_receive_test(void *arg)
121121
uhci_controller_handle_t uhci_ctrl = ((uhci_controller_handle_t *)arg)[0];
122122
SemaphoreHandle_t exit_sema = ((SemaphoreHandle_t *)arg)[1];
123123

124-
uhci_context_t *ctx = calloc(1, sizeof(uhci_context_t));
124+
uhci_context_t *ctx = heap_caps_calloc(1, sizeof(uhci_context_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
125125
assert(ctx);
126126
ctx->uhci_queue = xQueueCreate(15, sizeof(uhci_event_t));
127127
assert(ctx->uhci_queue);
@@ -252,7 +252,7 @@ static void uhci_receive_test_in_psram(void *arg)
252252
uhci_controller_handle_t uhci_ctrl = ((uhci_controller_handle_t *)arg)[0];
253253
SemaphoreHandle_t exit_sema = ((SemaphoreHandle_t *)arg)[1];
254254

255-
uhci_context_t *ctx = calloc(1, sizeof(uhci_context_t));
255+
uhci_context_t *ctx = heap_caps_calloc(1, sizeof(uhci_context_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
256256
assert(ctx);
257257
ctx->uhci_queue = xQueueCreate(15, sizeof(uhci_event_t));
258258
assert(ctx->uhci_queue);

components/esp_driver_uart/test_apps/uhci/pytest_uhci.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import pytest
44
from pytest_embedded import Dut
55
from pytest_embedded_idf.utils import idf_parametrize
6-
from pytest_embedded_idf.utils import soc_filtered_targets
76

87

98
@pytest.mark.generic
@@ -15,6 +14,20 @@
1514
],
1615
indirect=True,
1716
)
18-
@idf_parametrize('target', soc_filtered_targets('SOC_UHCI_SUPPORTED == 1'), indirect=['target'])
17+
@idf_parametrize('target', ['esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
1918
def test_uhci(dut: Dut) -> None:
2019
dut.run_all_single_board_cases()
20+
21+
22+
@pytest.mark.octal_psram
23+
@pytest.mark.parametrize(
24+
'config',
25+
[
26+
'cache_safe',
27+
'release',
28+
],
29+
indirect=True,
30+
)
31+
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
32+
def test_uhci_psram_s3(dut: Dut) -> None:
33+
dut.run_all_single_board_cases()

components/esp_driver_uart/test_apps/uhci/sdkconfig.ci.cache_safe

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ CONFIG_COMPILER_OPTIMIZATION_NONE=y
66
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
77
# silent the error check, as the error string are stored in rodata, causing RTL check failure
88
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
9-
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
109
CONFIG_HAL_ASSERTION_SILENT=y
1110
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y

components/esp_driver_uart/test_apps/uhci/sdkconfig.ci.psram

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_SPIRAM=y
2+
CONFIG_SPIRAM_SPEED_40M=y
3+
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_SPIRAM=y
2+
CONFIG_SPIRAM_MODE_OCT=y
3+
CONFIG_SPIRAM_SPEED_80M=y
4+
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0

0 commit comments

Comments
 (0)