1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "bs_tracing.h"
8 #include "nsi_cpu_if.h"
9 
10 /*
11  * Default (weak) implementation for nsif_cpu<n>_save_test_arg() expected by the argument
12  * parsing defined in bsim_args_runner.
13  * Note that the real implementation is provided by the board code.
14  * This exists in case the total device image is assembled lacking some of the embedded MCU images
15  * or the user tries to target a non-existent MCU
16  */
17 
save_test_arg_warn(const char * func,char * argv)18 static void save_test_arg_warn(const char *func, char *argv)
19 {
20 	bs_trace_warning("%s not defined. You may be passing a test argument to a CPU without"
21 			 " image or a non-existent CPU. Argument \"%s\" will be ignored\n",
22 			 func, argv);
23 }
24 
25 /* Define N instances of void nsif_cpu<n>_save_test_arg */
26 F_TRAMP_BODY_LIST(NATIVE_SIMULATOR_IF __attribute__((weak)) void nsif_cpu,
27 		_save_test_arg(char *argv) { save_test_arg_warn(__func__, argv); })
28