rtems source builder on flexible hardware (FPGA)

Hoefle Marco Marco.Hoefle at nanotronic.ch
Tue Oct 21 11:59:42 UTC 2014


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 at rtems.org] 
Sent: Samstag, 18. Oktober 2014 00:41
To: Hoefle Marco; rtems-users at rtems.org
Subject: Re: rtems source builder on flexible hardware (FPGA)

On 18/10/2014 2:19 am, Hoefle Marco wrote:
> 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?

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.

>
> 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.
>

Excellent. It is really nice to see this happening.

Chris



More information about the users mailing list