diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-09-04 18:09:35 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-09-04 18:09:35 +0200 |
commit | 92e6731824cf4286136cb343d538aae4f772fe13 (patch) | |
tree | 21c12cfbb98f065e1a3fdf527250d178758948df /fw/fe310/bsp/metal/metal.c | |
parent | 4db0527c16502103e04c4091dbd803c55538b52f (diff) |
upload script fixed for jlink
Diffstat (limited to 'fw/fe310/bsp/metal/metal.c')
-rw-r--r-- | fw/fe310/bsp/metal/metal.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/fw/fe310/bsp/metal/metal.c b/fw/fe310/bsp/metal/metal.c deleted file mode 100644 index 9e1bb3f..0000000 --- a/fw/fe310/bsp/metal/metal.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <sys/cdefs.h> - -#include "encoding.h" -#include "platform.h" -#include "prci_driver.h" - -extern void eos_trap_entry(); - -__attribute__((constructor)) -void metal_init(void) { - SPI0_REG(SPI_REG_SCKDIV) = 8; - - PRCI_use_default_clocks(); - PRCI_use_pll(PLL_REFSEL_HFXOSC, 0, 1, 31, 1, -1, -1, -1); - - write_csr(mtvec, &eos_trap_entry); - if (read_csr(misa) & (1 << ('F' - 'A'))) { // if F extension is present - write_csr(mstatus, MSTATUS_FS); // allow FPU instructions without trapping - write_csr(fcsr, 0); // initialize rounding mode, undefined at reset - } -} - -__attribute__((section(".init"))) -void __metal_synchronize_harts() { -} |