Align with the latest upstream native simulator 4c595794588f9d7f67fcf0fe05c3db02892a00f9 including: * 4c59579 Makefile: Add option to build native part * 910f934 Makefile: NSI_EXTRA_INCLUDES option and lots of commentary * d9bf489 cmd line parsin: Minor header refactoring * 02f3555 cmd line cleanup: Run as NSI_TASK instead of calling expl. * 2c88173 Split exit call in two * 2b989b4 CPU IF change: nsif_cpu0_cleanup() to return int * e696228 HW scheduler: Add API to get next event time * ae0e9e8 native irq ctrl: Miscellaneous fixes and improvements * 3fd84cd NSI_TASK: Add compile check of valid priority * 7e09fb8 HW events: Change internal storage And two minor updates to the native_sim board, to align with this updated version: * nsif_cpu0_cleanup(void) now must return an int * We need to explicitly tell the native simulator build we want the native components built Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
45 lines
994 B
Text
45 lines
994 B
Text
/*
|
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Linker command/script file for the native simulator runner
|
|
*/
|
|
|
|
#define NSI_INIT_LEVEL(level) \
|
|
__nsi_##level##_tasks_start = .; \
|
|
KEEP(*(SORT(.nsi_##level[0-9]_task))); \
|
|
KEEP(*(SORT(.nsi_##level[1-9][0-9]_task))); \
|
|
KEEP(*(SORT(.nsi_##level[1-9][0-9][0-9]_task))); \
|
|
|
|
SECTIONS
|
|
{
|
|
nsi_tasks :
|
|
{
|
|
__nsi_tasks_start = .;
|
|
NSI_INIT_LEVEL(PRE_BOOT_1)
|
|
NSI_INIT_LEVEL(PRE_BOOT_2)
|
|
NSI_INIT_LEVEL(HW_INIT)
|
|
NSI_INIT_LEVEL(PRE_BOOT_3)
|
|
NSI_INIT_LEVEL(FIRST_SLEEP)
|
|
NSI_INIT_LEVEL(ON_EXIT_PRE)
|
|
NSI_INIT_LEVEL(ON_EXIT_POST)
|
|
__nsi_tasks_end = .;
|
|
}
|
|
|
|
nsi_hw_events :
|
|
{
|
|
__nsi_hw_events_start = .;
|
|
KEEP(*(SORT(.nsi_hw_event_[0-9]))); \
|
|
KEEP(*(SORT(.nsi_hw_event_[1-9][0-9]))); \
|
|
KEEP(*(SORT(.nsi_hw_event_[1-9][0-9][0-9])));
|
|
__nsi_hw_events_end = .;
|
|
}
|
|
} INSERT AFTER .data;
|
|
|
|
/*
|
|
* Note this script augments the default host linker script
|
|
*/
|