diff options
-rwxr-xr-x | bsp/update-targets.sh | 3 | ||||
-rw-r--r-- | doc/sphinx/contents.rst | 14 | ||||
m--------- | freedom-metal | 0 | ||||
-rw-r--r-- | scripts/libmetal.mk | 2 |
4 files changed, 16 insertions, 3 deletions
diff --git a/bsp/update-targets.sh b/bsp/update-targets.sh index c659f7d..b05731a 100755 --- a/bsp/update-targets.sh +++ b/bsp/update-targets.sh @@ -69,6 +69,7 @@ DTC=dtc MEE_HEADER_GENERATOR=freedom-metal_header-generator LDSCRIPT_GENERATOR=freedom-ldscript-generator MAKEATTRIB_GENERATOR=freedom-makeattributes-generator +BARE_HEADER_GENERATOR=freedom-bare_header-generator DTS_FILENAME=design.dts DTB_FILENAME=temp.dtb @@ -77,6 +78,7 @@ LDS_DEFAULT_FILENAME=metal.default.lds LDS_RAMRODATA_FILENAME=metal.ramrodata.lds LDS_SCRATCHPAD_FILENAME=metal.scratchpad.lds SETTINGS_FILENAME=settings.mk +BARE_HEADER_FILENAME=metal-platform.h update_target() { TARGET=$1 @@ -99,6 +101,7 @@ update_target() { $LDSCRIPT_GENERATOR -d $TARGET/$DTB_FILENAME -l $TARGET/$LDS_RAMRODATA_FILENAME --ramrodata || die "Failed to produce $TARGET/$LDS_RAMRODATA_FILENAME" $LDSCRIPT_GENERATOR -d $TARGET/$DTB_FILENAME -l $TARGET/$LDS_SCRATCHPAD_FILENAME --scratchpad || die "Failed to produce $TARGET/$LDS_SCRATCHPAD_FILENAME" $MAKEATTRIB_GENERATOR -d $TARGET/$DTB_FILENAME -b $TARGET_TYPE -o $TARGET/$SETTINGS_FILENAME || die "Failed to produce $TARGET/$SETTINGS_FILENAME" + $BARE_HEADER_GENERATOR -d $TARGET/$DTB_FILENAME -o $TARGET/$BARE_HEADER_FILENAME || die "Failed to produce $TARGET/$BARE_HEADER_FILENAME" # Remove temporary .dtb rm $TARGET/$DTB_FILENAME diff --git a/doc/sphinx/contents.rst b/doc/sphinx/contents.rst index d0d7cc5..cad7f78 100644 --- a/doc/sphinx/contents.rst +++ b/doc/sphinx/contents.rst @@ -64,9 +64,16 @@ and consist of the following: - The Freedom Metal machine header which is used internally to Freedom Metal to instantiate structures to support the target device. -* ``metal.lds`` +* ``metal-platform.h`` - - The linker script for the target device. + - The Freedom Metal platform header which is used internally to Freedom Metal + as the source for each device's memory-mapped base address, memory-mapped + size, properties, and memory-mapped register offsets. + +* ``metal.%.lds`` + + - Linker scripts for the target device. Scripts other than ``metal.default.lds`` + are used for alternative memory layouts. * ``openocd.cfg`` (for development board and FPGA targets) @@ -74,7 +81,8 @@ and consist of the following: * ``settings.mk`` - - Used to set ``-march`` and ``-mabi`` arguments to the RISC-V GNU Toolchain. + - Used to set ``-march`` and ``-mabi`` arguments to the RISC-V GNU Toolchain + as well as configure target-specific build steps. Freedom Metal ------------- diff --git a/freedom-metal b/freedom-metal -Subproject 6d69e6d48babe4472a6f4671b832cb7df941f27 +Subproject eb22ebcbaefd0b3547064c7cc162df743c2be52 diff --git a/scripts/libmetal.mk b/scripts/libmetal.mk index c45972a..bd89173 100644 --- a/scripts/libmetal.mk +++ b/scripts/libmetal.mk @@ -5,6 +5,7 @@ METAL_SOURCE_PATH ?= freedom-metal METAL_LDSCRIPT = $(BSP_DIR)/metal.$(LINK_TARGET).lds METAL_HEADER = $(BSP_DIR)/metal.h +PLATFORM_HEADER = $(BSP_DIR)/metal-platform.h METAL_PREFIX = $(abspath $(BSP_DIR)/install) METAL_BUILD_DIR = $(abspath $(BSP_DIR)/build/$(CONFIGURATION)) @@ -26,6 +27,7 @@ $(METAL_BUILD_DIR)/Makefile: --with-preconfigured \ --with-machine-name=$(TARGET) \ --with-machine-header=$(abspath $(METAL_HEADER)) \ + --with-platform-header=$(abspath $(PLATFORM_HEADER)) \ --with-machine-ldscript=$(abspath $(METAL_LDSCRIPT)) \ --with-builtin-libgloss touch -c $@ |