Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/drivers/dma/chan_blen_transfer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ project(chan_blen_transfer)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

zephyr_code_relocate(FILES src/test_dma.c LOCATION ${CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION}_RODATA_BSS)
if (CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION)
zephyr_code_relocate(FILES src/test_buffers.c LOCATION ${CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION})
endif()
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONFIG_CODE_DATA_RELOCATION=y
CONFIG_MEM_ATTR_HEAP=y
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="DTCM"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

&itcm {
&dtcm {
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONFIG_CODE_DATA_RELOCATION=y
CONFIG_MEM_ATTR_HEAP=y
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="DTCM"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

&itcm {
&dtcm {
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONFIG_CODE_DATA_RELOCATION=y
CONFIG_MEM_ATTR_HEAP=y
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="DTCM"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

&itcm {
&dtcm {
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONFIG_CODE_DATA_RELOCATION=y
CONFIG_MEM_ATTR_HEAP=y
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="DTCM"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

&itcm {
&dtcm {
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

Expand Down
12 changes: 12 additions & 0 deletions tests/drivers/dma/chan_blen_transfer/src/test_buffers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/kernel.h>

#include "test_buffers.h"

__aligned(32) char tx_data[TEST_BUF_SIZE] = "It is harder to be kind than to be wise........";
__aligned(32) char rx_data[TEST_BUF_SIZE] = { 0 };
12 changes: 12 additions & 0 deletions tests/drivers/dma/chan_blen_transfer/src/test_buffers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <stdint.h>

#define TEST_BUF_SIZE (48)

extern char tx_data[TEST_BUF_SIZE];
extern char rx_data[TEST_BUF_SIZE];
5 changes: 1 addition & 4 deletions tests/drivers/dma/chan_blen_transfer/src/test_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
#include <zephyr/drivers/dma.h>
#include <zephyr/ztest.h>

#define RX_BUFF_SIZE (48)

static __aligned(32) char tx_data[] = "It is harder to be kind than to be wise........";
static __aligned(32) char rx_data[RX_BUFF_SIZE] = { 0 };
#include "test_buffers.h"

static void test_done(const struct device *dma_dev, void *arg,
uint32_t id, int status)
Expand Down