Workflow RTEMS on Zynq Zedboard
Jan Sommer
soja-lists at aries.uberspace.de
Tue Mar 22 21:05:44 UTC 2016
Am Tuesday 22 March 2016, 17:31:15 schrieb Badr El Hiouel:
> Can you please give the link of this tutorial because I think I'm doing
> something wrong .. When running the ticker.exe ( which I renamed to .elf )
> => the sdk crashes ..
>
It was one of my previous emails.
It is http://zedboard.org/support/design/1519/10
>
> ________
>
> *Badr EL HIOUEL*
> Mail : elh.badr at gmail.com
>
>
> 2016-03-22 12:57 GMT+01:00 Jan Sommer <soja-lists at aries.uberspace.de>:
>
> > Am 2016-03-22 12:33, schrieb Badr El Hiouel:
> >
> >> Ok, Thank you.
> >> I'm understanding now.
> >>
> >> I can't find details for the importing part of the ticker.exe program. (
> >> in
> >> the labs they create a new application project - in other labs they copy
> >> an
> >> file.c )
> >> How did you import the ticker.exe ?
> >>
> >
> > As I said, if you follow part 4 of the MicroZed tutorial (I don't have the
> > one for the Zedboard) and take a look at Figure 6 (p. 7) I replaced the
> > file Periph_Test.elf with the elf-file from the ticker-example. I don't use
> > the Xilinx SDK to develop the RTEMS application itself.
> >
> >
> >
> >>
> >> ________
> >>
> >> *Badr EL HIOUEL*
> >> Mail : elh.badr at gmail.com
> >>
> >>
> >> 2016-03-22 12:06 GMT+01:00 Jan Sommer <soja-lists at aries.uberspace.de>:
> >>
> >> Am 2016-03-22 11:32, schrieb Badr El Hiouel:
> >>>
> >>> I'm a little bit confusing.
> >>>>
> >>>> So, if I understand, The 1st part of the workflow ( ie building the RSB
> >>>> &
> >>>> generating the rtems bsp ) is only for compiling programs ( with as a
> >>>> target arm architectures ).
> >>>>
> >>>> It generates the toolchain for compiling programs, i.e. compiler,
> >>> linker,
> >>> RTEMS libraries.
> >>> You then write your application code, with tasks, I/O and compile it with
> >>> this toolchain.
> >>> For example ticker is such an application. It will be compiled and linked
> >>> with arm-rtems4.xx-gcc and the result will be your binary ticker.exe,
> >>> which
> >>> you then have to load to your target platform.
> >>> For simpler boards like the raspberry pi you only have to copy the binary
> >>> file to the sd-card. For the Zedboard you also have to include a setup
> >>> for
> >>> the FPGA.
> >>>
> >>> This means , every time I have to launch an
> >>>
> >>>> RTEMS program I have to recompile the program ( the part after
> >>>> ./bootstrap
> >>>> in the workflow ) ?
> >>>>
> >>>>
> >>>> No, you only have to do that if you want to update the toolchain.
> >>>
> >>> I Tought , the bsps we generate can be used like in this video i found (
> >>> it
> >>>
> >>>> is for µC/OS II on Zynq ) : https://www.youtube.com/watch?v=omB7qVBQaIM
> >>>>
> >>>>
> >>>> I'm sorry, if I caused any confusion.
> >>>
> >>> Cheers,
> >>>
> >>> Jan
> >>>
> >>> Please can anybody else confirm that or give us a clarification.
> >>>
> >>>>
> >>>> Thank you
> >>>>
> >>>> ________
> >>>>
> >>>> *Badr EL HIOUEL*
> >>>> Mail : elh.badr at gmail.com
> >>>>
> >>>>
> >>>> 2016-03-22 11:16 GMT+01:00 Jan Sommer <soja-lists at aries.uberspace.de>:
> >>>>
> >>>> Am 2016-03-22 09:45, schrieb Badr El Hiouel:
> >>>>
> >>>>>
> >>>>> Hi Jan ,
> >>>>>
> >>>>>>
> >>>>>> Thank you for support.
> >>>>>>
> >>>>>> It finally success! For that , I had to delete all the project, then I
> >>>>>> rebuild RSB and then it went very fine.
> >>>>>>
> >>>>>> Now , I designed a Zynq HW on Vivado and I launched it on SDK. But
> >>>>>> now ,
> >>>>>> in
> >>>>>> the labs ( you sent me one for the µZed , The same exists for
> >>>>>> Zedboard )
> >>>>>> they create a new bsp. I imagine that in this step I don't have to
> >>>>>> create
> >>>>>> one but import it from the rtems.
> >>>>>>
> >>>>>> This part is a bit tricky. The term "bsp" is used in 2 different
> >>>>>> contexts
> >>>>>>
> >>>>>> here.
> >>>>> First you have the rtems-bsp. That complements the generic parts of
> >>>>> rtems
> >>>>> with the things that depend on your intended target platform (i.e.
> >>>>> Zedboard) like drivers for the global timer, etc. This generates the
> >>>>> rtems-library for your platform which is linked to your application
> >>>>> code
> >>>>> to
> >>>>> create your RTEMS-application (e.g. ticker.exe).
> >>>>>
> >>>>> Then you have the bsp in the Xilinx context. The Zync CPU consists of
> >>>>> an
> >>>>> ARM-CPU and an FPGA. In order to run any application on the CPU you
> >>>>> also
> >>>>> have to configure the FPGA, which you do with the bsp and the FSBL from
> >>>>> the
> >>>>> Xilinx-toolchain.
> >>>>> I don't know too much about that configuration so far. I simply
> >>>>> followed
> >>>>> the tutorial where the FPGA is mainly responsible to connect the CPU to
> >>>>> the
> >>>>> RAM.
> >>>>>
> >>>>> In part 4 of the Tutorial for the MicroZed they build a boot image. If
> >>>>> you
> >>>>> take a look at Figure 6 (p. 7), I simply replaced the Periph_Test.elf
> >>>>> with
> >>>>> the test program generated by RTEMS and continued. The setup for the
> >>>>> normal
> >>>>> Zedboard should be pretty similar. The resulting boot image will boot,
> >>>>> initialize the FPGA, load the RTEMS program into RAM and transfer
> >>>>> control
> >>>>> to it.
> >>>>>
> >>>>>
> >>>>> So, where I find the bsp ? It's a single file or a directory ? And then
> >>>>> how
> >>>>>
> >>>>> can I to import it on SDK ?
> >>>>>> I read also that for ticker.exe we have to change the extension for
> >>>>>> .elfe
> >>>>>> ,
> >>>>>> is that what I'll have to do ?
> >>>>>>
> >>>>>> It might be that the file dialog of the Xilinx tools expects
> >>>>>> *.elf-files,
> >>>>>>
> >>>>>> so renaming might be necessary.
> >>>>>
> >>>>> Best regards,
> >>>>>
> >>>>> Jan
> >>>>>
> >>>>> PS: Please keep the rtems-users list as recipient, so other people
> >>>>> might
> >>>>> join the discussion and people with the same problem might benefit.
> >>>>>
> >>>>> Thank you!
> >>>>>
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>> ________
> >>>>>>
> >>>>>> *Badr EL HIOUEL*
> >>>>>> Mail : elh.badr at gmail.com
> >>>>>>
> >>>>>>
> >>>>>> 2016-03-19 11:57 GMT+01:00 Jan Sommer <soja-lists at aries.uberspace.de
> >>>>>> >:
> >>>>>>
> >>>>>> Am Friday 18 March 2016, 17:24:48 schrieb Badr El Hiouel:
> >>>>>>
> >>>>>> [...]
> >>>>>>> > > Thank you for your support,
> >>>>>>> > >
> >>>>>>> > > I installed the devel environnement for Python27 and it builds (
> >>>>>>> finally !
> >>>>>>> > > )
> >>>>>>> > > When I did :
> >>>>>>> > > /mnt/D/development/rtems/kernel/rtems/configure
> >>>>>>> --target=arm-rtems4.12
> >>>>>>> > > --enable-rtemsbsp=xilinx_zynq_zedboard --enable-tests=samples
> >>>>>>> > > --enable-posix --enable-cxx
> >>>>>>> --prefix=/mnt/D/development/rtems/bsps/4.12
> >>>>>>> > > BSP_ARM_A9MPCORE_PERIPHCLK=333333333U
> >>>>>>> > > It worked but when running make && make install it shows me an
> >>>>>>> error
> >>>>>>> :
> >>>>>>> > >
> >>>>>>> > > checking for RTEMS_CPU_MODEL...
> >>>>>>> > > checking for RTEMS_BSP_FAMILY... xilinx-zynq
> >>>>>>> > > checking for CPU_CFLAGS... (cached) -march=armv7-a -mthumb
> >>>>>>> -mfpu=neon
> >>>>>>> > > -mfloat-abi=hard -mtune=cortex-a9
> >>>>>>> > > checking for CFLAGS_OPTIMIZE_V... (cached) -O2 -g
> >>>>>>> -ffunction-sections
> >>>>>>> > > -fdata-sections
> >>>>>>> > > checking for style of include used by gmake... GNU
> >>>>>>> > > checking for arm-rtems4.12-gcc... no
> >>>>>>> > > configure: error: no acceptable cc found in $PATH
> >>>>>>> > > gmake[2]: *** [xilinx_zynq_zedboard] Error 1
> >>>>>>> > > gmake[2]: Leaving directory
> >>>>>>> > > `/mnt/D/development/rtems/kernel/zynq/arm-rtems4.12/c'
> >>>>>>> > > gmake[1]: *** [all-recursive] Error 1
> >>>>>>> > > gmake[1]: Leaving directory
> >>>>>>> > > `/mnt/D/development/rtems/kernel/zynq/arm-rtems4.12/c'
> >>>>>>> > > make: *** [all-recursive] Error 1
> >>>>>>> > >
> >>>>>>>
> >>>>>>> So if I understand it correctly, the RSB finished sucessfully? Then
> >>>>>>> you
> >>>>>>> should have binaries like arm-rtems-4.12-* installed to the directory
> >>>>>>> you
> >>>>>>> passed to the RSB.
> >>>>>>> Configure complains that it cannot find said binaries. That is
> >>>>>>> probably
> >>>>>>> because you haven't added them to your PATH environment variable.
> >>>>>>> You can do that with (use the correct path to the bin-directory of
> >>>>>>> your
> >>>>>>> setup)
> >>>>>>> export PATH=/mnt/D/development/rtems/compiler/4.12/bin:$PATH
> >>>>>>>
> >>>>>>> Try the configure command again after that.
> >>>>>>>
> >>>>>>> > > It's a problem of directories ? or the configuration I did ? ( I
> >>>>>>> took
> >>>>>>> the
> >>>>>>> > > same configuration you did Jan , because I have no ideas what is
> >>>>>>> those
> >>>>>>> > > configurations and how to choose that if any body has an
> >>>>>>> explanation
> >>>>>>> for
> >>>>>>> > > this part)
> >>>>>>>
> >>>>>>> The configure command is part of the autotools and very common in the
> >>>>>>> Linux/Unix world when building programs from source.
> >>>>>>> It checks if all the dependencies are met before you build it and
> >>>>>>> gives
> >>>>>>> you the ability to configure which features of the program you want
> >>>>>>> to
> >>>>>>> enable and where to install it.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> > >
> >>>>>>> > >
> >>>>>>> > > Thank you
> >>>>>>> > >
> >>>>>>> > >
> >>>>>>> > >
> >>>>>>> > > ________
> >>>>>>> > >
> >>>>>>> > > *Badr EL HIOUEL*
> >>>>>>> > > Mail : elh.badr at gmail.com
> >>>>>>> > >
> >>>>>>> > >
> >>>>>>> > > 2016-03-17 23:16 GMT+01:00 Chris Johns <chrisj at rtems.org>:
> >>>>>>> > >
> >>>>>>> > >> On 18/03/2016 03:12, Jan Sommer wrote:
> >>>>>>> > >>
> >>>>>>> > >>> Am 2016-03-17 16:31, schrieb Badr El Hiouel:
> >>>>>>> > >>>
> >>>>>>> > >>>> I had this error that I can't found anywhere the solution for
> >>>>>>> it.
> >>>>>>> I
> >>>>>>> > >>>> attached the report bug .. Can you please tell me what is
> >>>>>>> going
> >>>>>>> wrong ?
> >>>>>>> > >>>>
> >>>>>>> > >>>
> >>>>>>> > >>> It seems to be the same error which occurs quite often here
> >>>>>>> recently.
> >>>>>>> > >>> Apparently you need to install the python-development packet.
> >>>>>>> > >>> On a debian based distro it should be python-dev or
> >>>>>>> libpython2.7-dev
> >>>>>>> > >>>
> >>>>>>> > >>
> >>>>>>> > >> I have added a note about this in the up coming Getting Started
> >>>>>>> Guide:
> >>>>>>> > >>
> >>>>>>> > >>
> >>>>>>> > >>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> https://ftp.rtems.org/pub/rtems/people/chrisj/docs/user/start/index.html#development-version
> >>>>>>> > >>
> >>>>>>> > >> It is difficult for the RSB to track dependences for packages
> >>>>>>> like
> >>>>>>> this.
> >>>>>>> > >> There are plans but they have not been implemented.
> >>>>>>> > >>
> >>>>>>> > >> Chris
> >>>>>>> > >> _______________________________________________
> >>>>>>> > >> users mailing list
> >>>>>>> > >> users at rtems.org
> >>>>>>> > >> http://lists.rtems.org/mailman/listinfo/users
> >>>>>>> > >>
> >>>>>>> > >
> >>>>>>> > >
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
More information about the users
mailing list