aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2024-12-27 13:23:39 +0000
committerChris Packham <judge.packham@gmail.com>2025-01-07 09:07:14 +1300
commit99832196114c7e9451aa79d8cd0eb033cd833c20 (patch)
tree7f4cc66a21a9d198bcc0c31434a7669f0f9c7e73
parentb07f41fe319d72215b244355fa7b8dc955e151bd (diff)
downloadcrosstool-ng-99832196114c7e9451aa79d8cd0eb033cd833c20.tar.gz
crosstool-ng-99832196114c7e9451aa79d8cd0eb033cd833c20.tar.bz2
crosstool-ng-99832196114c7e9451aa79d8cd0eb033cd833c20.zip
lm32: Initial LatticeMicro32 support
This target is in GCC/binutils for a while. It's baremetal only without upstream Linux support. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
-rw-r--r--config/arch/lm32.in10
-rw-r--r--config/kernel/linux.in2
-rw-r--r--samples/lm32-unknown-elf/crosstool.config6
-rw-r--r--samples/lm32-unknown-elf/reported.by3
-rw-r--r--scripts/build/arch/lm32.sh6
5 files changed, 26 insertions, 1 deletions
diff --git a/config/arch/lm32.in b/config/arch/lm32.in
new file mode 100644
index 00000000..a2ae3b2d
--- /dev/null
+++ b/config/arch/lm32.in
@@ -0,0 +1,10 @@
+# LatticeMico32 soft-core architecture
+
+## no-package
+## select ARCH_SUPPORTS_32
+## select ARCH_DEFAULT_32
+## select ARCH_DEFAULT_BE
+## depends on EXPERIMENTAL
+
+## help The LatticeMico32 soft-core architecture:
+## help https://www.latticesemi.com/en/Products/DesignSoftwareAndIP/IntellectualProperty/IPCore/IPCores02/LatticeMico32.aspx
diff --git a/config/kernel/linux.in b/config/kernel/linux.in
index 0f85ff89..6e929c23 100644
--- a/config/kernel/linux.in
+++ b/config/kernel/linux.in
@@ -1,6 +1,6 @@
# Linux kernel options
-## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU
+## depends on !ARCH_AVR && !ARCH_LM32 && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU
## select KERNEL_SUPPORTS_SHARED_LIBS
## help Build a toolchain targeting systems running Linux as a kernel.
diff --git a/samples/lm32-unknown-elf/crosstool.config b/samples/lm32-unknown-elf/crosstool.config
new file mode 100644
index 00000000..68915de2
--- /dev/null
+++ b/samples/lm32-unknown-elf/crosstool.config
@@ -0,0 +1,6 @@
+CT_CONFIG_VERSION="4"
+CT_EXPERIMENTAL=y
+CT_ARCH_LM32=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/lm32-unknown-elf/reported.by b/samples/lm32-unknown-elf/reported.by
new file mode 100644
index 00000000..500de2cd
--- /dev/null
+++ b/samples/lm32-unknown-elf/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Jiaxun Yang <jiaxun.yang@flygoat.com>"
+reporter_url="https://flygoat.com/"
+reporter_comment="Example for building a toolchain for LM32 bare metal targets"
diff --git a/scripts/build/arch/lm32.sh b/scripts/build/arch/lm32.sh
new file mode 100644
index 00000000..77e7c2cb
--- /dev/null
+++ b/scripts/build/arch/lm32.sh
@@ -0,0 +1,6 @@
+# Compute LM32-specific values
+
+CT_DoArchTupleValues() {
+ # Do nothing here. Default values are sane.
+ :;
+}