native boards: Make native simulator host trampolines avaliable to all

To ease writing common drivers, let's make the host trampolines
from the native simulator avaliable to all posix based boards.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-07-06 14:05:46 +02:00 committed by Carles Cufí
commit 265010a4b6
2 changed files with 20 additions and 0 deletions

View file

@ -18,6 +18,7 @@ if(CONFIG_NATIVE_APPLICATION)
posix_core.c
nsi_compat/nsi_compat.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nce.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nsi_host_trampolines.c
)
else()
zephyr_library_sources(

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*
* Note: This is a provisional header which exists to allow
* old POSIX arch based boards (i.e. native_posix) to provide access
* to the host C library as if the native simulator trampolines
* existed.
*
* Boards based on the native simulator do NOT use this file
*/
#ifndef ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H
#define ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H
#include "../scripts/native_simulator/common/src/include/nsi_host_trampolines.h"
#endif /* ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H */