1 /*
2 * Copyright (c) 2012-2014 Wind River Systems, Inc.
3 * Copyright (c) 2022, NXP
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8 #include <zephyr/kernel.h>
9 #include <zephyr/sys/printk.h>
10 #include <zephyr/ztest.h>
11
function_in_sram(int32_t value)12 void function_in_sram(int32_t value)
13 {
14 char src[8] = "data\n";
15 char dst[8];
16
17 printk("Hello World! %s\n", CONFIG_BOARD);
18 memcpy(dst, src, 8);
19 printk("Address of memcpy %p\n\n", &memcpy);
20 zassert_mem_equal(src, dst, 8, "memcpy compare error");
21 }
22
function_not_relocated(int32_t value)23 void function_not_relocated(int32_t value)
24 {
25 char src[8] = "data\n";
26 char dst[8];
27
28 printk("Hello World! %s\n", CONFIG_BOARD);
29 memcpy(dst, src, 8);
30 printk("Address of memcpy %p\n\n", &memcpy);
31 zassert_mem_equal(src, dst, 8, "memcpy compare error");
32 }
33