Discussion:
rtems source builder on flexible hardware (FPGA)
Hoefle Marco
2014-10-17 15:19:57 UTC
Permalink
We let an external company develop an rtems bsp for a FPGA based hardware.
The CPU is a powerpc embedded in a Virtex-4 FPGA and thus address map, interrupts etc can vary.

At that time the bsp engineering company told us to configure RTEMS this way:
set -x
CPU=powerpc
BSP=virtex
cd .
rm -rf b-${BSP}
mkdir b-${BSP}
cd b-${BSP}
../rtems/configure --target=${CPU}-rtems4.11 --enable-rtemsbsp=${BSP} \
--prefix=/mnt/extended/ppc_rtems/bsp-install \
--disable-cxx --enable-posix --disable-networking --disable-tests \
'RTEMS_XPARAMETERS_H="/path to/xparameters.h"' \
VIRTEX_CONSOLE_USE_INTERRUPTS=0 \
VIRTEX_FAST_RAM_ORIGIN=0xfffe0000 \
VIRTEX_FAST_RAM_LENGTH=0x0001ffec \
VIRTEX_RAM_ORIGIN=0x00000000 \
VIRTEX_RAM_LENGTH=0x00200000 \
VIRTEX_RESET_ORIGIN=0xffffffec >../configure_${CPU}_${BSP}_rtems.log 2>&1


Is there a way to tell the rsb to configure the kernel with these parameters?

Also I have seen that there are two bsps in the mainline rtems repo:

virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.

The goal here is to unify our rtems build flow to the other - sparc leon3 based - project.
Chris Johns
2014-10-17 22:41:11 UTC
Permalink
Post by Hoefle Marco
We let an external company develop an rtems bsp for a FPGA based hardware.
The CPU is a powerpc embedded in a Virtex-4 FPGA and thus address map,
interrupts etc can vary.
set -x
CPU=powerpc
BSP=virtex
cd .
rm -rf b-${BSP}
mkdir b-${BSP}
cd b-${BSP}
../rtems/configure --target=${CPU}-rtems4.11 --enable-rtemsbsp=${BSP} \
--prefix=/mnt/extended/ppc_rtems/bsp-install \
--disable-cxx --enable-posix --disable-networking
--disable-tests \
'RTEMS_XPARAMETERS_H="/path to/xparameters.h"' \
VIRTEX_CONSOLE_USE_INTERRUPTS=0 \
VIRTEX_FAST_RAM_ORIGIN=0xfffe0000 \
VIRTEX_FAST_RAM_LENGTH=0x0001ffec \
VIRTEX_RAM_ORIGIN=0x00000000 \
VIRTEX_RAM_LENGTH=0x00200000 \
VIRTEX_RESET_ORIGIN=0xffffffec
Post by Hoefle Marco
../configure_${CPU}_${BSP}_rtems.log 2>&1
Is there a way to tell the rsb to configure the kernel with these parameters?
Not the git sources. Does the attached patch help ? If it is ok I will
push it.

Use as:

--with-rtems-bspopts="options list"

Note, --without-rtems-tests is supported by the RSB.
Post by Hoefle Marco
virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.
The goal here is to unify our rtems build flow to the other - sparc leon3 based - project.
Excellent. It is really nice to see this happening.

Chris
Hoefle Marco
2014-10-21 11:59:42 UTC
Permalink
Hello Chris,
thank you for the patch. I tried it and I got this:


RTEMS Tools Project - Source Builder Error Report
Build: error: building powerpc-rtems4.11-kernel-4.11-1
Command Line: ../source-builder/sb-set-builder
--log=/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_
test/toolchain/4.11-powerpc.log
--prefix=/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolcha
in_test/toolchain --no-clean 4.11/rtems-powerpc-ngms.bset
--with-rtems-bspopts=
'RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/
ngms/toolchain_test/xparameters.h'
VIRTEX_CONSOLE_USE_INTERRUPTS=0
VIRTEX_FAST_RAM_ORIGIN=0xfffe0000
VIRTEX_FAST_RAM_LENGTH=0x0001ffec
VIRTEX_RAM_ORIGIN=0x00000000
VIRTEX_RAM_LENGTH=0x00200000
VIRTEX_RESET_ORIGIN=0xffffffec
.
.
.
config.status: creating Makefile
+
RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/n
gms/toolchain_test/xparameters.h
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
tems-source-builder/rtems/build/powerpc-rtems4.11-kernel-4.11-1/doit:
116:
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
tems-source-builder/rtems/build/powerpc-rtems4.11-kernel-4.11-1/doit:
RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/n
gms/toolchain_test/xparameters.h: not found
shell cmd failed: /bin/sh -ex
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
tems-source-builder/rtems/build/powerpc-rtems4.11-kernel-4.11-1/doit
error: building powerpc-rtems4.11-kernel-4.11-1


