Software APIs
bare_metal.c
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
6 #include "sw/device/silicon_creator/lib/dbg_print.h"
7 #include "sw/device/silicon_creator/lib/manifest_def.h"
8 
10 
11 void bare_metal_main(void) {
12  dbg_printf("Bare metal PASS!\r\n");
13  while (true) {
14  }
15 }
16 
17 void interrupt_handler(void) { dbg_printf("Interrupt!\r\n"); }
18 
19 // We only need a single handler for all interrupts, but we want to
20 // keep distinct symbols to make writing tests easier.
21 void exception_handler(void) __attribute__((alias("interrupt_handler")));
22 
23 void nmi_handler(void) __attribute__((alias("interrupt_handler")));