25 lines
401 B
ArmAsm
25 lines
401 B
ArmAsm
|
/*
|
||
|
* Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
|
||
|
*
|
||
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
*/
|
||
|
|
||
|
#include <toolchain.h>
|
||
|
|
||
|
/* imports */
|
||
|
GTEXT(__start)
|
||
|
GTEXT(__irq_wrapper)
|
||
|
|
||
|
SECTION_FUNC(vectors, vinit)
|
||
|
.option norvc;
|
||
|
|
||
|
/*
|
||
|
* Set mtvec (Machine Trap-Vector Base-Address Register)
|
||
|
* to __irq_wrapper.
|
||
|
*/
|
||
|
la t0, __irq_wrapper
|
||
|
csrw mtvec, t0
|
||
|
|
||
|
/* Jump to __start */
|
||
|
tail __start
|