I found a workaround to get the toolchain and the rtems kernel for our
Virtex-4 BSP using environment variables:

cd rtems-source-builder/rtems
export
'RTEMS_XPARAMETERS_H="/home/NANOTRONIC/hoefle/projects/customers/unibern
/ngms/toolchain_test/xparameters.h"'
export VIRTEX_CONSOLE_USE_INTERRUPTS=0
export VIRTEX_FAST_RAM_ORIGIN=0xfffe0000
export VIRTEX_FAST_RAM_LENGTH=0x0001ffec
export VIRTEX_RAM_ORIGIN=0x00000000
export VIRTEX_RAM_LENGTH=0x00200000
export VIRTEX_RESET_ORIGIN=0xffffffec

../source-builder/sb-set-builder --log=$TOOLCHAIN_DIR/4.11-powerpc.log
--prefix=$TOOLCHAIN_DIR --no-clean 4.11/rtems-powerpc-ngms.bset

This seems to work fine. I could build a simple RTEMS Test App and it
seems to run.
I am not sure if the current bsp approach is the best approach as parts
of the bsp information is given directly using the environment variables
and other parts are in the xparameters.h file.
The xparameters.h file contains all information but I would even prefer
not using it at all as it is Xilinx specific and the syntax could change
for example if different versions of the Xilinx tools are used.

Marco








-----Original Message-----
From: Chris Johns [mailto:chrisj-***@public.gmane.org]
Sent: Samstag, 18. Oktober 2014 00:41
To: Hoefle Marco; rtems-users-***@public.gmane.org
Subject: Re: rtems source builder on flexible hardware (FPGA)
Post by Hoefle Marco
We let an external company develop an rtems bsp for a FPGA based hardware.
The CPU is a powerpc embedded in a Virtex-4 FPGA and thus address map,
interrupts etc can vary.
At that time the bsp engineering company told us to configure RTEMS
this
Post by Hoefle Marco
set -x
CPU=powerpc
BSP=virtex
cd .
rm -rf b-${BSP}
mkdir b-${BSP}
cd b-${BSP}
../rtems/configure --target=${CPU}-rtems4.11 --enable-rtemsbsp=${BSP} \
--prefix=/mnt/extended/ppc_rtems/bsp-install \
--disable-cxx --enable-posix --disable-networking
--disable-tests \
'RTEMS_XPARAMETERS_H="/path to/xparameters.h"' \
VIRTEX_CONSOLE_USE_INTERRUPTS=0 \
VIRTEX_FAST_RAM_ORIGIN=0xfffe0000 \
VIRTEX_FAST_RAM_LENGTH=0x0001ffec \
VIRTEX_RAM_ORIGIN=0x00000000 \
VIRTEX_RAM_LENGTH=0x00200000 \
VIRTEX_RESET_ORIGIN=0xffffffec
Post by Hoefle Marco
../configure_${CPU}_${BSP}_rtems.log 2>&1
Is there a way to tell the rsb to configure the kernel with these parameters?
Not the git sources. Does the attached patch help ? If it is ok I will
push it.

Use as:

--with-rtems-bspopts="options list"

Note, --without-rtems-tests is supported by the RSB.
Post by Hoefle Marco
virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.
The goal here is to unify our rtems build flow to the other - sparc leon3 based - project.
Excellent. It is really nice to see this happening.

Chris
Chris Johns
2014-10-21 23:35:10 UTC
Permalink
Post by Hoefle Marco
Hello Chris,
RTEMS Tools Project - Source Builder Error Report
Build: error: building powerpc-rtems4.11-kernel-4.11-1
Command Line: ../source-builder/sb-set-builder
--log=/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_
test/toolchain/4.11-powerpc.log
--prefix=/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolcha
in_test/toolchain --no-clean 4.11/rtems-powerpc-ngms.bset
--with-rtems-bspopts=
'RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/
ngms/toolchain_test/xparameters.h'
VIRTEX_CONSOLE_USE_INTERRUPTS=0
VIRTEX_FAST_RAM_ORIGIN=0xfffe0000
VIRTEX_FAST_RAM_LENGTH=0x0001ffec
VIRTEX_RAM_ORIGIN=0x00000000
VIRTEX_RAM_LENGTH=0x00200000
VIRTEX_RESET_ORIGIN=0xffffffec
I am not sure I understand what you entered. Are all the options in the
quotes ? It appears some are not.
Post by Hoefle Marco
.
.
.
config.status: creating Makefile
+
RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/n
gms/toolchain_test/xparameters.h
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
RTEMS_XPARAMETERS_H=/home/NANOTRONIC/hoefle/projects/customers/unibern/n
gms/toolchain_test/xparameters.h: not found
shell cmd failed: /bin/sh -ex
/home/NANOTRONIC/hoefle/projects/customers/unibern/ngms/toolchain_test/r
tems-source-builder/rtems/build/powerpc-rtems4.11-kernel-4.11-1/doit
error: building powerpc-rtems4.11-kernel-4.11-1
I found a workaround to get the toolchain and the rtems kernel for our
cd rtems-source-builder/rtems
export
'RTEMS_XPARAMETERS_H="/home/NANOTRONIC/hoefle/projects/customers/unibern
/ngms/toolchain_test/xparameters.h"'
export VIRTEX_CONSOLE_USE_INTERRUPTS=0
export VIRTEX_FAST_RAM_ORIGIN=0xfffe0000
export VIRTEX_FAST_RAM_LENGTH=0x0001ffec
export VIRTEX_RAM_ORIGIN=0x00000000
export VIRTEX_RAM_LENGTH=0x00200000
export VIRTEX_RESET_ORIGIN=0xffffffec
../source-builder/sb-set-builder --log=$TOOLCHAIN_DIR/4.11-powerpc.log
--prefix=$TOOLCHAIN_DIR --no-clean 4.11/rtems-powerpc-ngms.bset
This seems to work fine. I could build a simple RTEMS Test App and it
seems to run.
I am not sure if the current bsp approach is the best approach as parts
of the bsp information is given directly using the environment variables
and other parts are in the xparameters.h file.
I agree it is not the best approach. Anything referencing environment
variables is a problem and I suspect it is too late for 4.11 and this
build system to fix.
Post by Hoefle Marco
The xparameters.h file contains all information but I would even prefer
not using it at all as it is Xilinx specific and the syntax could change
for example if different versions of the Xilinx tools are used.
I agree these exported files from Xilinx tools are difficult to work
with and integrate. The Zynq also suffers from this sort of thing. If we
can avoid needing to reference files like these the better off we are.
If we need to reference them for what ever reason I would prefer to see
the configure stage import the file(s) via an option, ie no references
to paths outside the RTEMS source or build tree.

Chris

Sebastian Huber
2014-10-20 06:30:42 UTC
Permalink
Post by Hoefle Marco
virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.
I don't know why these virtex4 and virtex5 BSPs exist (added 2012). The virtex
BSP exists since 2007 and covers also the Virtex-4.
--
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.huber-L1vi/***@public.gmane.org
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Ric Claus
2014-10-20 10:15:24 UTC
Permalink
If I recall correctly, the virtex BSP expects the architecture of a particular Virtex 4 evaluation board and to have certain firmware loaded onto the FPGA fabric. I wrote the virtex4 and virtex5 BSPs to be generic.

Ric
Post by Hoefle Marco
virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.
I don't know why these virtex4 and virtex5 BSPs exist (added 2012). The virtex BSP exists since 2007 and covers also the Virtex-4.
--
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
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
users mailing list
http://lists.rtems.org/mailman/listinfo/users
Hoefle Marco
2014-10-21 12:03:09 UTC
Permalink
Hello Sebastian and Ric,
I think it would be good to think about a unification of these BSPS.
In the Virtex BSB as I understood some information are given by the configure process while others are taken from the xparameters.h file which is generated by the Xilinx tools.
The xparameter.h approach is Xilinx specific and also the syntax of the defines has changed throughout the different versions of Xilinx ISE/XPS
We use for now the virtex bsp together with RSb and environment variables (see other mailing list email)
Marco



-----Original Message-----
From: Ric Claus [mailto:claus-***@public.gmane.org]
Sent: Montag, 20. Oktober 2014 12:15
To: Sebastian Huber
Cc: Hoefle Marco; rtems-users-***@public.gmane.org
Subject: Re: rtems source builder on flexible hardware (FPGA)

If I recall correctly, the virtex BSP expects the architecture of a particular Virtex 4 evaluation board and to have certain firmware loaded onto the FPGA fabric. I wrote the virtex4 and virtex5 BSPs to be generic.

Ric
Post by Hoefle Marco
virtex and virtex4.
Our platform is virtex4 but we used the virtex bsp at that time.
So the name virtex is confusing as not all virtex devices contain a powerpc.
I don't know why these virtex4 and virtex5 BSPs exist (added 2012). The virtex BSP exists since 2007 and covers also the Virtex-4.
--
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
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
users mailing list
http://lists.rtems.org/mailman/listinfo/users
Loading...