Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Feb 2008 05:21 PM by  ptymps
JTAG via BDI2000 - How to?
 13 Replies
Sort:
You are not authorized to post a reply.
Author Messages
jesus.ruizdeinfante@hale.at
New Member
New Member
Posts:


--
30 May 2007 06:51 AM
    Hi!

    We would want to debug the LITELIT board via a BDI2000 JTAG interface and
    have some basic questions:

    1. Where is the baseboard schematics?
    2. How should the JTAG debug jumpers be set?
    3. Does someone know how to configure (config file) a BDI2000 JTAG debug
    interface to use it with the LITEKIT board?

    Thanks in advance,

    jesrui
    jesus.ruizdeinfante@hale.at
    New Member
    New Member
    Posts:


    --
    30 May 2007 07:59 AM
    I answer myself!

    The base board schematics can be found at

    http://www.logicpd.com/ep...e/devkit/imx_devkit/

    But I still can't find any doc about the jumper settings.
    kurtl@logicpd.com
    New Member
    New Member
    Posts:


    --
    30 May 2007 09:06 AM
    jesrui,

    No jumpers are required on the JTAG header for the MX31 product. The BDI2000 will connect just fine.

    Please note, the MX31 cpu has multiple cores on the JTAG chain. This is information you need to connect with the BDI.

    SCANPRED 2 9
    SCANSUCC 1 4

    -K
    jesus.ruizdeinfante@hale.at
    New Member
    New Member
    Posts:


    --
    31 May 2007 08:36 AM
    Ok, we've got basic JTAG debugging via BDI 2000 working.

    HOW TO


    0. Jumper settings: JP2: no special config needed, just leave them as
    specified in the QuickStart Guide, p. 14

    1. Set up a tftp server on the PC to contain BDI 2000 config files

    2. BDI 2000 config file: The following basic configuration is based on the
    Freescale M9328MX31ADS board and seems to work for us. It may be incomplete, thought:

    [TARGET]
    CPUTYPE ARM1136
    ;CLOCK 10 ; work fine for bring-up JTAG clock (0=Adaptive,1=16MHz,2=8MHz,3=4MHz, 10=10KHz)
    CLOCK 1 ; high speed with Freescale MX31 ADS
    WAKEUP 200 ; because of medium rising reset line
    RESET HARD 100 ; beause of light capacitive load on reset line
    ENDIAN LITTLE ; memory model (LITTLE | BIG)
    BREAKMODE HARD ; HARD, ARM / Thumb break code
    ;VECTOR CATCH 0x1f ;catch D_Abort, P_Abort, SWI, Undef and Reset
    ;VECTOR CATCH 0x00 ;do not catch any vector
    SCANPRED 2 9 ;
    SCANSUCC 1 4 ; the ETMBUF after the ARM1136 core
    STARTUP RESET ; the ARM 11 core is stop after reset


    [HOST]
    IP 192.168.100.120
    PROMPT Freescale-Mx31>
    ;FILE /bdi2000/appramMX31ADS.elf
    FORMAT ELF
    LOAD MANUAL ; load code MANUAL or AUTO after reset

    [REGS]
    FILE /bdi2000/reg1136.def


    3. Connect the BDI 2000 to the LITEKIT with the JTAG cable, and the BDI 2000 to
    the PC via Ethernet.

    4. Power up the BDI 2000 and telnet to it from the PC


    $ telnet 192.168.100.225
    Trying 192.168.100.225...
    Connected to 192.168.100.225.
    Escape character is '^]'.
    BDI Debugger for ARM
    ====================
    ...

    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc


    5. Connect the LITEKIT to the power supply and press the Power On button.
    Something like the following should appear on the telnet console:


    - TARGET: waiting for target Vcc
    - TARGET: processing power-up delay
    - TARGET: processing reset request
    - TARGET: BDI asserts TRST and RESET
    - TARGET: BDI removes TRST
    - TARGET: Bypass check 0x00000001 => 0xFFFFFFFF
    - TARGET: JTAG exists check failed
    - TARGET: Remove RESET and try again
    - TARGET: BDI waits for RESET inactive
    - TARGET: Bypass check 0x00000001 => 0x00000008
    - TARGET: JTAG exists check passed
    - Core#0: ID code is 0x07B3601D
    - Core#0: DIDR is 0x15110004
    - TARGET: BDI removes RESET
    - TARGET: BDI waits for RESET inactive
    - TARGET: Reset sequence passed
    - TARGET: resetting target passed
    - TARGET: processing target startup ....
    - TARGET: processing target startup passed
    Freescale-Mx31>


    * type 'go' to launch losh

    6. To make a quick test with gdb, we just compiled the second stage boot
    loader from hhyilmaz. See
    http://www.logicpd.com/su...rder=asc&start=0
    http://mx31.lbox.ca/download/bootloader.tar.gz

    * Do not forget to add '-g' to the CFLAGS in the Makefile.
    * Download the executable as follows:


    losh> load raw 0x800d0384 71348
    loading from stdin:
    loading raw binary to 0x800d0384 (ram) len 000116b4:
    ............done
    file loaded
    losh>


    (See the thread above for the load magic numbers)

    7. On the PC, start up gdb, connect to the remote target, set a break point
    at main, and type "cont" to continue with losh:


    $ arm-elf-gdb.exe test
    GNU gdb 6.0
    Copyright 2003 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf"...
    (gdb) target remote 192.168.100.225:2001
    Remote debugging using 192.168.100.225:2001
    0x8000320c in ?? ()
    (gdb) break *0x800d0384
    Breakpoint 1 at 0x800d0384: file test.c, line 232.
    (gdb) cont
    Continuing.


    8. On the LogicLoader shell, type 'jump' to start executing the test code just
    downloaded. gdb should stop the program on the break point:


    Breakpoint 1, main (argc=0, argv=0x800d0384) at test.c:232
    232 {
    (gdb) list
    227 }
    228
    229
    230
    231 int main(int argc,char *argv[])
    232 {
    233
    234 void (*theKernel)(void);
    235 u32 exec_at = (u32)-1;
    236 u32 parm_at = (u32)-1;
    (gdb) step
    235 u32 exec_at = (u32)-1;
    (gdb)
    236 u32 parm_at = (u32)-1;
    (gdb)
    237 int machine_type = 447 ;
    (gdb) info locals
    theKernel = (void (*)(void)) 0x8000245c
    exec_at = 2147535192
    parm_at = 2147824180
    machine_type = -2147143096
    i = -2147369724
    (gdb) step
    238 int i = 0 ;
    (gdb)
    240 exec_at = DRAM_BASE;
    (gdb)
    241 parm_at = PARAM_LOAD_ADRESS_BASE + 0x100;
    (gdb)
    242 setup_tags(parm_at); /* sets up parameters */
    (gdb)
    258 return 0;
    (gdb) run
    The program being debugged has been started already.
    Start it from the beginning? (y or n) n


    TODO


    - gdb does not step into subroutines with the 'step' command. A possible
    explanation is that gdb and gcc disagree about the frame pointer register setup?
    guijuan721@sina.com
    New Member
    New Member
    Posts:


    --
    12 Jul 2007 07:49 AM
    Recently i buy a MX31 board , i want to use the BDI2000 download LogicLoader,i see your
    subject , you have already successed. I see the config file you posted,but i do not have the BDI2000 firmware of ARM11, Where can I get the BDI2000 firmware of the ARM11?

    Thank you !
    jesus.ruizdeinfante@hale.at
    New Member
    New Member
    Posts:


    --
    13 Jul 2007 06:15 AM
    Posted By basara on 12 Jul 2007 7:49 AM
    Where can I get the BDI2000 firmware of the ARM11?





    We got the BDI2000 firmware directly from ABATRON.
    guijuan721@sina.com
    New Member
    New Member
    Posts:


    --
    13 Jul 2007 07:10 AM

    dhmcintire
    New Member
    New Member
    Posts:


    --
    12 Nov 2007 04:56 PM
    I'm wondering if anyone else has had issues connecting their BDI2000 to the Litekit. For some reason I cannot get mine to pass the bypass test. The config file is essentially identical to the one previously posted by jesrui. I'm connecting using the TargetA port on my BDI using the ARM/Xscale cable supplied by Abatron (14 pin to 20 pin cable). I've included my config parameters, bdi firmware setup, and the console output from the telnet session when connected. Is this the same setup as others out there who can get this thing to actually connect? Any feedback/help would be greatly appreciated... I'm getting extremely frustrated.... I'm not able to get past step 5 on the how-to.

    MX31 config file:

    [TARGET]
    CPUTYPE ARM1136
    ;CLOCK 10 ; work fine for bring-up JTAG clock (0=Adaptive,
    1=16MHz,2=8MHz,3=4MHz, 10=10KHz)
    CLOCK 1 ; high speed with Freescale MX31 ADS
    WAKEUP 200 ; because of medium rising reset line
    RESET HARD 200 ; beause of light capacitive load on reset line
    ENDIAN LITTLE ; memory model (LITTLE | BIG)
    BREAKMODE HARD ; HARD, ARM / Thumb break code
    ;VECTOR CATCH 0x1f ;catch D_Abort, P_Abort, SWI, Undef and Reset
    ;VECTOR CATCH 0x00 ;do not catch any vector
    SCANPRED 2 9 ;
    SCANSUCC 1 4 ; the ETMBUF after the ARM1136 core
    STARTUP RESET ; the ARM 11 core is stop after reset


    bdisetup output:
    $bdisetup -v -p/dev/tty.usbserial-FTC9PMDK -b115
    BDI Type : BDI2000 Rev.C (SN: 11291645)
    Loader : V1.06
    Firmware : V1.04 bdiGDB for ARM11
    Logic : V1.06 ARM
    MAC : 00-0c-01-11-29-16
    IP Addr : 192.168.0.66
    Subnet : 255.255.255.0
    Gateway : 192.168.0.1
    Host IP : 192.168.0.3
    Config : GDBARM11/current.cfg

    BDI output:
    - TARGET: processing reset request
    - TARGET: BDI asserts TRST and RESET
    - TARGET: BDI removes TRST
    - TARGET: Bypass check 0x00000001 => 0xFFFFFFFF
    - TARGET: JTAG exists check failed
    - TARGET: Remove RESET and try again
    - TARGET: BDI waits for RESET inactive
    - TARGET: Bypass check 0x00000001 => 0x00000000
    - TARGET: JTAG exists check failed


    Dustin
    justin.waters
    New Member
    New Member
    Posts:


    --
    13 Nov 2007 08:38 AM
    Here is a snippet of my config file that you can add to get NOR flash support on the MX31 LiteKit using the BDI 2000. Note that you need to use the unlock command before you can write or erase anything.

    This works great if you accidentally delete LogicLoader.


    [FLASH]

    ;WORKSPACE 0x00001000 ;workspace in target RAM for fast programming algorithm
    CHIPTYPE I28BX16 ;Flash type (AM29F | AM29BX8 | AM29BX16 | I28BX8 | I28BX16)
    CHIPSIZE 0x200000 ;The size of one flash chip in bytes
    BUSWIDTH 16 ;The width of the flash memory bus in bits (8 | 16 | 32)
    ;FILE $arm1136.cfg
    FORMAT ELF
    ERASE 0xA0000000 0x2000 8 UNLOCK ; Boot sectors - 8 blocks, 8 KB each
    ERASE 0xA0010000 0x10000 31 UNLOCK ; 31 Blocks, 64 KB each
    justin.waters
    New Member
    New Member
    Posts:


    --
    13 Nov 2007 08:44 AM
    Posted By dhmcintire on 12 Nov 2007 4:56 PM
    I''m wondering if anyone else has had issues connecting their BDI2000 to the Litekit. For some reason I cannot get mine to pass the bypass test. The config file is essentially identical to the one previously posted by jesrui. I''m connecting using the TargetA port on my BDI using the ARM/Xscale cable supplied by Abatron (14 pin to 20 pin cable).




    I'm able to connect fine, although I did have a board that would not connect properly. That ultimately ended up being a hardware problem. In that case, however, the board wouldn't boot at all. Did you check the cable? Is it connected to the board properly (i.e. the red wire is connected to pin 1 of J17)? Also, are the jumpers on JP2 set correctly? They shouldn't be making any connections. Try removing them just to make sure.
    dhmcintire
    New Member
    New Member
    Posts:


    --
    13 Nov 2007 09:46 AM
    Thanks for your input Justin. I hope to be able to use flash writing the capability to replace lolo with u-boot, but only if I can get beyond my JTAG bypass problem.

    I've double checked the connector orientation and pulled the jtag shunts off the jumper pins completely (though they are disconnected by default). The BDI does show a target connection, so the orientation seems to be correct. I've even o-scoped the outputs from my BDI and everything looks fine. TRST, TCK, TDI, and TMS all are toggling as expected.

    At this point I'm having to assume there is a hardware issue involved. Justin, was your problematic board a soldering or assembly issue? Did you return it to get a new one?

    Thanks again.
    Dustin
    justin.waters
    New Member
    New Member
    Posts:


    --
    13 Nov 2007 11:06 AM
    I am not entirely sure what the exact problem was. I ultimately just replaced the board. You will probably want to get in touch with a LogicPD representative directly and see what they suggest.

    Good luck!
    mattwick
    New Member
    New Member
    Posts:


    --
    11 Feb 2008 01:26 PM
    Has anyone used a BDI3000?

    We ordered the 2000, but they sent us the 3000 instead. Our .cfg file is from Abatron and has worked for others, but not for us. Our jumpers are in the correct position. We seem to connecting fine. Below is the print out that seems to match what others have seen.

    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc
    - TARGET: waiting for target Vcc
    - TARGET: processing power-up delay
    - TARGET: processing reset request
    - TARGET: BDI executes scan chain init string
    - TARGET: Bypass check 0x00000001 => 0x00000008
    - TARGET: JTAG exists check passed
    - Core#0: ID code is 0x07B3601D
    - Core#0: DIDR is 0x15110004
    - TARGET: BDI removes RESET
    - TARGET: BDI waits for RESET inactive
    - TARGET: Reset sequence passed
    - TARGET: resetting target passed
    - TARGET: processing target startup ....
    - TARGET: processing target startup passed

    At this point however, if we type 'go' into the prompt the system hangs without any printout. Any help would be appreciated.
    ptymps
    New Member
    New Member
    Posts:


    --
    11 Feb 2008 05:21 PM
    Mattwick - Contact me and I will send you a .cfg file that is more accurate. I tried to attach it on this message board but it won't accept the .cfg file type.

    Regards,

    Peter Tympanick
    Ultimate Solutions, Inc.
    Ph: 978-455-3383 x202
    email: ptymps@ultsol.com
    You are not authorized to post a reply.