summaryrefslogtreecommitdiff
path: root/bsp/coreip-e21-rtl
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-06-21 16:36:57 +0000
committerGitHub <noreply@github.com>2019-06-21 16:36:57 +0000
commit0f5761d7d32edddf93f302f52b903e8acca08c5e (patch)
tree46ff4106f51fb6d5f682cf6af73ef1a4ab5f147e /bsp/coreip-e21-rtl
parenteecf71d7cf0ec12997dbceffde190b1086595908 (diff)
parent713237cb963ebf81aca0715d8a770fdbe5d71cb9 (diff)
Merge pull request #287 from sifive/remove-coreip-bsps
Remove all CoreIP BSPs
Diffstat (limited to 'bsp/coreip-e21-rtl')
-rw-r--r--bsp/coreip-e21-rtl/README.md7
-rw-r--r--bsp/coreip-e21-rtl/design.dts93
-rw-r--r--bsp/coreip-e21-rtl/design.reglist227
-rw-r--r--bsp/coreip-e21-rtl/metal-inline.h154
-rw-r--r--bsp/coreip-e21-rtl/metal-platform.h47
-rw-r--r--bsp/coreip-e21-rtl/metal.default.lds234
-rw-r--r--bsp/coreip-e21-rtl/metal.h762
-rw-r--r--bsp/coreip-e21-rtl/metal.ramrodata.lds235
-rw-r--r--bsp/coreip-e21-rtl/metal.scratchpad.lds234
-rw-r--r--bsp/coreip-e21-rtl/settings.mk15
10 files changed, 0 insertions, 2008 deletions
diff --git a/bsp/coreip-e21-rtl/README.md b/bsp/coreip-e21-rtl/README.md
deleted file mode 100644
index 6b74a44..0000000
--- a/bsp/coreip-e21-rtl/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-The SiFive E21 Standard Core is a high-performance, full-featured embedded processor designed to address advanced microcontroller applications such as Sensor Fusion, Smart IoT, Wearables, Connected Toys, and more. Separate Instruction and Data Buses, along with 2 banks of Tightly Integrated Memory (TIMs) make the E21 an ideal choice for applications with deterministic or demanding memory requirements.
-
-This core target is suitable with Verilog RTL for verification and running application software building on top of freedom-metal libraries. The target supports:
-
-- 1 hart with RV32IMAC core
-- 4 hardware breakpoints
-- Physical Memory Protection with 4 regions
diff --git a/bsp/coreip-e21-rtl/design.dts b/bsp/coreip-e21-rtl/design.dts
deleted file mode 100644
index ed9fa86..0000000
--- a/bsp/coreip-e21-rtl/design.dts
+++ /dev/null
@@ -1,93 +0,0 @@
-/dts-v1/;
-
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "SiFive,FE210G-dev", "fe210-dev", "sifive-dev";
- model = "SiFive,FE210G";
- L14: cpus {
- #address-cells = <1>;
- #size-cells = <0>;
- L4: cpu@0 {
- clock-frequency = <0>;
- compatible = "sifive,caboose0", "riscv";
- device_type = "cpu";
- reg = <0x0>;
- riscv,isa = "rv32imac";
- riscv,pmpregions = <4>;
- status = "okay";
- timebase-frequency = <1000000>;
- hardware-exec-breakpoint-count = <4>;
- L3: interrupt-controller {
- #interrupt-cells = <1>;
- compatible = "riscv,cpu-intc";
- interrupt-controller;
- };
- };
- };
- L13: soc {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "SiFive,FE210G-soc", "fe210-soc", "sifive-soc", "simple-bus";
- ranges;
- L11: ahb-periph-port@20000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "sifive,ahb-periph-port", "sifive,ahb-port", "sifive,periph-port", "simple-bus";
- ranges = <0x20000000 0x20000000 0x20000000>;
- };
- L10: ahb-sys-port@40000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "sifive,ahb-sys-port", "sifive,ahb-port", "sifive,sys-port", "simple-bus";
- ranges = <0x40000000 0x40000000 0x20000000>;
- };
- L2: debug-controller@0 {
- compatible = "sifive,debug-013", "riscv,debug-013";
- interrupts-extended = <&L3 65535>;
- reg = <0x0 0x1000>;
- reg-names = "control";
- };
- L0: error-device@3000 {
- compatible = "sifive,error0";
- reg = <0x3000 0x1000>;
- };
- L1: interrupt-controller@2000000 {
- #interrupt-cells = <1>;
- compatible = "sifive,clic0";
- interrupt-controller;
- interrupts-extended = <&L3 3 &L3 7 &L3 11>;
- reg = <0x2000000 0x1000000>;
- reg-names = "control";
- sifive,numints = <143>;
- sifive,numlevels = <16>;
- sifive,numintbits = <2>;
- };
- L9: local-external-interrupts-0 {
- compatible = "sifive,local-external-interrupts0";
- interrupt-parent = <&L1>;
- interrupts = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126>;
- };
- L6: sys-sram-0@80000000 {
- compatible = "sifive,sram0";
- reg = <0x80000000 0x8000>;
- reg-names = "mem";
- };
- L7: sys-sram-1@80008000 {
- compatible = "sifive,sram0";
- reg = <0x80008000 0x8000>;
- reg-names = "mem";
- };
- L5: teststatus@4000 {
- compatible = "sifive,test0";
- reg = <0x4000 0x1000>;
- reg-names = "control";
- };
- test_memory: testram@20000000 {
- compatible = "sifive,testram0";
- reg = <0x20000000 0x8000000>;
- reg-names = "mem";
- word-size-bytes = <4>;
- };
- };
-};
diff --git a/bsp/coreip-e21-rtl/design.reglist b/bsp/coreip-e21-rtl/design.reglist
deleted file mode 100644
index 27ab72e..0000000
--- a/bsp/coreip-e21-rtl/design.reglist
+++ /dev/null
@@ -1,227 +0,0 @@
-zero
-ra
-sp
-gp
-tp
-t0
-t1
-t2
-fp
-s1
-a0
-a1
-a2
-a3
-a4
-a5
-a6
-a7
-s2
-s3
-s4
-s5
-s6
-s7
-s8
-s9
-s10
-s11
-t3
-t4
-t5
-t6
-pc
-mscratch
-mtval
-cycle
-instret
-hpmcounter3
-hpmcounter4
-hpmcounter5
-hpmcounter6
-hpmcounter7
-hpmcounter8
-hpmcounter9
-hpmcounter10
-hpmcounter11
-hpmcounter12
-hpmcounter13
-hpmcounter14
-hpmcounter15
-hpmcounter16
-hpmcounter17
-hpmcounter18
-hpmcounter19
-hpmcounter20
-hpmcounter21
-hpmcounter22
-hpmcounter23
-hpmcounter24
-hpmcounter25
-hpmcounter26
-hpmcounter27
-hpmcounter28
-hpmcounter29
-hpmcounter30
-hpmcounter31
-cycleh
-instreth
-hpmcounter3h
-hpmcounter4h
-hpmcounter5h
-hpmcounter6h
-hpmcounter7h
-hpmcounter8h
-hpmcounter9h
-hpmcounter10h
-hpmcounter11h
-hpmcounter12h
-hpmcounter13h
-hpmcounter14h
-hpmcounter15h
-hpmcounter16h
-hpmcounter17h
-hpmcounter18h
-hpmcounter19h
-hpmcounter20h
-hpmcounter21h
-hpmcounter22h
-hpmcounter23h
-hpmcounter24h
-hpmcounter25h
-hpmcounter26h
-hpmcounter27h
-hpmcounter28h
-hpmcounter29h
-hpmcounter30h
-hpmcounter31h
-mstatus
-misa
-mie
-mtvec
-mcounteren
-mscratch
-mepc
-mcause
-mtval
-mip
-pmpcfg0
-pmpcfg3
-pmpaddr0
-pmpaddr1
-pmpaddr2
-pmpaddr3
-pmpaddr4
-pmpaddr5
-pmpaddr6
-pmpaddr7
-pmpaddr8
-pmpaddr9
-pmpaddr10
-pmpaddr11
-pmpaddr12
-pmpaddr13
-pmpaddr14
-pmpaddr15
-mhpmevent3
-mhpmevent4
-mhpmevent5
-mhpmevent6
-mhpmevent7
-mhpmevent8
-mhpmevent9
-mhpmevent10
-mhpmevent11
-mhpmevent12
-mhpmevent13
-mhpmevent14
-mhpmevent15
-mhpmevent16
-mhpmevent17
-mhpmevent18
-mhpmevent19
-mhpmevent20
-mhpmevent21
-mhpmevent22
-mhpmevent23
-mhpmevent24
-mhpmevent25
-mhpmevent26
-mhpmevent27
-mhpmevent28
-mhpmevent29
-mhpmevent30
-mhpmevent31
-mvendorid
-marchid
-mimpid
-mhartid
-mcycle
-minstret
-mhpmcounter3
-mhpmcounter4
-mhpmcounter5
-mhpmcounter6
-mhpmcounter7
-mhpmcounter8
-mhpmcounter9
-mhpmcounter10
-mhpmcounter11
-mhpmcounter12
-mhpmcounter13
-mhpmcounter14
-mhpmcounter15
-mhpmcounter16
-mhpmcounter17
-mhpmcounter18
-mhpmcounter19
-mhpmcounter20
-mhpmcounter21
-mhpmcounter22
-mhpmcounter23
-mhpmcounter24
-mhpmcounter25
-mhpmcounter26
-mhpmcounter27
-mhpmcounter28
-mhpmcounter29
-mhpmcounter30
-mhpmcounter31
-mcycleh
-minstreth
-mhpmcounter3h
-mhpmcounter4h
-mhpmcounter5h
-mhpmcounter6h
-mhpmcounter7h
-mhpmcounter8h
-mhpmcounter9h
-mhpmcounter10h
-mhpmcounter11h
-mhpmcounter12h
-mhpmcounter13h
-mhpmcounter14h
-mhpmcounter15h
-mhpmcounter16h
-mhpmcounter17h
-mhpmcounter18h
-mhpmcounter19h
-mhpmcounter20h
-mhpmcounter21h
-mhpmcounter22h
-mhpmcounter23h
-mhpmcounter24h
-mhpmcounter25h
-mhpmcounter26h
-mhpmcounter27h
-mhpmcounter28h
-mhpmcounter29h
-mhpmcounter30h
-mhpmcounter31h
-tselect
-tdata1
-tdata2
-tdata3
-dcsr
-dpc
-dscratch
diff --git a/bsp/coreip-e21-rtl/metal-inline.h b/bsp/coreip-e21-rtl/metal-inline.h
deleted file mode 100644
index 554db54..0000000
--- a/bsp/coreip-e21-rtl/metal-inline.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-#ifndef ASSEMBLY
-
-#ifndef COREIP_E21_RTL__METAL_INLINE_H
-#define COREIP_E21_RTL__METAL_INLINE_H
-
-#include <metal/machine.h>
-
-
-/* --------------------- fixed_clock ------------ */
-
-
-/* --------------------- fixed_factor_clock ------------ */
-
-
-/* --------------------- sifive_clint0 ------------ */
-
-
-/* --------------------- cpu ------------ */
-extern inline int __metal_driver_cpu_hartid(struct metal_cpu *cpu);
-extern inline int __metal_driver_cpu_timebase(struct metal_cpu *cpu);
-extern inline struct metal_interrupt * __metal_driver_cpu_interrupt_controller(struct metal_cpu *cpu);
-extern inline int __metal_driver_cpu_num_pmp_regions(struct metal_cpu *cpu);
-
-
-/* --------------------- sifive_plic0 ------------ */
-
-
-/* --------------------- sifive_clic0 ------------ */
-extern inline unsigned long __metal_driver_sifive_clic0_control_base(struct metal_interrupt *controller);
-extern inline unsigned long __metal_driver_sifive_clic0_control_size(struct metal_interrupt *controller);
-extern inline struct metal_interrupt * __metal_driver_sifive_clic0_interrupt_parent(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_clic0_num_interrupts(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_clic0_interrupt_lines(struct metal_interrupt *controller, int idx);
-extern inline int __metal_driver_sifive_clic0_max_levels(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_clic0_num_subinterrupts(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_clic0_num_intbits(struct metal_interrupt *controller);
-
-
-/* --------------------- sifive_local_external_interrupts0 ------------ */
-extern inline struct metal_interrupt * __metal_driver_sifive_local_external_interrupts0_interrupt_parent(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_local_external_interrupts0_num_interrupts(struct metal_interrupt *controller);
-extern inline int __metal_driver_sifive_local_external_interrupts0_interrupt_lines(struct metal_interrupt *controller, int idx);
-
-
-/* --------------------- sifive_global_external_interrupts0 ------------ */
-
-
-/* --------------------- sifive_gpio0 ------------ */
-
-
-/* --------------------- sifive_gpio_button ------------ */
-
-
-/* --------------------- sifive_gpio_led ------------ */
-
-
-/* --------------------- sifive_gpio_switch ------------ */
-
-
-/* --------------------- sifive_spi0 ------------ */
-
-
-/* --------------------- sifive_test0 ------------ */
-extern inline unsigned long __metal_driver_sifive_test0_base( );
-extern inline unsigned long __metal_driver_sifive_test0_size( );
-
-
-/* --------------------- sifive_uart0 ------------ */
-
-
-/* --------------------- sifive_fe310_g000_hfrosc ------------ */
-
-
-/* --------------------- sifive_fe310_g000_hfxosc ------------ */
-
-
-/* --------------------- sifive_fe310_g000_pll ------------ */
-
-
-/* --------------------- fe310_g000_prci ------------ */
-
-
-/* --------------------- sifive_fu540_c000_l2 ------------ */
-
-
-struct metal_memory __metal_dt_mem_sys_sram_0_80000000 = {
- ._base_address = 2147483648UL,
- ._size = 32768UL,
- ._attrs = {
- .R = 1,
- .W = 1,
- .X = 1,
- .C = 1,
- .A = 1},
-};
-
-struct metal_memory __metal_dt_mem_sys_sram_1_80008000 = {
- ._base_address = 2147516416UL,
- ._size = 32768UL,
- ._attrs = {
- .R = 1,
- .W = 1,
- .X = 1,
- .C = 1,
- .A = 1},
-};
-
-struct metal_memory __metal_dt_mem_testram_20000000 = {
- ._base_address = 536870912UL,
- ._size = 134217728UL,
- ._attrs = {
- .R = 1,
- .W = 1,
- .X = 1,
- .C = 1,
- .A = 1},
-};
-
-/* From cpu@0 */
-struct __metal_driver_cpu __metal_dt_cpu_0 = {
- .cpu.vtable = &__metal_driver_vtable_cpu.cpu_vtable,
-};
-
-/* From interrupt_controller */
-struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller = {
- .controller.vtable = &__metal_driver_vtable_riscv_cpu_intc.controller_vtable,
- .init_done = 0,
-};
-
-/* From interrupt_controller@2000000 */
-struct __metal_driver_sifive_clic0 __metal_dt_interrupt_controller_2000000 = {
- .controller.vtable = &__metal_driver_vtable_sifive_clic0.clic_vtable,
- .init_done = 0,
-};
-
-/* From local_external_interrupts_0 */
-struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0 = {
- .irc.vtable = &__metal_driver_vtable_sifive_local_external_interrupts0.local0_vtable,
- .init_done = 0,
-};
-
-/* From teststatus@4000 */
-struct __metal_driver_sifive_test0 __metal_dt_teststatus_4000 = {
- .shutdown.vtable = &__metal_driver_vtable_sifive_test0.shutdown,
-};
-
-
-#endif /* COREIP_E21_RTL__METAL_INLINE_H*/
-#endif /* ! ASSEMBLY */
diff --git a/bsp/coreip-e21-rtl/metal-platform.h b/bsp/coreip-e21-rtl/metal-platform.h
deleted file mode 100644
index 3cfaf5d..0000000
--- a/bsp/coreip-e21-rtl/metal-platform.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-#ifndef COREIP_E21_RTL__METAL_PLATFORM_H
-#define COREIP_E21_RTL__METAL_PLATFORM_H
-
-/* From interrupt_controller@2000000 */
-#define METAL_SIFIVE_CLIC0_2000000_BASE_ADDRESS 33554432UL
-#define METAL_SIFIVE_CLIC0_0_BASE_ADDRESS 33554432UL
-#define METAL_SIFIVE_CLIC0_2000000_SIZE 16777216UL
-#define METAL_SIFIVE_CLIC0_0_SIZE 16777216UL
-#define METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMINTS 143UL
-#define METAL_SIFIVE_CLIC0_0_SIFIVE_NUMINTS 143UL
-#define METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMLEVELS 16UL
-#define METAL_SIFIVE_CLIC0_0_SIFIVE_NUMLEVELS 16UL
-#define METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMINTBITS 2UL
-#define METAL_SIFIVE_CLIC0_0_SIFIVE_NUMINTBITS 2UL
-
-#define METAL_SIFIVE_CLIC0
-#define METAL_SIFIVE_CLIC0_MSIP_BASE 0UL
-#define METAL_SIFIVE_CLIC0_MTIMECMP_BASE 16384UL
-#define METAL_SIFIVE_CLIC0_MTIME 49144UL
-#define METAL_SIFIVE_CLIC0_CLICINTIP_BASE 0UL
-#define METAL_SIFIVE_CLIC0_CLICINTIE_BASE 1024UL
-#define METAL_SIFIVE_CLIC0_CLICINTCTL_BASE 2048UL
-#define METAL_SIFIVE_CLIC0_CLICCFG 3072UL
-#define METAL_SIFIVE_CLIC0_MMODE_APERTURE 8388608UL
-#define METAL_SIFIVE_CLIC0_HSMODE_APERTURE 10485760UL
-#define METAL_SIFIVE_CLIC0_SMODE_APERTURE 12582912UL
-#define METAL_SIFIVE_CLIC0_UMODE_APERTURE 14680064UL
-
-/* From local_external_interrupts_0 */
-
-#define METAL_SIFIVE_LOCAL_EXTERNAL_INTERRUPTS0
-
-/* From teststatus@4000 */
-#define METAL_SIFIVE_TEST0_4000_BASE_ADDRESS 16384UL
-#define METAL_SIFIVE_TEST0_0_BASE_ADDRESS 16384UL
-#define METAL_SIFIVE_TEST0_4000_SIZE 4096UL
-#define METAL_SIFIVE_TEST0_0_SIZE 4096UL
-
-#define METAL_SIFIVE_TEST0
-#define METAL_SIFIVE_TEST0_FINISHER_OFFSET 0UL
-
-#endif /* COREIP_E21_RTL__METAL_PLATFORM_H*/
diff --git a/bsp/coreip-e21-rtl/metal.default.lds b/bsp/coreip-e21-rtl/metal.default.lds
deleted file mode 100644
index e3965ae..0000000
--- a/bsp/coreip-e21-rtl/metal.default.lds
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-OUTPUT_ARCH("riscv")
-
-ENTRY(_enter)
-
-MEMORY
-{
- flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 0x8000000
- ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x8000
- itim (wx!rai) : ORIGIN = 0x80008000, LENGTH = 0x8000
-}
-
-PHDRS
-{
- flash PT_LOAD;
- ram_init PT_LOAD;
- itim_init PT_LOAD;
- ram PT_NULL;
- itim PT_NULL;
-}
-
-SECTIONS
-{
- __stack_size = DEFINED(__stack_size) ? __stack_size : 0x400;
- PROVIDE(__stack_size = __stack_size);
- __heap_size = DEFINED(__heap_size) ? __heap_size : 0x400;
- PROVIDE(__metal_boot_hart = 0);
- PROVIDE(__metal_chicken_bit = 0);
-
-
- .init :
- {
- KEEP (*(.text.metal.init.enter))
- KEEP (*(SORT_NONE(.init)))
- KEEP (*(.text.libgloss.start))
- } >flash AT>flash :flash
-
-
- .text :
- {
- *(.text.unlikely .text.unlikely.*)
- *(.text.startup .text.startup.*)
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- } >flash AT>flash :flash
-
-
- .fini :
- {
- KEEP (*(SORT_NONE(.fini)))
- } >flash AT>flash :flash
-
-
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
-
- .rodata :
- {
- *(.rdata)
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- . = ALIGN(8);
- *(.srodata.cst16)
- *(.srodata.cst8)
- *(.srodata.cst4)
- *(.srodata.cst2)
- *(.srodata .srodata.*)
- } >flash AT>flash :flash
-
-
- . = ALIGN(4);
-
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >flash AT>flash :flash
-
-
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
- KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >flash AT>flash :flash
-
-
- .finit_array :
- {
- PROVIDE_HIDDEN (__finit_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
- KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
- PROVIDE_HIDDEN (__finit_array_end = .);
- } >flash AT>flash :flash
-
-
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin.o(.ctors))
- KEEP (*crtbegin?.o(.ctors))
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >flash AT>flash :flash
-
-
- .dtors :
- {
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >flash AT>flash :flash
-
-
- .litimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_source_start = . );
- } >flash AT>flash :flash
-
-
- .ditimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_target_start = . );
- } >itim AT>flash :itim_init
-
-
- .itim :
- {
- *(.itim .itim.*)
- } >itim AT>flash :itim_init
-
-
- . = ALIGN(8);
- PROVIDE( metal_segment_itim_target_end = . );
-
-
- .lalign :
- {
- . = ALIGN(4);
- PROVIDE( _data_lma = . );
- PROVIDE( metal_segment_data_source_start = . );
- } >flash AT>flash :flash
-
-
- .dalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_data_target_start = . );
- } >ram AT>flash :ram_init
-
-
- .data :
- {
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- . = ALIGN(8);
- PROVIDE( __global_pointer$ = . + 0x800 );
- *(.sdata .sdata.* .sdata2.*)
- *(.gnu.linkonce.s.*)
- } >ram AT>flash :ram_init
-
-
- . = ALIGN(4);
- PROVIDE( _edata = . );
- PROVIDE( edata = . );
- PROVIDE( metal_segment_data_target_end = . );
- PROVIDE( _fbss = . );
- PROVIDE( __bss_start = . );
- PROVIDE( metal_segment_bss_target_start = . );
-
-
- .bss :
- {
- *(.sbss*)
- *(.gnu.linkonce.sb.*)
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >ram AT>ram :ram
-
-
- . = ALIGN(8);
- PROVIDE( _end = . );
- PROVIDE( end = . );
- PROVIDE( metal_segment_bss_target_end = . );
-
-
- .stack :
- {
- PROVIDE(metal_segment_stack_begin = .);
- . = __stack_size;
- PROVIDE( _sp = . );
- PROVIDE(metal_segment_stack_end = .);
- } >ram AT>ram :ram
-
-
- .heap :
- {
- PROVIDE( metal_segment_heap_target_start = . );
- . = __heap_size;
- PROVIDE( metal_segment_heap_target_end = . );
- PROVIDE( _heap_end = . );
- } >ram AT>ram :ram
-
-
-}
-
diff --git a/bsp/coreip-e21-rtl/metal.h b/bsp/coreip-e21-rtl/metal.h
deleted file mode 100644
index b20f279..0000000
--- a/bsp/coreip-e21-rtl/metal.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-#ifndef ASSEMBLY
-
-#include <metal/machine/platform.h>
-
-#ifdef __METAL_MACHINE_MACROS
-
-#ifndef MACROS_IF_COREIP_E21_RTL__METAL_H
-#define MACROS_IF_COREIP_E21_RTL__METAL_H
-
-#ifndef __METAL_CLINT_NUM_PARENTS
-#define __METAL_CLINT_NUM_PARENTS 0
-#endif
-#ifndef __METAL_PLIC_SUBINTERRUPTS
-#define __METAL_PLIC_SUBINTERRUPTS 0
-#endif
-#ifndef __METAL_PLIC_NUM_PARENTS
-#define __METAL_PLIC_NUM_PARENTS 0
-#endif
-#define __METAL_CLIC_SUBINTERRUPTS 143
-
-#ifndef __METAL_CLIC_SUBINTERRUPTS
-#define __METAL_CLIC_SUBINTERRUPTS 0
-#endif
-
-#endif /* MACROS_IF_COREIP_E21_RTL__METAL_H*/
-
-#else /* ! __METAL_MACHINE_MACROS */
-
-#ifndef MACROS_ELSE_COREIP_E21_RTL__METAL_H
-#define MACROS_ELSE_COREIP_E21_RTL__METAL_H
-
-#define METAL_MAX_CLINT_INTERRUPTS 0
-
-#define __METAL_CLINT_NUM_PARENTS 0
-
-#define __METAL_PLIC_SUBINTERRUPTS 0
-#define METAL_MAX_PLIC_INTERRUPTS 0
-
-#define __METAL_PLIC_NUM_PARENTS 0
-
-#define __METAL_INTERRUPT_CONTROLLER_2000000_INTERRUPTS 3
-
-#define __METAL_CLIC_SUBINTERRUPTS 143
-
-#define METAL_MAX_CLIC_INTERRUPTS 3
-
-#define __METAL_LOCAL_EXTERNAL_INTERRUPTS_0_INTERRUPTS 127
-
-#define METAL_MAX_LOCAL_EXT_INTERRUPTS 127
-
-#define METAL_MAX_GLOBAL_EXT_INTERRUPTS 0
-
-#define METAL_MAX_GPIO_INTERRUPTS 0
-
-#define METAL_MAX_UART_INTERRUPTS 0
-
-
-#include <metal/drivers/fixed-clock.h>
-#include <metal/memory.h>
-#include <metal/drivers/riscv_cpu.h>
-#include <metal/pmp.h>
-#include <metal/drivers/sifive_clic0.h>
-#include <metal/drivers/sifive_local-external-interrupts0.h>
-#include <metal/drivers/sifive_test0.h>
-
-struct metal_memory __metal_dt_mem_sys_sram_0_80000000;
-
-struct metal_memory __metal_dt_mem_sys_sram_1_80008000;
-
-struct metal_memory __metal_dt_mem_testram_20000000;
-
-/* From cpu@0 */
-struct __metal_driver_cpu __metal_dt_cpu_0;
-
-struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller;
-
-struct metal_pmp __metal_dt_pmp;
-
-/* From interrupt_controller@2000000 */
-struct __metal_driver_sifive_clic0 __metal_dt_interrupt_controller_2000000;
-
-/* From local_external_interrupts_0 */
-struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0;
-
-/* From teststatus@4000 */
-struct __metal_driver_sifive_test0 __metal_dt_teststatus_4000;
-
-
-
-/* --------------------- fixed_clock ------------ */
-
-
-/* --------------------- fixed_factor_clock ------------ */
-
-
-/* --------------------- sifive_clint0 ------------ */
-
-
-/* --------------------- cpu ------------ */
-static inline int __metal_driver_cpu_hartid(struct metal_cpu *cpu)
-{
- if ((uintptr_t)cpu == (uintptr_t)&__metal_dt_cpu_0) {
- return 0;
- }
- else {
- return -1;
- }
-}
-
-static inline int __metal_driver_cpu_timebase(struct metal_cpu *cpu)
-{
- if ((uintptr_t)cpu == (uintptr_t)&__metal_dt_cpu_0) {
- return 1000000;
- }
- else {
- return 0;
- }
-}
-
-static inline struct metal_interrupt * __metal_driver_cpu_interrupt_controller(struct metal_cpu *cpu)
-{
- if ((uintptr_t)cpu == (uintptr_t)&__metal_dt_cpu_0) {
- return &__metal_dt_cpu_0_interrupt_controller.controller;
- }
- else {
- return NULL;
- }
-}
-
-static inline int __metal_driver_cpu_num_pmp_regions(struct metal_cpu *cpu)
-{
- if ((uintptr_t)cpu == (uintptr_t)&__metal_dt_cpu_0) {
- return 4;
- }
- else {
- return 0;
- }
-}
-
-
-
-/* --------------------- sifive_plic0 ------------ */
-
-
-/* --------------------- sifive_clic0 ------------ */
-static inline unsigned long __metal_driver_sifive_clic0_control_base(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_SIFIVE_CLIC0_2000000_BASE_ADDRESS;
- }
- else {
- return 0;
- }
-}
-
-static inline unsigned long __metal_driver_sifive_clic0_control_size(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_SIFIVE_CLIC0_2000000_SIZE;
- }
- else {
- return 0;
- }
-}
-
-static inline int __metal_driver_sifive_clic0_num_interrupts(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_MAX_CLIC_INTERRUPTS;
- }
- else {
- return 0;
- }
-}
-
-static inline struct metal_interrupt * __metal_driver_sifive_clic0_interrupt_parent(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return (struct metal_interrupt *)&__metal_dt_cpu_0_interrupt_controller.controller;
- }
- else {
- return NULL;
- }
-}
-
-static inline int __metal_driver_sifive_clic0_interrupt_lines(struct metal_interrupt *controller, int idx)
-{
- if (idx == 0) {
- return 3;
- }
- else if (idx == 1) {
- return 3;
- }
- else if (idx == 2) {
- return 7;
- }
- else if (idx == 3) {
- return 11;
- }
- else {
- return 0;
- }
-}
-
-static inline int __metal_driver_sifive_clic0_max_levels(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMLEVELS;
- }
- else {
- return 0;
- }
-}
-
-static inline int __metal_driver_sifive_clic0_num_subinterrupts(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMINTS;
- }
- else {
- return 0;
- }
-}
-
-static inline int __metal_driver_sifive_clic0_num_intbits(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_interrupt_controller_2000000) {
- return METAL_SIFIVE_CLIC0_2000000_SIFIVE_NUMINTBITS;
- }
- else {
- return 0;
- }
-}
-
-
-
-/* --------------------- sifive_local_external_interrupts0 ------------ */
-static inline struct metal_interrupt * __metal_driver_sifive_local_external_interrupts0_interrupt_parent(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_local_external_interrupts_0) {
- return (struct metal_interrupt *)&__metal_dt_interrupt_controller_2000000.controller;
- }
- else {
- return NULL;
- }
-}
-
-static inline int __metal_driver_sifive_local_external_interrupts0_num_interrupts(struct metal_interrupt *controller)
-{
- if ((uintptr_t)controller == (uintptr_t)&__metal_dt_local_external_interrupts_0) {
- return METAL_MAX_LOCAL_EXT_INTERRUPTS;
- }
- else {
- return 0;
- }
-}
-
-static inline int __metal_driver_sifive_local_external_interrupts0_interrupt_lines(struct metal_interrupt *controller, int idx)
-{
- if (idx == 0) {
- return 0;
- }
- else if (idx == 1) {
- return 1;
- }
- else if (idx == 2) {
- return 2;
- }
- else if (idx == 3) {
- return 3;
- }
- else if (idx == 4) {
- return 4;
- }
- else if (idx == 5) {
- return 5;
- }
- else if (idx == 6) {
- return 6;
- }
- else if (idx == 7) {
- return 7;
- }
- else if (idx == 8) {
- return 8;
- }
- else if (idx == 9) {
- return 9;
- }
- else if (idx == 10) {
- return 10;
- }
- else if (idx == 11) {
- return 11;
- }
- else if (idx == 12) {
- return 12;
- }
- else if (idx == 13) {
- return 13;
- }
- else if (idx == 14) {
- return 14;
- }
- else if (idx == 15) {
- return 15;
- }
- else if (idx == 16) {
- return 16;
- }
- else if (idx == 17) {
- return 17;
- }
- else if (idx == 18) {
- return 18;
- }
- else if (idx == 19) {
- return 19;
- }
- else if (idx == 20) {
- return 20;
- }
- else if (idx == 21) {
- return 21;
- }
- else if (idx == 22) {
- return 22;
- }
- else if (idx == 23) {
- return 23;
- }
- else if (idx == 24) {
- return 24;
- }
- else if (idx == 25) {
- return 25;
- }
- else if (idx == 26) {
- return 26;
- }
- else if (idx == 27) {
- return 27;
- }
- else if (idx == 28) {
- return 28;
- }
- else if (idx == 29) {
- return 29;
- }
- else if (idx == 30) {
- return 30;
- }
- else if (idx == 31) {
- return 31;
- }
- else if (idx == 32) {
- return 32;
- }
- else if (idx == 33) {
- return 33;
- }
- else if (idx == 34) {
- return 34;
- }
- else if (idx == 35) {
- return 35;
- }
- else if (idx == 36) {
- return 36;
- }
- else if (idx == 37) {
- return 37;
- }
- else if (idx == 38) {
- return 38;
- }
- else if (idx == 39) {
- return 39;
- }
- else if (idx == 40) {
- return 40;
- }
- else if (idx == 41) {
- return 41;
- }
- else if (idx == 42) {
- return 42;
- }
- else if (idx == 43) {
- return 43;
- }
- else if (idx == 44) {
- return 44;
- }
- else if (idx == 45) {
- return 45;
- }
- else if (idx == 46) {
- return 46;
- }
- else if (idx == 47) {
- return 47;
- }
- else if (idx == 48) {
- return 48;
- }
- else if (idx == 49) {
- return 49;
- }
- else if (idx == 50) {
- return 50;
- }
- else if (idx == 51) {
- return 51;
- }
- else if (idx == 52) {
- return 52;
- }
- else if (idx == 53) {
- return 53;
- }
- else if (idx == 54) {
- return 54;
- }
- else if (idx == 55) {
- return 55;
- }
- else if (idx == 56) {
- return 56;
- }
- else if (idx == 57) {
- return 57;
- }
- else if (idx == 58) {
- return 58;
- }
- else if (idx == 59) {
- return 59;
- }
- else if (idx == 60) {
- return 60;
- }
- else if (idx == 61) {
- return 61;
- }
- else if (idx == 62) {
- return 62;
- }
- else if (idx == 63) {
- return 63;
- }
- else if (idx == 64) {
- return 64;
- }
- else if (idx == 65) {
- return 65;
- }
- else if (idx == 66) {
- return 66;
- }
- else if (idx == 67) {
- return 67;
- }
- else if (idx == 68) {
- return 68;
- }
- else if (idx == 69) {
- return 69;
- }
- else if (idx == 70) {
- return 70;
- }
- else if (idx == 71) {
- return 71;
- }
- else if (idx == 72) {
- return 72;
- }
- else if (idx == 73) {
- return 73;
- }
- else if (idx == 74) {
- return 74;
- }
- else if (idx == 75) {
- return 75;
- }
- else if (idx == 76) {
- return 76;
- }
- else if (idx == 77) {
- return 77;
- }
- else if (idx == 78) {
- return 78;
- }
- else if (idx == 79) {
- return 79;
- }
- else if (idx == 80) {
- return 80;
- }
- else if (idx == 81) {
- return 81;
- }
- else if (idx == 82) {
- return 82;
- }
- else if (idx == 83) {
- return 83;
- }
- else if (idx == 84) {
- return 84;
- }
- else if (idx == 85) {
- return 85;
- }
- else if (idx == 86) {
- return 86;
- }
- else if (idx == 87) {
- return 87;
- }
- else if (idx == 88) {
- return 88;
- }
- else if (idx == 89) {
- return 89;
- }
- else if (idx == 90) {
- return 90;
- }
- else if (idx == 91) {
- return 91;
- }
- else if (idx == 92) {
- return 92;
- }
- else if (idx == 93) {
- return 93;
- }
- else if (idx == 94) {
- return 94;
- }
- else if (idx == 95) {
- return 95;
- }
- else if (idx == 96) {
- return 96;
- }
- else if (idx == 97) {
- return 97;
- }
- else if (idx == 98) {
- return 98;
- }
- else if (idx == 99) {
- return 99;
- }
- else if (idx == 100) {
- return 100;
- }
- else if (idx == 101) {
- return 101;
- }
- else if (idx == 102) {
- return 102;
- }
- else if (idx == 103) {
- return 103;
- }
- else if (idx == 104) {
- return 104;
- }
- else if (idx == 105) {
- return 105;
- }
- else if (idx == 106) {
- return 106;
- }
- else if (idx == 107) {
- return 107;
- }
- else if (idx == 108) {
- return 108;
- }
- else if (idx == 109) {
- return 109;
- }
- else if (idx == 110) {
- return 110;
- }
- else if (idx == 111) {
- return 111;
- }
- else if (idx == 112) {
- return 112;
- }
- else if (idx == 113) {
- return 113;
- }
- else if (idx == 114) {
- return 114;
- }
- else if (idx == 115) {
- return 115;
- }
- else if (idx == 116) {
- return 116;
- }
- else if (idx == 117) {
- return 117;
- }
- else if (idx == 118) {
- return 118;
- }
- else if (idx == 119) {
- return 119;
- }
- else if (idx == 120) {
- return 120;
- }
- else if (idx == 121) {
- return 121;
- }
- else if (idx == 122) {
- return 122;
- }
- else if (idx == 123) {
- return 123;
- }
- else if (idx == 124) {
- return 124;
- }
- else if (idx == 125) {
- return 125;
- }
- else if (idx == 126) {
- return 126;
- }
- else {
- return 0;
- }
-}
-
-
-
-/* --------------------- sifive_global_external_interrupts0 ------------ */
-
-
-/* --------------------- sifive_gpio0 ------------ */
-
-
-/* --------------------- sifive_gpio_button ------------ */
-
-
-/* --------------------- sifive_gpio_led ------------ */
-
-
-/* --------------------- sifive_gpio_switch ------------ */
-
-
-/* --------------------- sifive_spi0 ------------ */
-
-
-/* --------------------- sifive_test0 ------------ */
-static inline unsigned long __metal_driver_sifive_test0_base( )
-{
- return 16384;
-}
-
-static inline unsigned long __metal_driver_sifive_test0_size( )
-{
- return 4096;
-}
-
-
-
-/* --------------------- sifive_uart0 ------------ */
-
-
-/* --------------------- sifive_fe310_g000_hfrosc ------------ */
-
-
-/* --------------------- sifive_fe310_g000_hfxosc ------------ */
-
-
-/* --------------------- sifive_fe310_g000_pll ------------ */
-
-
-/* --------------------- sifive_fe310_g000_prci ------------ */
-
-
-/* --------------------- sifive_fu540_c000_l2 ------------ */
-
-
-#define __METAL_DT_MAX_MEMORIES 3
-
-asm (".weak __metal_memory_table");
-struct metal_memory *__metal_memory_table[] = {
- &__metal_dt_mem_sys_sram_0_80000000,
- &__metal_dt_mem_sys_sram_1_80008000,
- &__metal_dt_mem_testram_20000000};
-
-#define __METAL_DT_MAX_HARTS 1
-
-asm (".weak __metal_cpu_table");
-struct __metal_driver_cpu *__metal_cpu_table[] = {
- &__metal_dt_cpu_0};
-
-#define __METAL_DT_PMP_HANDLE (&__metal_dt_pmp)
-
-/* From interrupt_controller@2000000 */
-#define __METAL_DT_SIFIVE_CLIC0_HANDLE (&__metal_dt_interrupt_controller_2000000.controller)
-
-#define __METAL_DT_INTERRUPT_CONTROLLER_2000000_HANDLE (&__metal_dt_interrupt_controller_2000000.controller)
-
-/* From local_external_interrupts_0 */
-#define __METAL_DT_SIFIVE_LOCAL_EXINTR0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
-
-#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
-
-#define __MEE_DT_MAX_GPIOS 0
-
-asm (".weak __metal_gpio_table");
-struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
- NULL };
-#define __METAL_DT_MAX_BUTTONS 0
-
-asm (".weak __metal_button_table");
-struct __metal_driver_sifive_gpio_button *__metal_button_table[] = {
- NULL };
-#define __METAL_DT_MAX_LEDS 0
-
-asm (".weak __metal_led_table");
-struct __metal_driver_sifive_gpio_led *__metal_led_table[] = {
- NULL };
-#define __METAL_DT_MAX_SWITCHES 0
-
-asm (".weak __metal_switch_table");
-struct __metal_driver_sifive_gpio_switch *__metal_switch_table[] = {
- NULL };
-#define __METAL_DT_MAX_SPIS 0
-
-asm (".weak __metal_spi_table");
-struct __metal_driver_sifive_spi0 *__metal_spi_table[] = {
- NULL };
-/* From teststatus@4000 */
-#define __METAL_DT_SHUTDOWN_HANDLE (&__metal_dt_teststatus_4000.shutdown)
-
-#define __METAL_DT_TESTSTATUS_4000_HANDLE (&__metal_dt_teststatus_4000.shutdown)
-
-#endif /* MACROS_ELSE_COREIP_E21_RTL__METAL_H*/
-
-#endif /* ! __METAL_MACHINE_MACROS */
-
-#endif /* ! ASSEMBLY */
diff --git a/bsp/coreip-e21-rtl/metal.ramrodata.lds b/bsp/coreip-e21-rtl/metal.ramrodata.lds
deleted file mode 100644
index 4dde16c..0000000
--- a/bsp/coreip-e21-rtl/metal.ramrodata.lds
+++ /dev/null
@@ -1,235 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-OUTPUT_ARCH("riscv")
-
-ENTRY(_enter)
-
-MEMORY
-{
- flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 0x8000000
- ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x8000
- itim (wx!rai) : ORIGIN = 0x80008000, LENGTH = 0x8000
-}
-
-PHDRS
-{
- flash PT_LOAD;
- ram_init PT_LOAD;
- itim_init PT_LOAD;
- ram PT_NULL;
- itim PT_NULL;
-}
-
-SECTIONS
-{
- __stack_size = DEFINED(__stack_size) ? __stack_size : 0x400;
- PROVIDE(__stack_size = __stack_size);
- __heap_size = DEFINED(__heap_size) ? __heap_size : 0x400;
- PROVIDE(__metal_boot_hart = 0);
- PROVIDE(__metal_chicken_bit = 0);
-
-
- .init :
- {
- KEEP (*(.text.metal.init.enter))
- KEEP (*(SORT_NONE(.init)))
- KEEP (*(.text.libgloss.start))
- } >flash AT>flash :flash
-
-
-
-
- .fini :
- {
- KEEP (*(SORT_NONE(.fini)))
- } >flash AT>flash :flash
-
-
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
-
-
-
- . = ALIGN(4);
-
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >flash AT>flash :flash
-
-
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
- KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >flash AT>flash :flash
-
-
- .finit_array :
- {
- PROVIDE_HIDDEN (__finit_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
- KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
- PROVIDE_HIDDEN (__finit_array_end = .);
- } >flash AT>flash :flash
-
-
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin.o(.ctors))
- KEEP (*crtbegin?.o(.ctors))
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >flash AT>flash :flash
-
-
- .dtors :
- {
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >flash AT>flash :flash
-
-
- .litimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_source_start = . );
- } >flash AT>flash :flash
-
-
- .ditimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_target_start = . );
- } >itim AT>flash :itim_init
-
-
- .itim :
- {
- *(.itim .itim.*)
- *(.text.unlikely .text.unlikely.*)
- *(.text.startup .text.startup.*)
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- } >itim AT>flash :itim_init
-
-
- . = ALIGN(8);
- PROVIDE( metal_segment_itim_target_end = . );
- .text :
- {
- *(.text.unlikely .text.unlikely.*)
- *(.text.startup .text.startup.*)
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- } >itim AT>flash :flash
-
-
- .lalign :
- {
- . = ALIGN(4);
- PROVIDE( _data_lma = . );
- PROVIDE( metal_segment_data_source_start = . );
- } >flash AT>flash :flash
-
-
- .dalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_data_target_start = . );
- } >ram AT>flash :ram_init
-
-
- .data :
- {
- *(.rdata)
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- . = ALIGN(8);
- *(.srodata.cst16)
- *(.srodata.cst8)
- *(.srodata.cst4)
- *(.srodata.cst2)
- *(.srodata .srodata.*)
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- . = ALIGN(8);
- PROVIDE( __global_pointer$ = . + 0x800 );
- *(.sdata .sdata.* .sdata2.*)
- *(.gnu.linkonce.s.*)
- } >ram AT>flash :ram_init
-
-
- . = ALIGN(4);
- PROVIDE( _edata = . );
- PROVIDE( edata = . );
- PROVIDE( metal_segment_data_target_end = . );
- PROVIDE( _fbss = . );
- PROVIDE( __bss_start = . );
- PROVIDE( metal_segment_bss_target_start = . );
-
-
- .bss :
- {
- *(.sbss*)
- *(.gnu.linkonce.sb.*)
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >ram AT>ram :ram
-
-
- . = ALIGN(8);
- PROVIDE( _end = . );
- PROVIDE( end = . );
- PROVIDE( metal_segment_bss_target_end = . );
-
-
- .stack :
- {
- PROVIDE(metal_segment_stack_begin = .);
- . = __stack_size;
- PROVIDE( _sp = . );
- PROVIDE(metal_segment_stack_end = .);
- } >ram AT>ram :ram
-
-
- .heap :
- {
- PROVIDE( metal_segment_heap_target_start = . );
- . = __heap_size;
- PROVIDE( metal_segment_heap_target_end = . );
- PROVIDE( _heap_end = . );
- } >ram AT>ram :ram
-
-
-}
-
diff --git a/bsp/coreip-e21-rtl/metal.scratchpad.lds b/bsp/coreip-e21-rtl/metal.scratchpad.lds
deleted file mode 100644
index b4236fd..0000000
--- a/bsp/coreip-e21-rtl/metal.scratchpad.lds
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Copyright 2019 SiFive, Inc */
-/* SPDX-License-Identifier: Apache-2.0 */
-/* ----------------------------------- */
-/* ----------------------------------- */
-
-OUTPUT_ARCH("riscv")
-
-ENTRY(_enter)
-
-MEMORY
-{
- flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 0x8000000
- ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x8000
- itim (wx!rai) : ORIGIN = 0x80008000, LENGTH = 0x8000
-}
-
-PHDRS
-{
- flash PT_LOAD;
- ram_init PT_LOAD;
- itim_init PT_LOAD;
- ram PT_LOAD;
- itim PT_LOAD;
-}
-
-SECTIONS
-{
- __stack_size = DEFINED(__stack_size) ? __stack_size : 0x400;
- PROVIDE(__stack_size = __stack_size);
- __heap_size = DEFINED(__heap_size) ? __heap_size : 0x400;
- PROVIDE(__metal_boot_hart = 0);
- PROVIDE(__metal_chicken_bit = 0);
-
-
- .init :
- {
- KEEP (*(.text.metal.init.enter))
- KEEP (*(SORT_NONE(.init)))
- KEEP (*(.text.libgloss.start))
- } >ram AT>ram :ram
-
-
- .text :
- {
- *(.text.unlikely .text.unlikely.*)
- *(.text.startup .text.startup.*)
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- } >ram AT>ram :ram
-
-
- .fini :
- {
- KEEP (*(SORT_NONE(.fini)))
- } >ram AT>ram :ram
-
-
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
-
- .rodata :
- {
- *(.rdata)
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- . = ALIGN(8);
- *(.srodata.cst16)
- *(.srodata.cst8)
- *(.srodata.cst4)
- *(.srodata.cst2)
- *(.srodata .srodata.*)
- } >ram AT>ram :ram
-
-
- . = ALIGN(4);
-
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >ram AT>ram :ram
-
-
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
- KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >ram AT>ram :ram
-
-
- .finit_array :
- {
- PROVIDE_HIDDEN (__finit_array_start = .);
- KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
- KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
- PROVIDE_HIDDEN (__finit_array_end = .);
- } >ram AT>ram :ram
-
-
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin.o(.ctors))
- KEEP (*crtbegin?.o(.ctors))
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >ram AT>ram :ram
-
-
- .dtors :
- {
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >ram AT>ram :ram
-
-
- .litimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_source_start = . );
- } >ram AT>ram :ram
-
-
- .ditimalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_itim_target_start = . );
- } >itim AT>ram :itim_init
-
-
- .itim :
- {
- *(.itim .itim.*)
- } >itim AT>ram :itim_init
-
-
- . = ALIGN(8);
- PROVIDE( metal_segment_itim_target_end = . );
-
-
- .lalign :
- {
- . = ALIGN(4);
- PROVIDE( _data_lma = . );
- PROVIDE( metal_segment_data_source_start = . );
- } >ram AT>ram :ram
-
-
- .dalign :
- {
- . = ALIGN(4);
- PROVIDE( metal_segment_data_target_start = . );
- } >ram AT>ram :ram_init
-
-
- .data :
- {
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- . = ALIGN(8);
- PROVIDE( __global_pointer$ = . + 0x800 );
- *(.sdata .sdata.* .sdata2.*)
- *(.gnu.linkonce.s.*)
- } >ram AT>ram :ram_init
-
-
- . = ALIGN(4);
- PROVIDE( _edata = . );
- PROVIDE( edata = . );
- PROVIDE( metal_segment_data_target_end = . );
- PROVIDE( _fbss = . );
- PROVIDE( __bss_start = . );
- PROVIDE( metal_segment_bss_target_start = . );
-
-
- .bss :
- {
- *(.sbss*)
- *(.gnu.linkonce.sb.*)
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >ram AT>ram :ram
-
-
- . = ALIGN(8);
- PROVIDE( _end = . );
- PROVIDE( end = . );
- PROVIDE( metal_segment_bss_target_end = . );
-
-
- .stack :
- {
- PROVIDE(metal_segment_stack_begin = .);
- . = __stack_size;
- PROVIDE( _sp = . );
- PROVIDE(metal_segment_stack_end = .);
- } >ram AT>ram :ram
-
-
- .heap :
- {
- PROVIDE( metal_segment_heap_target_start = . );
- . = __heap_size;
- PROVIDE( metal_segment_heap_target_end = . );
- PROVIDE( _heap_end = . );
- } >ram AT>ram :ram
-
-
-}
-
diff --git a/bsp/coreip-e21-rtl/settings.mk b/bsp/coreip-e21-rtl/settings.mk
deleted file mode 100644
index af81896..0000000
--- a/bsp/coreip-e21-rtl/settings.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2019 SiFive, Inc #
-# SPDX-License-Identifier: Apache-2.0 #
-# ----------------------------------- #
-# ----------------------------------- #
-
-RISCV_ARCH=rv32imac
-RISCV_ABI=ilp32
-RISCV_CMODEL=medlow
-RISCV_SERIES=sifive-2-series
-
-COREIP_MEM_WIDTH=32
-
-TARGET_TAGS=rtl
-TARGET_DHRY_ITERS=2000
-TARGET_CORE_ITERS=5