Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: problem with using Streamline on RTSM - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

problem with using Streamline on RTSM Rate Topic: -----

#1 User is offline   argon 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 20-March 12

Posted 20 March 2012 - 07:03 AM

Hi,
We are trying to use Streamline with RTSM.
We follow the instructions on http://infocenter.ar...424-/index.html to prepare the kernel and build the gator.
Here are the steps we did:
1. Prepare the kernel
export PATH=$PATH:/home/userdir/DS-5/bin
export CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi-
export ARCH=arm
cp /home/userdir/RTSM/distribution/kernel/linux-2.6.38-patched-rtsm/configs/V7 /home/userdir/RTSM/distribution/kernel/linux-2.6.38-patched-rtsm/source/arch/arm/configs
cd /home/userdir/RTSM/distribution/kernel/linux-2.6.38-patched-rtsm/source
make V7
make menuconfig
make -j5 uImage

2. build the gator
make -C /home/userdir/RTSM/distribution/kernel/linux-2.6.38-patched-rtsm/source M=`pwd` ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- modules

3. cp gatord and gator.ko into the RTSM

We have the problem that we could not connect Streamline with RTSM's gator daemon. The problem we guess is that when RTSM is launched, it loads a default kernel that is not we generated in step 1. Hence the gator generated in step 3 mismatches with RTSM's kernel. But we do not know how to deal with this issue and make the Streamline work with RTSM. Any help is appreciated very much!

Thanks.
0

#2 User is offline   SamEllis 

  • Contributor
  • PipPip
  • Group: Members.
  • Posts: 52
  • Joined: 28-November 11

Posted 20 March 2012 - 07:43 AM

You can find the kernel image (linux.axf) and filesystem (rootfs.image) used by the RTSMs in the arm/linux_distribution directory. Sources for these are available, so you can rebuild them if you wish.

The reason that we do not enable Streamline by default to run with the RTSMs is because the RTSMs supplied with DS-5 do not accurately model the internal implementation of an ARM processor. This means that performance data such as cache misses or branch predictions might not be valid. Even if you do get Streamline working, the results might not be useful.
1

#3 User is offline   argon 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 20-March 12

Posted 20 March 2012 - 12:42 PM

Thank you Sam,
If I understand correctly, we need to follow the instructions in the "ARM DS-5 using ARM Streamline>Setting up an ARM Linux target" sections. I paste them as following:
"


Prepare and build your kernel
To prepare your kernel for use with Streamline, download the desired version of the Linux kernel, configure it to your target platform, customize it, and then build it. To do so, follow these steps:

  • Download your desired version of the Linux kernel. For example:

    wget http://www.kernel.or....6.35.7.tar.bz2
  • Unzip the Linux kernel. For example, enter the following command:

    tar xjf linux-2.6.35.7.tar.bz2
  • Navigate to the root source directory of the Linux kernel. For example, enter the following command:

    cd linux-2.6.35.7
  • Enter the following command in your shell to export the cross compiler:

    export CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi-
  • To specify that this build is for an ARM architecture, enter the following command in your shell:

    export ARCH=arm
  • Enter the following to build the configuration file specific to your platform:

    make platform_defconfig

    Replace platform_defconfig in the command with one of the configuration files located in theyour_kernel/arch/arm/configs directory appropriate for your platform or with a configuration file provided by a vendor.
  • To configure menus, enter the following in your shell:

    make menuconfig

    You must enable certain kernel configuration options to run Streamline. The location of some of these options depends on your kernel version:

    General SetupEnable the Profiling Support option.

    Kernel HackingEnable the Trace process context switches option.

    Kernel FeaturesEnable the High Resolution Timer Support option. Enable Use local timer interrupts if you are using aSymmetric MultiProcessing (SMP) target.


    Note
    The Trace context switches and events option is not be visible if you have other Tracers configuration options enabled. Enabling other Tracers configuration options is sufficient to turn on context switches and events and run Streamline.
  • Use the following command to build the image:

    make -j5 uImage


"
If it is true, I believe we did this and get uImage file. I guess it is the kernel image. Hence we replace it with RTSM_EB_V7.axf in DS-RTSM/distribution/boot/RTSM/RTSM_EB_V7. And we get the following error when launch RTSM:
Failed to load application 'boot/RTSM/RTSM_EB_V7/RTSM_EB_V7.axf' into instance 'coretile.core.cpu0':
CADIXfaceBypass() returned CADI status 'GeneralError'.
Error message returned by CADIXfaceGetError:
Error in CADI: while loading application file boot/RTSM/RTSM_EB_V7/RTSM_EB_V7.axf:
boot/RTSM/RTSM_EB_V7/RTSM_EB_V7.axf: file format not recognized (supported formats are: 'ELF, S-Record, Intel-Hex')

So I think maybe we are wrong. And we also find the README.txt in arm/linux_distribution, but we have no idea how to get the sources for the kernel image and we can not find rtsm.zip in DS-5 directory.
Would you please give us some more hints how to get the sources and rebuild the kernel and filesystem etc.

Thank you.

This post has been edited by argon: 20 March 2012 - 01:20 PM

0

#4 User is offline   ttfn 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 576
  • Joined: 29-September 06

Posted 21 March 2012 - 08:41 AM

The RTSMs only model a sub-set of the PMU events - by sub-set I mean two. One of which is CCNT (cycle count) and the RTSMs aren't cycle accurate.

So Streamline (or any other tool that uses the PMU) won't be able to gather much data, and what data it can gather from the PMU won;t be accurate.
1

#5 User is offline   argon 

  • Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 20-March 12

Posted 22 March 2012 - 07:00 AM

Thank you.
I understand. However, we still would like to try to use Streamline and see some profiling results (even they are inaccurate etc.) before we get the hardwares.

Best,

View Postttfn, on 21 March 2012 - 08:41 AM, said:

The RTSMs only model a sub-set of the PMU events - by sub-set I mean two. One of which is CCNT (cycle count) and the RTSMs aren't cycle accurate.

So Streamline (or any other tool that uses the PMU) won't be able to gather much data, and what data it can gather from the PMU won;t be accurate.

1

#6 User is offline   SamEllis 

  • Contributor
  • PipPip
  • Group: Members.
  • Posts: 52
  • Joined: 28-November 11

Posted 23 March 2012 - 09:03 PM

View Postargon, on 20 March 2012 - 12:42 PM, said:

So I think maybe we are wrong. And we also find the README.txt in arm/linux_distribution, but we have no idea how to get the sources for the kernel image and we can not find rtsm.zip in DS-5 directory.
Would you please give us some more hints how to get the sources and rebuild the kernel and filesystem etc.



I have not tried building the kernel myself so the advice I can give is quite limited. Regarding the sources for the kernel image, they are available as a separate download from the ARM website. Here is the URL:

http://www.arm.com/p...5-downloads.php

You probably want the file named DS-5 RTSM Linux Example Distribution. You may have to log-in to the ARM website to download this.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic