Re: [PATCH] user: Add frdme310arty BSP varient

2019-11-28 Thread Sebastian Huber
Thanks, I checked it in. It would be nice to have also a link available 
on how to set up the board with a bootloader and a Xilinx bit file so 
that you can run RTEMS on it.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] user: Add frdme310arty BSP varient

2019-11-28 Thread Pragnesh Patel
Signed-off-by: Pragnesh Patel 
---
 user/bsps/bsps-riscv.rst | 8 
 1 file changed, 8 insertions(+)

diff --git a/user/bsps/bsps-riscv.rst b/user/bsps/bsps-riscv.rst
index c3ca098..0799ad6 100644
--- a/user/bsps/bsps-riscv.rst
+++ b/user/bsps/bsps-riscv.rst
@@ -36,6 +36,8 @@ This BSP offers 13 variants:
 
 * rv64imafdc_medany
 
+* frdme310arty
+
 Each variant corresponds to a GCC multilib.  A particular variant reflects an
 ISA with ABI and code model choice.
 
@@ -87,6 +89,10 @@ The following options are available at the configure command 
line.
 ``RISCV_RAM_REGION_SIZE``
  The size of the RAM region for linker command file (default 64MiB).
 
+``RISCV_ENABLE_FRDME310ARTY_SUPPORT``
+ Enables support sifive Freedom E310 Arty board if defined to a non-zero
+ value,otherwise it is disabled (disabled by default)
+
 Interrupt Controller
 
 
@@ -111,6 +117,8 @@ The console driver supports devices compatible to
 
 * "ns16750" (see ``RISCV_CONSOLE_MAX_NS16550_DEVICES`` BSP option).
 
+* "sifive,uart0" (see ``RISCV_ENABLE_FRDME310ARTY_SUPPORT`` BSP option).
+
 They are initialized according to the device tree.  The console driver does not
 configure the pins or peripheral clocks.  The console device is selected
 according to the device tree "/chosen/stdout-path" property value.
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v5] riscv: add freedom E310 Arty A7 bsp

2019-11-28 Thread Sebastian Huber

Hello Pragnesh,

On 29/11/2019 06:58, Pragnesh Patel wrote:

Thanks, Bit file (MCS file) for Artix-7 RTEMS is not public yet so we will do 
it soon.


this sounds great, I have the board in my office and it would be nice if 
I could use it for test suite runs on a real board.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RE: [PATCH v5] riscv: add freedom E310 Arty A7 bsp

2019-11-28 Thread Pragnesh Patel



-Original Message-
From: Sebastian Huber  
Sent: 14 November 2019 16:21
To: Pragnesh Patel ; rtems-de...@rtems.org; Sachin 
Ghadi 
Subject: Re: [PATCH v5] riscv: add freedom E310 Arty A7 bsp

Hello Pragnesh,

I fixed the formatting a bit, fixed some warnings and simplified some 
functions. Would you mind testing the latest master branch on your board to 
check if it still runs?

I will do it.

- Pragnesh

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RE: [PATCH v5] riscv: add freedom E310 Arty A7 bsp

2019-11-28 Thread Pragnesh Patel

On Thu, Nov 14, 2019 at 7:21 AM Sebastian Huber 
 wrote:
On 14/11/2019 14:07, Joel Sherrill wrote:
> 
> 
> On Wed, Oct 23, 2019, 1:16 AM Sebastian Huber 
>  > wrote:
> 
>     Hello Pragnesh,
> 
>     thanks for your contribution. I checked in the patch without the
>     frdme310arty.dts file. It had no license information and I think it is
>     not needed by the BSP directly. I guess a boot loader will provide the
>     device tree?
> 
> 
> But the bsp is not functional without it so can't be tested. How does 
> this file get used on the real board?
> 
> If the license question is answered, we need a long term solution as to 
> its location. We shouldn't send users on a chase for a file which could 
> disappear because we don't have it.
> 
> Also can this run on a simulator with this or a similar device tree?

The device trees are provided by the boot loader. If I understood this 
correctly, then RTEMS is started by a boot loader on the Freedom E310 
Arty A7?

Yes, RTEMS is started by bootloader.

To be pedantic, is this the board?

https://www.digikey.com/eewiki/display/LOGIC/Digilent+Arty+A7+with+Xilinx+Artix-7+Implementing+SiFive+FE310+RISC-V

Yes, this is the board. I am using Artix-7 100T.

Are there any accessories or JTAG you need? If you have a JTAG adapter you know 
works,
please pass that along.

I am using Olimex ARM-USB-OCD-H 
(https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/)

How different are the instructions there from what would be required when using 
RTEMS?

I am working on Documentation, I will update soon.

I don't recall. Did you post test results?

No, where can I post the test results?

Did you look at the performance at all? There are no known performance issues 
but
always worth asking. 

No, can you elaborate more on this, what kind of performance and how can you 
test it? 

I'm thrilled to see this merged and available. Just wanting to ease the startup 
for using
RTEMS on it.

Thanks, Bit file (MCS file) for Artix-7 RTEMS is not public yet so we will do 
it soon. 

- Pragnesh

Thanks

--joel

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : mailto:sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: New Build System Status

2019-11-28 Thread yorda
I've just figured it out myself by reading the full email from Sebastian, I 
clone the rtems from  git://git.rtems.org/sebh/rtems.git 
 not the official repo and  waf is included.



> On 29/11/2019, at 3:57 PM, yorda  wrote:
> 
> Hi Sebastian,
> Thanks for updating the documentation file, I’m trying to following the guide 
> on user.pdf. Everything went well on building the toolchain, but then when I 
> was trying to build a BSP, I could’t find waf on the rtems repo folder. So I 
> download the latest waf from official website and try the following command:
> 
> ../waf-2.0.19/waf configure —prefix=$HOME/quick-start/rtems/5
> 
> and I got the red waring:
> 
> Waf: Run from a folder containing a 'wscript' file (or try -h for the generic 
> options)
> 
> Did I do something wrong?
> 
> mko
> 
> 
>> On 27/11/2019, at 4:07 AM, Sebastian Huber 
>>  wrote:
>> 
>> Hello,
>> 
>> I updated the build system documentation. It is now sufficiently good to get 
>> integrated from my point of view.
>> 
>> https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf
>> 
>> https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf
>> 
>> -- 
>> Sebastian Huber, embedded brains GmbH
>> 
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany
>> Phone   : +49 89 189 47 41-16
>> Fax : +49 89 189 47 41-09
>> E-Mail  : sebastian.hu...@embedded-brains.de
>> PGP : Public key available on request.
>> 
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> 
> 
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: New Build System Status

2019-11-28 Thread yorda
Hi Sebastian,
Thanks for updating the documentation file, I’m trying to following the guide 
on user.pdf. Everything went well on building the toolchain, but then when I 
was trying to build a BSP, I could’t find waf on the rtems repo folder. So I 
download the latest waf from official website and try the following command:

../waf-2.0.19/waf configure —prefix=$HOME/quick-start/rtems/5

and I got the red waring:

Waf: Run from a folder containing a 'wscript' file (or try -h for the generic 
options)

Did I do something wrong?

mko


> On 27/11/2019, at 4:07 AM, Sebastian Huber 
>  wrote:
> 
> Hello,
> 
> I updated the build system documentation. It is now sufficiently good to get 
> integrated from my point of view.
> 
> https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf
> 
> https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf
> 
> -- 
> Sebastian Huber, embedded brains GmbH
> 
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
> 
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

pkg-config

2019-11-28 Thread Sebastian Huber

Hello,

we should think about what variables should be exposed by the pkg-config 
file. Currently, it contains a lot of things, e.g. warning and 
optimization flags. The seem to be necessary for the libbsd:


/build/rtems/5/lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld: 
./libbsd.a(uipc_mbuf.c.24.o): in function `m_unmappedtouio':
/scratch/git-rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-everything/../../freebsd/sys/kern/uipc_mbuf.c:1813: 
undefined reference to `PHYS_TO_VM_PAGE'
/build/rtems/5/lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld: 
/scratch/git-rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-everything/../../freebsd/sys/kern/uipc_mbuf.c:1814: 
undefined reference to `uiomove_fromphys'


Without the -Wl,--gc-sections the libbsd link fails.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

New Build System Ready for Integration

2019-11-28 Thread Sebastian Huber

Hello,

the new build system is now ready for integration. You find the latest 
documentation here:


https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf

https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf

You can review the new build system for RTEMS BSPs here:

git clone git://git.rtems.org/sebh/rtems.git
cd rtems
git checkout --track origin/build

The new build system builds all BSPs and all tests (including the Ada 
tests). I tested the build on OpenSUSE 15.1, MinGW64, MSYS2, and FreeBSD 
12.1.


The build specification consists of

find spec -name '*.yml' -and -not -name .doorstop.yml | wc
   20112011  136959

YAML files. From these only 18 have hand-crafted content:

grep -r 'build-type: script' spec/ | sort
spec/build/bsps/powerpc/motorola_powerpc/RTEMS-BUILD-BSP-POWERPC-MOTOROLAPOWERPC-BOOT.yml:build-type: 
script
spec/build/bsps/powerpc/motorola_powerpc/RTEMS-BUILD-BSP-POWERPC-MOTOROLAPOWERPC-QEMUFAKEROM.yml:build-type: 
script
spec/build/bsps/powerpc/mvme5500/RTEMS-BUILD-BSP-POWERPC-MVME5500-START.yml:build-type: 
script

spec/build/bsps/powerpc/RTEMS-BUILD-BSP-POWERPC-MOTLD.yml:build-type: script
spec/build/bsps/RTEMS-BUILD-BSP-LINKCMDS.yml:build-type: script
spec/build/cpukit/RTEMS-BUILD-CPUKIT-VCKEY.yml:build-type: script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL01.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL02.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL04.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL05.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL06.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL07.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL08.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL09.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL10.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-MGHTTPD01.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-TAR01.yml:build-type: 
script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-TAR02.yml:build-type: 
script


So, more than 99% of the build specification is done through standard 
items. The attached script can be used to load the content of all items 
into a standard Python data structure (dictionaries, lists, strings, 
integers). The next person doing a new build system will have a much 
easier task, no more parsing of Makefile.am, configure.ac, *.cfg, and 
*.tcfg files.


My proposed next steps are:

1. I push the source and documentation patches next Monday to the main 
repositories.


2. I make it harder to use the existing build system. I add a 
--I-only-want-to-compare-results-with-the-new-build-system" to the 
top-level configure script. If this option is not present, then the 
build stops with an error. This basically disables the normal use.


3. I create a new ticket with a build system conversion checklist.

4. We announce a four month period in which we keep the old build system 
in the sources. Everyone is encouraged to test the new build system with 
the help of the checklist. The new build system should be used, fixed 
and improved.


5. If the new build system shows satisfactory results after the testing 
period, we remove the old one.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
#!/usr/bin/env python

# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (C) 2019 embedded brains GmbH
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#notice, this list of conditions and the following disclaimer in the
#documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR