public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] arc: libgloss: Add support of EM SDP board Date: Wed, 22 May 2024 18:28:31 +0000 (GMT) [thread overview] Message-ID: <20240522182832.999CC3858D26@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6f8ee57d0993c9606c950d311c2abd93e233491b commit 6f8ee57d0993c9606c950d311c2abd93e233491b Author: Yuriy Kolerov <kolerov93@gmail.com> Date: Tue May 21 10:56:56 2024 +0100 arc: libgloss: Add support of EM SDP board These specs files are introduced for EM SDP board: * emsdp1.1.specs - EM SDP 1.1, everything in ICCM/DCCM memory * emsdp1.1_ram.specs - EM SDP 1.1, startup code in ICCM memory and everything else in RAM * emsdp1.2.specs - EM SDP 1.2, everything in ICCM/DCCM memory * emsdp1.2_ram.specs - EM SDP 1.2, startup code in ICCM memory and everything else in RAM An example of building an application: $ arc-elf32-gcc -mcpu=em -specs=emsdp1.1_ram.specs main.c -o main Signed-off-by: Vladimir Isaev <vvisaev@gmail.com> Signed-off-by: Yuriy Kolerov <kolerov93@gmail.com> Diff: --- libgloss/arc/emsdp-uart-setup.c | 32 ++++++++++++++++++++++++++++++++ libgloss/arc/emsdp1.1.ld | 15 +++++++++++++++ libgloss/arc/emsdp1.1.specs | 18 ++++++++++++++++++ libgloss/arc/emsdp1.1_ram.ld | 15 +++++++++++++++ libgloss/arc/emsdp1.1_ram.specs | 18 ++++++++++++++++++ libgloss/arc/emsdp1.2.ld | 15 +++++++++++++++ libgloss/arc/emsdp1.2.specs | 18 ++++++++++++++++++ libgloss/arc/emsdp1.2_ram.ld | 15 +++++++++++++++ libgloss/arc/emsdp1.2_ram.specs | 18 ++++++++++++++++++ 9 files changed, 164 insertions(+) diff --git a/libgloss/arc/emsdp-uart-setup.c b/libgloss/arc/emsdp-uart-setup.c new file mode 100644 index 000000000..eacf98057 --- /dev/null +++ b/libgloss/arc/emsdp-uart-setup.c @@ -0,0 +1,32 @@ +/* + * emsdp-setup.c -- provide _setup_low_level() to initialize UART. + * + * Copyright (c) 2024 Synopsys Inc. + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + * + */ + +#include "uart-8250.h" + +/* Setup UART parameters. */ +int +_setup_low_level (void) +{ + void * const uart_base = (void *) 0xf0004000; + const int uart_aux_mapped = 0; + const uint32_t uart_clock = 100000000; + const uint32_t uart_baud = 115200; + + _uart_8250_setup (uart_base, uart_aux_mapped, uart_clock, uart_baud); + + return 0; +} diff --git a/libgloss/arc/emsdp1.1.ld b/libgloss/arc/emsdp1.1.ld new file mode 100644 index 000000000..c50ba0684 --- /dev/null +++ b/libgloss/arc/emsdp1.1.ld @@ -0,0 +1,15 @@ +/* Memory map for ARC EM Software Development Platform 1.0 and 1.1 */ + +MEMORY +{ + PSRAM : ORIGIN = 0x10000000, LENGTH = 16M + ICCM0 : ORIGIN = 0x60000000, LENGTH = 128K + DCCM : ORIGIN = 0x80000000, LENGTH = 128K +} + +REGION_ALIAS("startup", ICCM0) +REGION_ALIAS("text", ICCM0) +REGION_ALIAS("data", DCCM) +REGION_ALIAS("sdata", DCCM) + +INCLUDE arcv2elf-common.ld diff --git a/libgloss/arc/emsdp1.1.specs b/libgloss/arc/emsdp1.1.specs new file mode 100644 index 000000000..965c8d532 --- /dev/null +++ b/libgloss/arc/emsdp1.1.specs @@ -0,0 +1,18 @@ +%rename link emsdp_link +%rename link_gcc_c_sequence emsdp_link_gcc_c_sequence +%rename startfile emsdp_startfile + +*link: +%(emsdp_link) -T emsdp1.1.ld%s + +*emsdp_libgloss: +-luart_8250 -lemsdp_uart + +*emsdp_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(emsdp_link_gcc_c_sequence) --start-group %G %(emsdp_libc) %(emsdp_libgloss) --end-group + +*startfile: +%(emsdp_startfile) arc-main-helper%O%s diff --git a/libgloss/arc/emsdp1.1_ram.ld b/libgloss/arc/emsdp1.1_ram.ld new file mode 100644 index 000000000..743a4808d --- /dev/null +++ b/libgloss/arc/emsdp1.1_ram.ld @@ -0,0 +1,15 @@ +/* Memory map for ARC EM Software Development Platform 1.0 and 1.1 */ + +MEMORY +{ + PSRAM : ORIGIN = 0x10000000, LENGTH = 16M + ICCM0 : ORIGIN = 0x60000000, LENGTH = 128K + DCCM : ORIGIN = 0x80000000, LENGTH = 128K +} + +REGION_ALIAS("startup", ICCM0) +REGION_ALIAS("text", PSRAM) +REGION_ALIAS("data", PSRAM) +REGION_ALIAS("sdata", PSRAM) + +INCLUDE arcv2elf-common.ld diff --git a/libgloss/arc/emsdp1.1_ram.specs b/libgloss/arc/emsdp1.1_ram.specs new file mode 100644 index 000000000..6fa74e869 --- /dev/null +++ b/libgloss/arc/emsdp1.1_ram.specs @@ -0,0 +1,18 @@ +%rename link emsdp_link +%rename link_gcc_c_sequence emsdp_link_gcc_c_sequence +%rename startfile emsdp_startfile + +*link: +%(emsdp_link) -T emsdp1.1_ram.ld%s + +*emsdp_libgloss: +-luart_8250 -lemsdp_uart + +*emsdp_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(emsdp_link_gcc_c_sequence) --start-group %G %(emsdp_libc) %(emsdp_libgloss) --end-group + +*startfile: +%(emsdp_startfile) arc-main-helper%O%s diff --git a/libgloss/arc/emsdp1.2.ld b/libgloss/arc/emsdp1.2.ld new file mode 100644 index 000000000..7e536d07c --- /dev/null +++ b/libgloss/arc/emsdp1.2.ld @@ -0,0 +1,15 @@ +/* Memory map for ARC EM Software Development Platform 1.2 */ + +MEMORY +{ + ICCM0 : ORIGIN = 0x10000000, LENGTH = 128K + PSRAM : ORIGIN = 0x40000000, LENGTH = 16M + DCCM : ORIGIN = 0x80000000, LENGTH = 128K +} + +REGION_ALIAS("startup", ICCM0) +REGION_ALIAS("text", ICCM0) +REGION_ALIAS("data", DCCM) +REGION_ALIAS("sdata", DCCM) + +INCLUDE arcv2elf-common.ld diff --git a/libgloss/arc/emsdp1.2.specs b/libgloss/arc/emsdp1.2.specs new file mode 100644 index 000000000..0366fe52c --- /dev/null +++ b/libgloss/arc/emsdp1.2.specs @@ -0,0 +1,18 @@ +%rename link emsdp_link +%rename link_gcc_c_sequence emsdp_link_gcc_c_sequence +%rename startfile emsdp_startfile + +*link: +%(emsdp_link) -T emsdp1.2.ld%s + +*emsdp_libgloss: +-luart_8250 -lemsdp_uart + +*emsdp_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(emsdp_link_gcc_c_sequence) --start-group %G %(emsdp_libc) %(emsdp_libgloss) --end-group + +*startfile: +%(emsdp_startfile) arc-main-helper%O%s diff --git a/libgloss/arc/emsdp1.2_ram.ld b/libgloss/arc/emsdp1.2_ram.ld new file mode 100644 index 000000000..3128c15c1 --- /dev/null +++ b/libgloss/arc/emsdp1.2_ram.ld @@ -0,0 +1,15 @@ +/* Memory map for ARC EM Software Development Platform 1.2 */ + +MEMORY +{ + ICCM0 : ORIGIN = 0x10000000, LENGTH = 128K + PSRAM : ORIGIN = 0x40000000, LENGTH = 16M + DCCM : ORIGIN = 0x80000000, LENGTH = 128K +} + +REGION_ALIAS("startup", ICCM0) +REGION_ALIAS("text", PSRAM) +REGION_ALIAS("data", PSRAM) +REGION_ALIAS("sdata", PSRAM) + +INCLUDE arcv2elf-common.ld diff --git a/libgloss/arc/emsdp1.2_ram.specs b/libgloss/arc/emsdp1.2_ram.specs new file mode 100644 index 000000000..97284fae2 --- /dev/null +++ b/libgloss/arc/emsdp1.2_ram.specs @@ -0,0 +1,18 @@ +%rename link emsdp_link +%rename link_gcc_c_sequence emsdp_link_gcc_c_sequence +%rename startfile emsdp_startfile + +*link: +%(emsdp_link) -T emsdp1.2_ram.ld%s + +*emsdp_libgloss: +-luart_8250 -lemsdp_uart + +*emsdp_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(emsdp_link_gcc_c_sequence) --start-group %G %(emsdp_libc) %(emsdp_libgloss) --end-group + +*startfile: +%(emsdp_startfile) arc-main-helper%O%s
reply other threads:[~2024-05-22 18:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240522182832.999CC3858D26@sourceware.org \ --to=jjohnstn@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).