From 3fe7e91327d8063ddfc50f902f7d2a045df5b08a Mon Sep 17 00:00:00 2001 From: Madhu Date: Tue, 21 May 2024 01:50:10 -0400 Subject: [PATCH 1/2] [feat]: OpenRISC gcc port and boards support --- examples/or1k/README.md | 7 +++++++ examples/or1k/boardsupport.c | 28 ++++++++++++++++++++++++++++ examples/or1k/boardsupport.h | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 examples/or1k/README.md create mode 100644 examples/or1k/boardsupport.c create mode 100644 examples/or1k/boardsupport.h diff --git a/examples/or1k/README.md b/examples/or1k/README.md new file mode 100644 index 00000000..08c247f0 --- /dev/null +++ b/examples/or1k/README.md @@ -0,0 +1,7 @@ +# Configuration + +## Building + +```sh +scons --config-dir=examples/or1k/ user_libs=-lm cc=or1k-elf-gcc cflags "-c -Wall -O2 -ffunction-sections -mhard-mul -mhard-div -mhard-float -mdouble-float -mror" ldflags="-Wl,-gc-sections" +``` diff --git a/examples/or1k/boardsupport.c b/examples/or1k/boardsupport.c new file mode 100644 index 00000000..3f1b6b9b --- /dev/null +++ b/examples/or1k/boardsupport.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2017 Embecosm Limited and University of Bristol + + Contributor Madhu Sudhanan + + This file is part of Embench and was formerly part of the Bristol/Embecosm + Embedded Benchmark Suite. + + SPDX-License-Identifier: GPL-3.0-or-later */ + +#include + +void +initialise_board () +{ + +} + +void __attribute__ ((noinline)) __attribute__ ((externally_visible)) +start_trigger () +{ + +} + +void __attribute__ ((noinline)) __attribute__ ((externally_visible)) +stop_trigger () +{ + +} diff --git a/examples/or1k/boardsupport.h b/examples/or1k/boardsupport.h new file mode 100644 index 00000000..6dfa63c2 --- /dev/null +++ b/examples/or1k/boardsupport.h @@ -0,0 +1,10 @@ +/* Copyright (C) 2017 Embecosm Limited and University of Bristol + + Contributor Madhu Sudhanan + + This file is part of Embench and was formerly part of the Bristol/Embecosm + Embedded Benchmark Suite. + + SPDX-License-Identifier: GPL-3.0-or-later */ + +#define CPU_MHZ 1 From 7fc24e7c59e414ddc898b4d98f52411d80b9d2e7 Mon Sep 17 00:00:00 2001 From: madhu2000u <49570614+madhu2000u@users.noreply.github.com> Date: Sun, 2 Jun 2024 21:53:33 -0400 Subject: [PATCH 2/2] Update README.md --- examples/or1k/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/or1k/README.md b/examples/or1k/README.md index 08c247f0..d413a78b 100644 --- a/examples/or1k/README.md +++ b/examples/or1k/README.md @@ -3,5 +3,5 @@ ## Building ```sh -scons --config-dir=examples/or1k/ user_libs=-lm cc=or1k-elf-gcc cflags "-c -Wall -O2 -ffunction-sections -mhard-mul -mhard-div -mhard-float -mdouble-float -mror" ldflags="-Wl,-gc-sections" +scons --config-dir=examples/or1k/ user_libs=-lm cc=or1k-elf-gcc cflags="-c -Wall -O2 -ffunction-sections -mhard-mul -mhard-div -mhard-float -mdouble-float -mror" ldflags="-Wl,-gc-sections" ```