summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsp')
-rw-r--r--bsp/coreip-e20-arty/metal.ramrodata.lds14
-rwxr-xr-xbsp/update-targets.sh9
2 files changed, 14 insertions, 9 deletions
diff --git a/bsp/coreip-e20-arty/metal.ramrodata.lds b/bsp/coreip-e20-arty/metal.ramrodata.lds
index 513e567..0c6fffa 100644
--- a/bsp/coreip-e20-arty/metal.ramrodata.lds
+++ b/bsp/coreip-e20-arty/metal.ramrodata.lds
@@ -9,8 +9,9 @@ ENTRY(_enter)
MEMORY
{
- ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
+ ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x8000
flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
+ itim (wx!rai) : ORIGIN = 0x80008000, LENGTH = 0x8000
}
PHDRS
@@ -127,13 +128,17 @@ SECTIONS
{
. = ALIGN(4);
PROVIDE( metal_segment_itim_target_start = . );
- } >ram AT>flash :ram_init
+ } >itim AT>flash :itim_init
.itim :
{
*(.itim .itim.*)
- } >flash AT>flash :flash
+ *(.text.unlikely .text.unlikely.*)
+ *(.text.startup .text.startup.*)
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ } >itim AT>flash :itim_init
. = ALIGN(8);
@@ -144,8 +149,7 @@ SECTIONS
*(.text.startup .text.startup.*)
*(.text .text.*)
*(.gnu.linkonce.t.*)
- *(.itim .itim.*)
- } >flash AT>flash :flash
+ } >itim AT>flash :flash
.lalign :
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh
index e3b2496..198cd5a 100755
--- a/bsp/update-targets.sh
+++ b/bsp/update-targets.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/bin/bash
help() {
cat >&2 <<EOF
@@ -45,9 +45,10 @@ then
TARGET_LIST="$(ls -d coreip*) "
TARGET_LIST+="sifive-hifive1 sifive-hifive1-revb freedom-e310-arty sifive-hifive-unleashed "
else
- if [ ! -f "$DTSFILE" -a "$DTSFILE" != "*.dts" ]
+ file "$DTSFILE"
+ if [ ! -f "$DTSFILE" ]
then
- echo "[ERROR] $0: $DTSFILE must be a dts file" >&2
+ echo "[ERROR] $0: $DTSFILE must be a file" >&2
help "$0"
exit 1
fi
@@ -70,7 +71,7 @@ else
echo "[INFO] $0: "$CUSTOM_TARGET" not found! Creating one" >&2
mkdir -p $CUSTOM_TARGET
fi
- cp $DTSFILE $CUSTOM_TARGET
+ cp $DTSFILE "$CUSTOM_TARGET/design.dts"
TARGET_LIST="$CUSTOM_TARGET "
fi