zephyr/samples/boards/intel_adsp/code_relocation/src/reloc.c
Ederson de Souza 7ffc6c31b5 samples/boards: Add intel_adsp/code_relocation sample
A simple sample with some (explained) tricks to get code relocation for
Intel ADSP CAVS platforms.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00

17 lines
317 B
C

/*
* Copyright (c) 2022 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
static uint32_t maybe_bss;
void reloc(void)
{
printk("Relocated code! %s location %p\n", __func__, reloc);
printk("maybe_bss location: %p maybe_bss value: %u\n", &maybe_bss,
maybe_bss);
}