2017-03-15 05:15:59 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
|
2018-06-11 01:02:14 +08:00
|
|
|
* Contributors: 2018 Antmicro <www.antmicro.com>
|
2017-03-15 05:15:59 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <toolchain.h>
|
|
|
|
|
2018-06-11 01:02:14 +08:00
|
|
|
/* exports */
|
2017-03-15 05:15:59 +08:00
|
|
|
GTEXT(__start)
|
2018-06-11 01:02:14 +08:00
|
|
|
|
|
|
|
/* imports */
|
|
|
|
GTEXT(__initialize)
|
2017-03-15 05:15:59 +08:00
|
|
|
GTEXT(__irq_wrapper)
|
|
|
|
|
2018-06-11 01:02:14 +08:00
|
|
|
SECTION_FUNC(vectors, __start)
|
2017-03-15 05:15:59 +08:00
|
|
|
.option norvc;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set mtvec (Machine Trap-Vector Base-Address Register)
|
|
|
|
* to __irq_wrapper.
|
|
|
|
*/
|
|
|
|
la t0, __irq_wrapper
|
|
|
|
csrw mtvec, t0
|
|
|
|
|
2018-06-11 01:02:14 +08:00
|
|
|
/* Jump to __initialize */
|
|
|
|
tail __initialize
|