This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DS-5 and raspberry pi 2

Hi there,

I'm trying to use the raspberry pi 2 with ARM DS-5. The first step is to add the raspberry pi into dev. boards in debug configurations options. How can I do this?

Thanks!

  • Hi john85000 and welcome to the community!

    I have moved your question to Software Development Tools where i hope you will get better visibility to the right people.

  • Hi john85000,

    Sorry for the delay in getting back to you. I am assuming that you have already :

    - configured the relevant Raspberry Pi 2 GPIO pins for JTAG,

    - have connected them up to your DSTREAM unit correctly  ?

    Once this is done and JTAG connectivity enabled, then you need to run the Platform Configuration Editor (PCE) within DS-5 in order to create a configuration database that is suitable and you must also have a DSTREAM unit.

    A guide to PCE can be found at : http://ds.arm.com/developer-resources/tutorials/soc-bring-up-in-ds-5-using-the-platform-configuration-editor-pce/

    You cannot use PCE with ULinK2, ULINKpro or ULINKpro D JTAG debug hardware devices, you must use a DSTREAM unit to define a new target configuration.

    You can find various Jtag Enabling code for the Raspberry Pi (2) on the internet, but remember that the peripheral base for the Rasperry Pi 2 starts at address 0x3F000000, with the consequence that the GPIO block is located at address 0x3F200000.

    The Raspberry Pi 2 Expansion Port pin out can be found at  http://pi.gadgetoid.com/pinout

    When I tried this, I programmed up the relevant GPIO pins as follows :

    GPIO 22 nTRST (expansion port pin 15) – needs to programmed  for GPIO ALT FUCTION 4

    GPIO 27 TMS (expansion port pin 13) – needs to programmed for GPIO ALT FUCTION 4

    GPIO 4 TDI (expansion port pin 7) – needs to programmed for GPIO ALT FUCTION 5

    GPIO 25 TCK (expansion port pin 22) – needs to programmed for GPIO ALT FUCTION 4

    GPIO 24 TDO (expansion port pin 18) – needs to programmed for GPIO ALT FUCTION 4

    Then you need to connect the Raspberry Pi 2 board to the DSTREAM. Individual jumper leads can be used to connect to the ARM JTAG 20 connector.

    The pinout of the JTAG connector can be found at : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0499j/pge1418217069634.html

    You need to do this CAREFULLY. Check, check and double check everything when making these connections.

    ARM cannot be held responsible for any damage that may occur when performing these connections.

    You need to connect the pins as follows :

    JTAG line

    Raspberry Pi Expansion Port pin #

    ARM DSTREAM JTAG pin # /

    Jumper Color

    (see pic below)

    Vcc

    1

    1

    Red

    GND

    39

    4

    Black

    nTRST

    15

    3

    White

    TDI

    7

    5

    Brown

    TMS

    13

    7

    Yellow

    TCK

    22

    9

    Blue

    TDO

    18

    13

    Green

    Pin 11 (RTCK) is not required.

    You should then have something like :

    20151026_155107_resized - Copy.jpg

    The pins labelled are all at the front of the ARM JTAG connector, on the same side as the keyway and are odd-numbered.

    Even-numbered pins are all GND, except pin 2 which is NC.

    Now run the program on the Raspberry Pi 2 to setup the the GPIO pins for JTAG debug.

    Now start DS-5, then you need to configure your connection to the Raspberry Pi 2 with the Platform Configuration Editor (PCE) tool.

    Use the guide at :

    http://ds.arm.com/developer-resources/tutorials/soc-bring-up-in-ds-5-using-the-platform-configuration-editor-pce/

    When using PCE, just choose the 'Automatic platform detection' option and follow the prompts.

    Once done, you should end up with a configuration looking something like :

    Rasp Pi 2 PCE entries final.png

    You can see the 4xCortex-A7's listed plus a configuration for SMP (Symmetric MultiProcessing).

    Once you have got to this stage you should be able to debug your Raspberry Pi 2.

    Please note that if you enabling the JTAG pins under Linux, then Linux will still be running when you are connected with DS-5 and if, for example, you are connected to 1 processor only, Linux will still be running on the other processors and this might cause some unexpected side-effects.

    If you are going to run a bare-metal application (i.e. not under the Linux or other OS) then you may need to incorporate enabling JTAG debug on the pins prior to your application running.

    i.e. something like

    <enable JTAG debug>

       while (1) ; /* wait for debugger to connect & take control */

    Start up application code

    I hope this helps ?

    Regards,

    Stuart