mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 03:22:30 +00:00
Added a linker script that shall be common to most riscv SOCs. Linker script also accounts for execution in place in ROM, when CONFIG_XIP is set. Nonetheless, riscv32 SOCs (like pulpino) requiring a different system layout can still define their own linker script. Change-Id: I3ad670446d439772c29a8204e307ac79643dc650 Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
40 lines
673 B
C
40 lines
673 B
C
/*
|
|
* Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Full C support initialization
|
|
*
|
|
*
|
|
* Initialization of full C support: zero the .bss and call _Cstart().
|
|
*
|
|
* Stack is available in this module, but not the global data/bss until their
|
|
* initialization is performed.
|
|
*/
|
|
|
|
#include <stddef.h>
|
|
#include <toolchain.h>
|
|
#include <nano_internal.h>
|
|
|
|
/**
|
|
*
|
|
* @brief Prepare to and run C code
|
|
*
|
|
* This routine prepares for the execution of and runs C code.
|
|
*
|
|
* @return N/A
|
|
*/
|
|
|
|
void _PrepC(void)
|
|
{
|
|
_bss_zero();
|
|
#ifdef CONFIG_XIP
|
|
_data_copy();
|
|
#endif
|
|
_Cstart();
|
|
CODE_UNREACHABLE;
|
|
}
|