summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsp/coreip-e20-arty/metal.h4
-rw-r--r--bsp/coreip-e20-rtl/metal.h4
-rw-r--r--bsp/coreip-e21-arty/metal.h4
-rw-r--r--bsp/coreip-e21-rtl/metal.h4
-rw-r--r--bsp/coreip-e24-arty/metal.h4
-rw-r--r--bsp/coreip-e24-arty/settings.mk4
-rw-r--r--bsp/coreip-e24-rtl/metal.h4
-rw-r--r--bsp/coreip-e24-rtl/settings.mk4
-rw-r--r--bsp/coreip-e31-arty/metal.default.lds1
-rw-r--r--bsp/coreip-e31-arty/metal.h10
-rw-r--r--bsp/coreip-e31-arty/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-e31-arty/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-e31-rtl/metal.default.lds1
-rw-r--r--bsp/coreip-e31-rtl/metal.h10
-rw-r--r--bsp/coreip-e31-rtl/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-e31-rtl/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-e34-arty/metal.default.lds1
-rw-r--r--bsp/coreip-e34-arty/metal.h10
-rw-r--r--bsp/coreip-e34-arty/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-e34-arty/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-e34-arty/settings.mk6
-rw-r--r--bsp/coreip-e34-rtl/metal.default.lds1
-rw-r--r--bsp/coreip-e34-rtl/metal.h10
-rw-r--r--bsp/coreip-e34-rtl/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-e34-rtl/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-e34-rtl/settings.mk6
-rw-r--r--bsp/coreip-e76-arty/metal.h10
-rw-r--r--bsp/coreip-e76-arty/settings.mk4
-rw-r--r--bsp/coreip-e76-rtl/metal.h10
-rw-r--r--bsp/coreip-e76-rtl/settings.mk4
-rw-r--r--bsp/coreip-s51-arty/metal.default.lds1
-rw-r--r--bsp/coreip-s51-arty/metal.h10
-rw-r--r--bsp/coreip-s51-arty/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-s51-arty/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-s51-rtl/metal.default.lds1
-rw-r--r--bsp/coreip-s51-rtl/metal.h10
-rw-r--r--bsp/coreip-s51-rtl/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-s51-rtl/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-s54-arty/metal.default.lds1
-rw-r--r--bsp/coreip-s54-arty/metal.h10
-rw-r--r--bsp/coreip-s54-arty/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-s54-arty/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-s54-arty/settings.mk4
-rw-r--r--bsp/coreip-s54-rtl/metal.default.lds1
-rw-r--r--bsp/coreip-s54-rtl/metal.h10
-rw-r--r--bsp/coreip-s54-rtl/metal.ramrodata.lds1
-rw-r--r--bsp/coreip-s54-rtl/metal.scratchpad.lds1
-rw-r--r--bsp/coreip-s54-rtl/settings.mk4
-rw-r--r--bsp/coreip-s76-arty/metal.h10
-rw-r--r--bsp/coreip-s76-arty/settings.mk4
-rw-r--r--bsp/coreip-s76-rtl/metal.h10
-rw-r--r--bsp/coreip-s76-rtl/settings.mk4
-rw-r--r--bsp/freedom-e310-arty/metal.default.lds1
-rw-r--r--bsp/freedom-e310-arty/metal.h10
-rw-r--r--bsp/freedom-e310-arty/metal.ramrodata.lds1
-rw-r--r--bsp/freedom-e310-arty/metal.scratchpad.lds1
-rw-r--r--bsp/sifive-hifive1-revb/metal.h10
-rw-r--r--bsp/sifive-hifive1/metal.h10
-rwxr-xr-xbsp/update-targets.sh7
-rw-r--r--debug.mk2
m---------freedom-metal0
-rw-r--r--release.mk1
-rwxr-xr-xscripts/fixup-dts138
-rwxr-xr-xscripts/git-version21
-rw-r--r--scripts/standalone.mk3
m---------software/empty0
m---------software/example-coreip-welcome0
m---------software/example-itim0
m---------software/example-pmp0
m---------software/example-spi0
m---------software/hello0
m---------software/local-interrupt0
m---------software/return-fail0
m---------software/return-pass0
m---------software/software-interrupt0
m---------software/timer-interrupt0
76 files changed, 353 insertions, 64 deletions
diff --git a/bsp/coreip-e20-arty/metal.h b/bsp/coreip-e20-arty/metal.h
index 93154a8..36ddab0 100644
--- a/bsp/coreip-e20-arty/metal.h
+++ b/bsp/coreip-e20-arty/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 58
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e20-rtl/metal.h b/bsp/coreip-e20-rtl/metal.h
index 4e03f92..66d4599 100644
--- a/bsp/coreip-e20-rtl/metal.h
+++ b/bsp/coreip-e20-rtl/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 48
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e21-arty/metal.h b/bsp/coreip-e21-arty/metal.h
index f469e41..872fde6 100644
--- a/bsp/coreip-e21-arty/metal.h
+++ b/bsp/coreip-e21-arty/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 153
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e21-rtl/metal.h b/bsp/coreip-e21-rtl/metal.h
index 8f1799b..349fdc6 100644
--- a/bsp/coreip-e21-rtl/metal.h
+++ b/bsp/coreip-e21-rtl/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 143
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e24-arty/metal.h b/bsp/coreip-e24-arty/metal.h
index c9ccb86..47e0f67 100644
--- a/bsp/coreip-e24-arty/metal.h
+++ b/bsp/coreip-e24-arty/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 153
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e24-arty/settings.mk b/bsp/coreip-e24-arty/settings.mk
index 0b9c2cb..62d3775 100644
--- a/bsp/coreip-e24-arty/settings.mk
+++ b/bsp/coreip-e24-arty/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
RISCV_CMODEL=medlow
TARGET_TAGS=fpga openocd
diff --git a/bsp/coreip-e24-rtl/metal.h b/bsp/coreip-e24-rtl/metal.h
index 40f92c8..8557b14 100644
--- a/bsp/coreip-e24-rtl/metal.h
+++ b/bsp/coreip-e24-rtl/metal.h
@@ -5,6 +5,9 @@
#ifdef __METAL_MACHINE_MACROS
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#define __METAL_CLIC_SUBINTERRUPTS 143
#ifndef __METAL_CLIC_SUBINTERRUPTS
@@ -15,6 +18,7 @@
#define METAL_MAX_CLINT_INTERRUPTS 0
+#define __METAL_PLIC_SUBINTERRUPTS 0
#define METAL_MAX_PLIC_INTERRUPTS 0
#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
diff --git a/bsp/coreip-e24-rtl/settings.mk b/bsp/coreip-e24-rtl/settings.mk
index f60f250..880c000 100644
--- a/bsp/coreip-e24-rtl/settings.mk
+++ b/bsp/coreip-e24-rtl/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
RISCV_CMODEL=medlow
COREIP_MEM_WIDTH=32
diff --git a/bsp/coreip-e31-arty/metal.default.lds b/bsp/coreip-e31-arty/metal.default.lds
index bb593e9..965607a 100644
--- a/bsp/coreip-e31-arty/metal.default.lds
+++ b/bsp/coreip-e31-arty/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e31-arty/metal.h b/bsp/coreip-e31-arty/metal.h
index 41bcf11..fead823 100644
--- a/bsp/coreip-e31-arty/metal.h
+++ b/bsp/coreip-e31-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -192,7 +200,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e31-arty/metal.ramrodata.lds b/bsp/coreip-e31-arty/metal.ramrodata.lds
index ed516b5..8faa8d0 100644
--- a/bsp/coreip-e31-arty/metal.ramrodata.lds
+++ b/bsp/coreip-e31-arty/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e31-arty/metal.scratchpad.lds b/bsp/coreip-e31-arty/metal.scratchpad.lds
index 5dc9cc8..0edadd5 100644
--- a/bsp/coreip-e31-arty/metal.scratchpad.lds
+++ b/bsp/coreip-e31-arty/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-e31-rtl/metal.default.lds b/bsp/coreip-e31-rtl/metal.default.lds
index 0b495c2..3fd5c5f 100644
--- a/bsp/coreip-e31-rtl/metal.default.lds
+++ b/bsp/coreip-e31-rtl/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e31-rtl/metal.h b/bsp/coreip-e31-rtl/metal.h
index 7133c5e..39be849 100644
--- a/bsp/coreip-e31-rtl/metal.h
+++ b/bsp/coreip-e31-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -115,7 +123,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e31-rtl/metal.ramrodata.lds b/bsp/coreip-e31-rtl/metal.ramrodata.lds
index 1851d65..1946306 100644
--- a/bsp/coreip-e31-rtl/metal.ramrodata.lds
+++ b/bsp/coreip-e31-rtl/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e31-rtl/metal.scratchpad.lds b/bsp/coreip-e31-rtl/metal.scratchpad.lds
index f07f9ed..3c1fe99 100644
--- a/bsp/coreip-e31-rtl/metal.scratchpad.lds
+++ b/bsp/coreip-e31-rtl/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-e34-arty/metal.default.lds b/bsp/coreip-e34-arty/metal.default.lds
index bb593e9..965607a 100644
--- a/bsp/coreip-e34-arty/metal.default.lds
+++ b/bsp/coreip-e34-arty/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e34-arty/metal.h b/bsp/coreip-e34-arty/metal.h
index abf1c4d..172ea35 100644
--- a/bsp/coreip-e34-arty/metal.h
+++ b/bsp/coreip-e34-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -192,7 +200,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e34-arty/metal.ramrodata.lds b/bsp/coreip-e34-arty/metal.ramrodata.lds
index ed516b5..8faa8d0 100644
--- a/bsp/coreip-e34-arty/metal.ramrodata.lds
+++ b/bsp/coreip-e34-arty/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e34-arty/metal.scratchpad.lds b/bsp/coreip-e34-arty/metal.scratchpad.lds
index 5dc9cc8..0edadd5 100644
--- a/bsp/coreip-e34-arty/metal.scratchpad.lds
+++ b/bsp/coreip-e34-arty/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-e34-arty/settings.mk b/bsp/coreip-e34-arty/settings.mk
index 0b9c2cb..249d7e0 100644
--- a/bsp/coreip-e34-arty/settings.mk
+++ b/bsp/coreip-e34-arty/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
-RISCV_CMODEL=medlow
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
+RISCV_CMODEL=medany
TARGET_TAGS=fpga openocd
diff --git a/bsp/coreip-e34-rtl/metal.default.lds b/bsp/coreip-e34-rtl/metal.default.lds
index 0b495c2..3fd5c5f 100644
--- a/bsp/coreip-e34-rtl/metal.default.lds
+++ b/bsp/coreip-e34-rtl/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e34-rtl/metal.h b/bsp/coreip-e34-rtl/metal.h
index 091b759..178d80a 100644
--- a/bsp/coreip-e34-rtl/metal.h
+++ b/bsp/coreip-e34-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -115,7 +123,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e34-rtl/metal.ramrodata.lds b/bsp/coreip-e34-rtl/metal.ramrodata.lds
index 1851d65..1946306 100644
--- a/bsp/coreip-e34-rtl/metal.ramrodata.lds
+++ b/bsp/coreip-e34-rtl/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-e34-rtl/metal.scratchpad.lds b/bsp/coreip-e34-rtl/metal.scratchpad.lds
index f07f9ed..3c1fe99 100644
--- a/bsp/coreip-e34-rtl/metal.scratchpad.lds
+++ b/bsp/coreip-e34-rtl/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-e34-rtl/settings.mk b/bsp/coreip-e34-rtl/settings.mk
index f60f250..93a732a 100644
--- a/bsp/coreip-e34-rtl/settings.mk
+++ b/bsp/coreip-e34-rtl/settings.mk
@@ -1,6 +1,6 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
-RISCV_CMODEL=medlow
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
+RISCV_CMODEL=medany
COREIP_MEM_WIDTH=32
diff --git a/bsp/coreip-e76-arty/metal.h b/bsp/coreip-e76-arty/metal.h
index 2c052e0..6365e99 100644
--- a/bsp/coreip-e76-arty/metal.h
+++ b/bsp/coreip-e76-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 31
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 31
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define METAL_MAX_LOCAL_EXT_INTERRUPTS 0
@@ -188,7 +196,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 30UL,
+ .num_interrupts = 31UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e76-arty/settings.mk b/bsp/coreip-e76-arty/settings.mk
index 0b9c2cb..62d3775 100644
--- a/bsp/coreip-e76-arty/settings.mk
+++ b/bsp/coreip-e76-arty/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
RISCV_CMODEL=medlow
TARGET_TAGS=fpga openocd
diff --git a/bsp/coreip-e76-rtl/metal.h b/bsp/coreip-e76-rtl/metal.h
index 6002785..31671df 100644
--- a/bsp/coreip-e76-rtl/metal.h
+++ b/bsp/coreip-e76-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define METAL_MAX_LOCAL_EXT_INTERRUPTS 0
@@ -105,7 +113,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-e76-rtl/settings.mk b/bsp/coreip-e76-rtl/settings.mk
index dd09d48..4d7cae7 100644
--- a/bsp/coreip-e76-rtl/settings.mk
+++ b/bsp/coreip-e76-rtl/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
+RISCV_ARCH=rv32imafc
+RISCV_ABI=ilp32f
RISCV_CMODEL=medlow
COREIP_MEM_WIDTH=64
diff --git a/bsp/coreip-s51-arty/metal.default.lds b/bsp/coreip-s51-arty/metal.default.lds
index bb593e9..965607a 100644
--- a/bsp/coreip-s51-arty/metal.default.lds
+++ b/bsp/coreip-s51-arty/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s51-arty/metal.h b/bsp/coreip-s51-arty/metal.h
index ca81d85..0dd45af 100644
--- a/bsp/coreip-s51-arty/metal.h
+++ b/bsp/coreip-s51-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -192,7 +200,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s51-arty/metal.ramrodata.lds b/bsp/coreip-s51-arty/metal.ramrodata.lds
index ed516b5..8faa8d0 100644
--- a/bsp/coreip-s51-arty/metal.ramrodata.lds
+++ b/bsp/coreip-s51-arty/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s51-arty/metal.scratchpad.lds b/bsp/coreip-s51-arty/metal.scratchpad.lds
index 5dc9cc8..0edadd5 100644
--- a/bsp/coreip-s51-arty/metal.scratchpad.lds
+++ b/bsp/coreip-s51-arty/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-s51-rtl/metal.default.lds b/bsp/coreip-s51-rtl/metal.default.lds
index efa595f..a997b8b 100644
--- a/bsp/coreip-s51-rtl/metal.default.lds
+++ b/bsp/coreip-s51-rtl/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s51-rtl/metal.h b/bsp/coreip-s51-rtl/metal.h
index 6618a7c..b815b67 100644
--- a/bsp/coreip-s51-rtl/metal.h
+++ b/bsp/coreip-s51-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -115,7 +123,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s51-rtl/metal.ramrodata.lds b/bsp/coreip-s51-rtl/metal.ramrodata.lds
index de23402..23aef82 100644
--- a/bsp/coreip-s51-rtl/metal.ramrodata.lds
+++ b/bsp/coreip-s51-rtl/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s51-rtl/metal.scratchpad.lds b/bsp/coreip-s51-rtl/metal.scratchpad.lds
index 8ead4a8..c789249 100644
--- a/bsp/coreip-s51-rtl/metal.scratchpad.lds
+++ b/bsp/coreip-s51-rtl/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-s54-arty/metal.default.lds b/bsp/coreip-s54-arty/metal.default.lds
index bb593e9..965607a 100644
--- a/bsp/coreip-s54-arty/metal.default.lds
+++ b/bsp/coreip-s54-arty/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s54-arty/metal.h b/bsp/coreip-s54-arty/metal.h
index a757691..d4ac5cb 100644
--- a/bsp/coreip-s54-arty/metal.h
+++ b/bsp/coreip-s54-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -192,7 +200,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s54-arty/metal.ramrodata.lds b/bsp/coreip-s54-arty/metal.ramrodata.lds
index ed516b5..8faa8d0 100644
--- a/bsp/coreip-s54-arty/metal.ramrodata.lds
+++ b/bsp/coreip-s54-arty/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s54-arty/metal.scratchpad.lds b/bsp/coreip-s54-arty/metal.scratchpad.lds
index 5dc9cc8..0edadd5 100644
--- a/bsp/coreip-s54-arty/metal.scratchpad.lds
+++ b/bsp/coreip-s54-arty/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-s54-arty/settings.mk b/bsp/coreip-s54-arty/settings.mk
index 2832d7c..d001dee 100644
--- a/bsp/coreip-s54-arty/settings.mk
+++ b/bsp/coreip-s54-arty/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv64imac
-RISCV_ABI=lp64
+RISCV_ARCH=rv64imafdc
+RISCV_ABI=lp64d
RISCV_CMODEL=medany
TARGET_TAGS=fpga openocd
diff --git a/bsp/coreip-s54-rtl/metal.default.lds b/bsp/coreip-s54-rtl/metal.default.lds
index efa595f..a997b8b 100644
--- a/bsp/coreip-s54-rtl/metal.default.lds
+++ b/bsp/coreip-s54-rtl/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s54-rtl/metal.h b/bsp/coreip-s54-rtl/metal.h
index e094a58..360c3d2 100644
--- a/bsp/coreip-s54-rtl/metal.h
+++ b/bsp/coreip-s54-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -115,7 +123,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s54-rtl/metal.ramrodata.lds b/bsp/coreip-s54-rtl/metal.ramrodata.lds
index de23402..23aef82 100644
--- a/bsp/coreip-s54-rtl/metal.ramrodata.lds
+++ b/bsp/coreip-s54-rtl/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/coreip-s54-rtl/metal.scratchpad.lds b/bsp/coreip-s54-rtl/metal.scratchpad.lds
index 8ead4a8..c789249 100644
--- a/bsp/coreip-s54-rtl/metal.scratchpad.lds
+++ b/bsp/coreip-s54-rtl/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/coreip-s54-rtl/settings.mk b/bsp/coreip-s54-rtl/settings.mk
index 4d48fc1..37a07af 100644
--- a/bsp/coreip-s54-rtl/settings.mk
+++ b/bsp/coreip-s54-rtl/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv64imac
-RISCV_ABI=lp64
+RISCV_ARCH=rv64imafdc
+RISCV_ABI=lp64d
RISCV_CMODEL=medany
COREIP_MEM_WIDTH=64
diff --git a/bsp/coreip-s76-arty/metal.h b/bsp/coreip-s76-arty/metal.h
index feb1b39..752d7a3 100644
--- a/bsp/coreip-s76-arty/metal.h
+++ b/bsp/coreip-s76-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 31
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 31
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define METAL_MAX_LOCAL_EXT_INTERRUPTS 0
@@ -188,7 +196,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 30UL,
+ .num_interrupts = 31UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s76-arty/settings.mk b/bsp/coreip-s76-arty/settings.mk
index 2832d7c..d001dee 100644
--- a/bsp/coreip-s76-arty/settings.mk
+++ b/bsp/coreip-s76-arty/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv64imac
-RISCV_ABI=lp64
+RISCV_ARCH=rv64imafdc
+RISCV_ABI=lp64d
RISCV_CMODEL=medany
TARGET_TAGS=fpga openocd
diff --git a/bsp/coreip-s76-rtl/metal.h b/bsp/coreip-s76-rtl/metal.h
index 8295322..8b8acbc 100644
--- a/bsp/coreip-s76-rtl/metal.h
+++ b/bsp/coreip-s76-rtl/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 128
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define METAL_MAX_LOCAL_EXT_INTERRUPTS 0
@@ -105,7 +113,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 127UL,
+ .num_interrupts = 128UL,
.interrupt_controller = 1,
};
diff --git a/bsp/coreip-s76-rtl/settings.mk b/bsp/coreip-s76-rtl/settings.mk
index 4d48fc1..37a07af 100644
--- a/bsp/coreip-s76-rtl/settings.mk
+++ b/bsp/coreip-s76-rtl/settings.mk
@@ -1,5 +1,5 @@
-RISCV_ARCH=rv64imac
-RISCV_ABI=lp64
+RISCV_ARCH=rv64imafdc
+RISCV_ABI=lp64d
RISCV_CMODEL=medany
COREIP_MEM_WIDTH=64
diff --git a/bsp/freedom-e310-arty/metal.default.lds b/bsp/freedom-e310-arty/metal.default.lds
index 04d9218..815b31b 100644
--- a/bsp/freedom-e310-arty/metal.default.lds
+++ b/bsp/freedom-e310-arty/metal.default.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >flash AT>flash :flash
diff --git a/bsp/freedom-e310-arty/metal.h b/bsp/freedom-e310-arty/metal.h
index f2086b5..2eb644c 100644
--- a/bsp/freedom-e310-arty/metal.h
+++ b/bsp/freedom-e310-arty/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -130,7 +138,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/freedom-e310-arty/metal.ramrodata.lds b/bsp/freedom-e310-arty/metal.ramrodata.lds
index 2898a03..9d535aa 100644
--- a/bsp/freedom-e310-arty/metal.ramrodata.lds
+++ b/bsp/freedom-e310-arty/metal.ramrodata.lds
@@ -137,7 +137,6 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
} >flash AT>flash :flash
diff --git a/bsp/freedom-e310-arty/metal.scratchpad.lds b/bsp/freedom-e310-arty/metal.scratchpad.lds
index 98161de..89a39b9 100644
--- a/bsp/freedom-e310-arty/metal.scratchpad.lds
+++ b/bsp/freedom-e310-arty/metal.scratchpad.lds
@@ -37,7 +37,6 @@ SECTIONS
*(.text.unlikely .text.unlikely.*)
*(.text.startup .text.startup.*)
*(.text .text.*)
- *(.itim .itim.*)
*(.gnu.linkonce.t.*)
} >ram AT>ram :ram
diff --git a/bsp/sifive-hifive1-revb/metal.h b/bsp/sifive-hifive1-revb/metal.h
index 8f8c976..83ac0e1 100644
--- a/bsp/sifive-hifive1-revb/metal.h
+++ b/bsp/sifive-hifive1-revb/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -175,7 +183,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/sifive-hifive1/metal.h b/bsp/sifive-hifive1/metal.h
index 0f30503..0b5941f 100644
--- a/bsp/sifive-hifive1/metal.h
+++ b/bsp/sifive-hifive1/metal.h
@@ -5,6 +5,11 @@
#ifdef __METAL_MACHINE_MACROS
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
+#ifndef __METAL_PLIC_SUBINTERRUPTS
+#define __METAL_PLIC_SUBINTERRUPTS 0
+#endif
#ifndef __METAL_CLIC_SUBINTERRUPTS
#define __METAL_CLIC_SUBINTERRUPTS 0
#endif
@@ -17,8 +22,11 @@
#define __METAL_INTERRUPT_CONTROLLER_C000000_INTERRUPTS 1
+#define __METAL_PLIC_SUBINTERRUPTS 27
+
#define METAL_MAX_PLIC_INTERRUPTS 1
+#define __METAL_CLIC_SUBINTERRUPTS 0
#define METAL_MAX_CLIC_INTERRUPTS 0
#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 16
@@ -172,7 +180,7 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = {
.control_base = 201326592UL,
.control_size = 67108864UL,
.max_priority = 7UL,
- .num_interrupts = 26UL,
+ .num_interrupts = 27UL,
.interrupt_controller = 1,
};
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh
index c4c90cb..dca5340 100755
--- a/bsp/update-targets.sh
+++ b/bsp/update-targets.sh
@@ -13,10 +13,13 @@ EOF
unset DTSFILE
unset CUSTOM_PATH
unset CUSTOM_NAME
+unset NO_FIXUP
+NO_FIXUP=0
while [ "$1" != "" ]
do
case "$1" in
--help) help "$0"; exit 0;;
+ --no-fixup) NO_FIXUP=1; shift 1;;
--target-name) CUSTOM_NAME="$2"; shift 2;;
--sdk-path=*) CUSTOM_PATH="$(echo "$1" | cut -d= -f2-)"; shift 1;;
--sdk-path) CUSTOM_PATH="$2"; shift 2;;
@@ -69,6 +72,10 @@ update_target() {
TARGET=$1
echo "Updating target $TARGET"
+
+ if [ $NO_FIXUP != 1 ]; then
+ ../scripts/fixup-dts --dts $TARGET/$DTS_FILENAME || die "Failed to check $TARGET/$DTS_FILENAME for missing elements"
+ fi
# Compile temporary .dtb
$DTC -I dts -O dtb -o $TARGET/$DTB_FILENAME $TARGET/$DTS_FILENAME || die "Failed to compile $TARGET/$DTS_FILENAME to dtb"
diff --git a/debug.mk b/debug.mk
index b57cfc0..dc77a57 100644
--- a/debug.mk
+++ b/debug.mk
@@ -3,10 +3,12 @@
###################################################
# Set the optimization level
+RISCV_ASFLAGS += -O0
RISCV_CFLAGS += -O0
RISCV_CXXFLAGS += -O0
# Enable debug
+RISCV_ASFLAGS += -g
RISCV_CFLAGS += -g
RISCV_CXXFLAGS += -g
diff --git a/freedom-metal b/freedom-metal
-Subproject ca8f7e7dc57af2f7145d74c5eaf63224b4d1cf8
+Subproject e335f895c88bb9d89bb8d815779e96af256698f
diff --git a/release.mk b/release.mk
index ac7ec8a..11726ba 100644
--- a/release.mk
+++ b/release.mk
@@ -3,5 +3,6 @@
###################################################
# Set the optimization level
+RISCV_ASFLAGS += -Os
RISCV_CFLAGS += -Os
RISCV_CXXFLAGS += -Os
diff --git a/scripts/fixup-dts b/scripts/fixup-dts
new file mode 100755
index 0000000..31ce04f
--- /dev/null
+++ b/scripts/fixup-dts
@@ -0,0 +1,138 @@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+unset dts
+
+while [ "$1" != "" ]
+do
+ case "$1"
+ in
+ --dts) dts="$2"; shift 2;;
+ *) echo "$0: Unknown argument $1"; exit 1;;
+ esac
+done
+
+if [ "${dts}" == "" ]
+then
+ echo "$0: please provide '--dts' option" >&2
+ exit 1
+fi
+
+# Add a PMP node if it doesn't exist
+
+if [ `grep -c 'riscv,pmp' ${dts}` -eq 0 ]
+then
+ echo "$0: PMP node not found in ${dts}."
+
+ sed -i 's/ranges;/ranges;\n\t\tpmp: pmp@0 {\n\t\t\tcompatible = "riscv,pmp";\n\t\t\tregions = <1>;\n\t\t};/' ${dts}
+
+ echo -e "$0: \tAdded pmp@0"
+fi
+
+# Add compat string for the global-interrupt node if it doesn't exist
+
+if [ `grep -c 'global-external-interrupts {' ${dts}` -ne 0 ]; then
+ if [ `grep -c 'sifive,global-external-interrupts0' ${dts}` -eq 0 ]; then
+ echo "$0: Global external interrupts missing compat string in ${dts}."
+
+ sed -i 's/global-external-interrupts {/global-external-interrupts {\n\t\t\tcompatible = "sifive,global-external-interrupts0";/g' ${dts}
+
+ echo -e "$0: \tAdded compat string to global-external-interrupts."
+ fi
+fi
+
+# Add compat string for the local-interrupt node if it doesn't exist
+
+if [ `grep -c 'local-external-interrupts-0 {' ${dts}` -ne 0 ]; then
+ if [ `grep -c 'sifive,local-external-interrupts0' ${dts}` -eq 0 ]; then
+ echo "$0: Local external interrupts missing compat string in ${dts}."
+
+ sed -i 's/local-external-interrupts-0 {/local-external-interrupts {\n\t\t\tcompatible = "sifive,local-external-interrupts0";/g' ${dts}
+
+ echo -e "$0: \tAdded compat string to local-external-interrupts-0."
+ fi
+fi
+
+# Add a test memory node if one doesn't exist
+
+if [ `grep -c 'sifive,testram0' ${dts}` -eq 0 ]; then
+
+ # bullet cores have a memory defined already
+ if [ `grep -c 'sifive,bullet0' ${dts}` -eq 0 ]; then
+
+ echo "$0: Test memory node not found in ${dts}."
+
+ # The heuristic for determining which memory address contains the
+ # program code loaded by the RTL testbench is determined by taking
+ # the design ports and sorting them in order of (periph, sys, mem),
+ # and then lexicographically by protocol.
+
+ port_types="periph sys mem"
+ protocols="ahb axi4 tl"
+
+ for port_type in ${port_types}; do
+ for protocol in ${protocols}; do
+
+ # Check if the port exists
+ if [ `grep -c "${protocol}-${port_type}-port" ${dts}` -ne 0 ]; then
+
+ # Build the node name
+ port_node_name=`egrep -o "${protocol}-${port_type}-port@[a-fA-F0-9]+" ${dts}`
+ echo -e "$0: \tUsing node \t${port_node_name}"
+
+ # Get the address and size cells
+ address_cells=`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?address-cells = <\K(\d+)"`
+ echo -e "$0: \tAddress cells \t${address_cells}"
+ size_cells=`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?size-cells = <\K(\d+)"`
+ echo -e "$0: \tSize cells \t${size_cells}"
+
+ # Get the base address and size
+ if [ ${address_cells} -eq 1 -a ${size_cells} -eq 1 ]; then
+ address_and_size=(`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?ranges = <0x\d+ \K(0x\d+ 0x\d+)"`)
+ base_address=${address_and_size[0]}
+ size=${address_and_size[1]}
+ elif [ ${address_cells} -eq 1 -a ${size_cells} -eq 2 ]; then
+ address_and_size=(`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?ranges = <0x\d+ \K(0x\d+ 0x\d+ 0x\d+)"`)
+ base_address=${address_and_size[0]}
+ size="${address_and_size[1]} ${address_and_size[2]}"
+ elif [ ${address_cells} -eq 2 -a ${size_cells} -eq 1 ]; then
+ address_and_size=(`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?ranges = <0x\d+ 0x\d+ \K(0x\d+ 0x\d+ 0x\d+)"`)
+ base_address="${address_and_size[0]} ${address_and_size[1]}"
+ size=${address_and_size[2]}
+ elif [ ${address_cells} -eq 2 -a ${size_cells} -eq 2 ]; then
+ address_and_size=(`cat ${dts} | tr -d '\n\t' | grep -oP "${port_node_name}.*?ranges = <0x\d+ 0x\d+ \K(0x\d+ 0x\d+ 0x\d+ 0x\d+)"`)
+ base_address="${address_and_size[0]} ${address_and_size[1]}"
+ size="${address_and_size[2]} ${address_and_size[3]}"
+ fi
+ echo -e "$0: \tBase addr \t${base_address}"
+ echo -e "$0: \tSize \t\t${size}"
+
+ # Build the name of the testram node
+ if [ "${address_and_size[0]}" == "0x0" ]; then
+ node_name_addr=`echo ${address_and_size[1]} | cut -c 3-`
+ else
+ node_name_addr=`echo ${address_and_size[0]} | cut -c 3-`
+ fi
+
+ # Determine word size from ISA bitness
+ if [ `grep -c 'riscv,isa = "rv32' ${dts}` -ne 0 ]; then
+ word_size=4
+ else
+ word_size=8
+ fi
+ echo -e "$0: \tWord size \t${word_size}"
+
+ # Create the test memory
+ sed -i "s/ranges;/ranges;\n\t\ttest_memory: testram@${node_name_addr} {\n\t\t\tcompatible = \"sifive,testram0\";\n\t\t\treg = <${base_address} ${size}>;\n\t\t\treg-names = \"mem\";\n\t\t\tword-size-bytes = <${word_size}>;\n\t\t};/" ${dts}
+ echo -e "$0: \tAdded testram@${node_name_addr}"
+
+ # Break out of both loops
+ break 2
+ fi
+ done
+ done
+ fi
+fi
+
diff --git a/scripts/git-version b/scripts/git-version
new file mode 100755
index 0000000..850c19b
--- /dev/null
+++ b/scripts/git-version
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+version='v0.0.1'
+
+if test -d .git
+then
+ gv=`git describe`
+ if [[ "$?" == "0" ]]
+ then
+ if [[ "$(echo "${gv}" | cut -d'-' -f1)" != "$version" ]]
+ then
+ echo "$0 has mismatched version" >&2
+ echo "${gv}-ERROR"
+ exit 1
+ fi
+
+ version="$(echo ${gv} | cut -c2-)"
+ fi
+fi
+
+echo "${version}"
diff --git a/scripts/standalone.mk b/scripts/standalone.mk
index 8098122..78328c5 100644
--- a/scripts/standalone.mk
+++ b/scripts/standalone.mk
@@ -86,12 +86,14 @@ SEGGER_JLINK_GDB_SERVER := JLinkGDBServer
#############################################################
# Set the arch, ABI, and code model
+RISCV_ASFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL)
RISCV_CFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL)
RISCV_CXXFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL)
# Prune unused functions and data
RISCV_CFLAGS += -ffunction-sections -fdata-sections
RISCV_CXXFLAGS += -ffunction-sections -fdata-sections
# Include the Metal headers
+RISCV_ASFLAGS += -I$(abspath $(BSP_DIR)/install/include/)
RISCV_CFLAGS += -I$(abspath $(BSP_DIR)/install/include/)
RISCV_CXXFLAGS += -I$(abspath $(BSP_DIR)/install/include/)
@@ -142,6 +144,7 @@ $(PROGRAM_ELF): \
AR=$(RISCV_AR) \
CC=$(RISCV_GCC) \
CXX=$(RISCV_GXX) \
+ ASFLAGS="$(RISCV_ASFLAGS)" \
CFLAGS="$(RISCV_CFLAGS)" \
CXXFLAGS="$(RISCV_CXXFLAGS)" \
LDFLAGS="$(RISCV_LDFLAGS)" \
diff --git a/software/empty b/software/empty
-Subproject 7803cc83a72083e7994b75a5fbc655b2cfaf291
+Subproject 69b3d2e0d20e20d00a634e0cefb57d8c1c9d313
diff --git a/software/example-coreip-welcome b/software/example-coreip-welcome
-Subproject cbcea378fcb4ab2310bc1d283b79a1539e62109
+Subproject 36ee89aacc5a6b263673adcd7fc4b410dcf6c08
diff --git a/software/example-itim b/software/example-itim
-Subproject a1aec43ed1c7899b8a2e1ca4c16b138eb300540
+Subproject e3bf548680cb94b581132073051c1b95aedca4b
diff --git a/software/example-pmp b/software/example-pmp
-Subproject cee0c31bb386f58651f1c7c3bc7fb7cebc1d36d
+Subproject d588e5347f6007d423e81f8455b94d0d5bb6909
diff --git a/software/example-spi b/software/example-spi
-Subproject de4536ffaa73d77f29d13922e971950f731a6ba
+Subproject 9d131b18e90b1f1984651d3c8bab7a16435fd82
diff --git a/software/hello b/software/hello
-Subproject d1397bec64187efb8b791fe1eb307aa3c760c69
+Subproject d63c8abbf7ae53be59c9c5ed883581ea9438a2d
diff --git a/software/local-interrupt b/software/local-interrupt
-Subproject 2b1985fd4d73c11db4182764c76e980370f28ee
+Subproject 1d4a89602f0db872e203226c0ce935d5c23b7da
diff --git a/software/return-fail b/software/return-fail
-Subproject 515f0bb9facad93fa1614f757ce92d1551019b3
+Subproject 4681fc52c485ec13249eb17ef4a10a9a56240d5
diff --git a/software/return-pass b/software/return-pass
-Subproject a6fa5a576f40ecce21cd38a1227c4180ba5e3c9
+Subproject a4a52466be17193aefd590db01709332ce3a6c7
diff --git a/software/software-interrupt b/software/software-interrupt
-Subproject f001c15eaa3513bf57ebbe2b5d1b5eab659ade7
+Subproject 02fcd09838d28fbffbac437357e4dde2973f07f
diff --git a/software/timer-interrupt b/software/timer-interrupt
-Subproject 238b3a491ecb410573f529f83d4e6791733d0ee
+Subproject 6ddaeff553a71c6218f42b72e93f7f05347dca2