MPCBDM:  last update: 2002/04/05

BDM Interface for MPC860/850/823 with gdb access

This is experimental. It works fine for me, but don't expect too much:
     recent stable version is: mpcbdm-1.2.3.tar.gz (130701 Bytes). See below for details.

Here's a for non-commercial usage free blueprint for a BDM interface for the MPC860/850/823. Included in the source archive mentioned below is the source code for a new gdb target mpcbdm for i386 hosts running gnu/linux. This target communicates over an i386 standard printer port through the interface with the BDM-Port of the MPC860/850/823  processor. This provides full control over the processor through the GNUs gdb debugger interface.

Features:

Contact and Help:

Please mailto:bdm4gdb-users@lists.sourceforge.net if you have any questions, problems, new ideas!
This list is search able via http://www.geocrawler.com/redir-sf.php3?list=bdm4gdb-users .

News

2002/04/05:
    mpcbdm-1.2.3 released. Total reworked, configurable flash routines . MSR/SRR1 bug fixed.

2001/06/26:
    1.2.1 Cygwin/Insight version,
    prerelease of 1.2.2 version supporting linux-2.4 tablewalk, mmu and cache debugging, dcache flushing, mem upload/download

Hardware:

There are two adapter versions, called adapter version 1 and 2. I recommend using the newer one, adapter version 2, though this version is not compatible to Sergey's design and older BDM projects.

Adapter Version 2:

The schematic for adapter version 2  can be found here : VDB2.gif (53691 Bytes). It has one ten pin BDM header supporting both VFLS lines, and an additional 16 pin COP/JTAG header (still no software support, because of no COP documentation available to the public. Please contact me, if you find a link to public documentation).

Adapter Version 1:

Just for the sake of completeness:
This first adapter version uses only two 14 pins DIP ICs 74HC14 (six inverting Schmitt-Triggers) and a couple of discrete elements: MPCBDM.GIF (48362 Bytes). With a little soldering experience the interface is build in less than one hour (ok, let's say in less than three hours ;-).
!NOTE!: This adapter version only supports the FRZ BDM header. If your BDM connector uses the VFLS signals, you need to add an AND gate between these two signals, pin 1 and 6 from MPC connector, and feed this product to the PC , pin 1 from PC connector (replacing the original pin 1 connection).  See Erwin Rol's solution for this problem:  VFLS.txt .

Software:

Get the latest source archive  mpcbdm-1.2.3.tar.gz and compile together with GNU-gdb   source code (tested with gdb-5.0, for other versions please read the details below). Follow the  README.txt (9427 Bytes) on how to build the cross-gdb (there's a bash script (BuildGDB) included to easily build an i386-linux hosted, ppc targeted gdb) and how to activate the new target mpcbdm (all files but gdb/ included in the archive ;-).
 

File Size (Bytes) Date Comment
mpcbdm-1.2.3.tar.gz
130701
2002/04/05
reworked FLASH routines, MSR/SRR1 bug fixed
mpcbdm-1.2.2-pre.tar.gz 122884 2001/06/26 pre release for testing new features
mpcbdm-1.2.1-Insight.tar.gz 32043 2001/06/14 Jean-Paul Iribarren's version under Cygwin and Insight (please read notes below)
mpcbdm-1.2.1.tar.gz 114911 2001/05/16 workaround for dcache bug
mpcbdm-1.2.tar.gz 55703 2000/11/21 added adapter v2 support, using gdb-5.0
mpcbdm-1.0.tar.gz 102940 2000/08/11 first release, adapter v1 only, using gdb-4.18

MPCBDM Version 1.2.3:

In this version the FLASH routines got totaly reworked. No need to recompile the target for different FLASH devices or different boards. Bank configuration is done at runtime. Support for different devices is achieved through a text configuration file which is getting parsed by a little  sequence parser. Please send me your Flash.dev files if you got another device working. MSR/SRR1 bug fixed (machine state got corrupted when entering debug mode, especially disturbing on early kernel debugging).

MPCBDM Version 1.2.2-pre:

This version is a pre-release, for I changed a lot of the source code, and hadn't yet the time to test all impacts in depth.
Removed some bugs in the BDM protocol, added proper linux-2.4 tablewalk (user space should work also now), support for mmu and cache debugging (and dcache flushing), binary down and upload.

MPCBDM Version 1.2.1-Insight:

This version is running under Cygwin 1.3.2, using Insight-GDB 5.0. For I/O-port access you might need DLPORTIO.dll on some systems. You can download this package from http://www.sstnet.com/ftp/unsupported/port95nt.exe

The link for port95nt.exe seems to be invalid for some weeks now. But you can still find port95nt.exe under  http://www.driverlinx.com/ftp/unsupported/

MPCBDM Version 1.2.1:

!NOTE!:  versions 1.1 and 1.2 contain a severe cache handling bug. This version is a simple workaround by disabling the data cache invalidation. As with the previous version you'll still have trouble with modified valid cache entries, as the bdm interface always accesses physical memory, and doesn't see the cache contents (you'll see old values for variables sometimes). I'll try to fix this in the next version, which is under development. I also extended the mpc.init file, which allows you now to start a kernel right from the debugger from target's RAM without the need of any boot loader. This works fine the STK board and TQM modules, other boards need macro adjustments.

MPCBDM Version 1.2:

This mpcbdm version supports both adapters. Version 1.2 is for use with gdb-5.0. Source code is tested with gdb-4.18, but the build script has changed (try the old script, if you need to stay with gdb-4.18).

MPCBDM Version 1.0:

I've tried to make the adapter compatible with Sergey's adapter and earlier versions (so maybe give the target a try on your old hardware?).

Tools:

Here's  BuildLinux , a small bash script for preparing zvmlinux[.initrd] to make gdb load the image [+initrd] section with the mpcbdm target.

Acknowledgements:

Based on Sergey Drazhnikov work, thanks Sergey!

Tested with a MPC860SR 50MHz on a TQ-Components TQM860-Board.

Thanks goes also to Wolfgang Denk, http://www.denx.de/ , for lots of ideas and hints and aid to get the board running linux.

Thanks to Raphael Bossek for the sourceforge project site:
http://bdm4gdb.sourceforge.net/ and http://sourceforge.net/projects/bdm4gdb/ .

Thanks to Erwin Rol for his VFLS solution for the first adapter version.

Thanks to Jean-Paul Iribarren for bug fixes and his Cygwin / Insight version of the mpcbdm target.

Thanks to anybody else who have taken part in developing this project and I forgot to mention here explicitly.

No Warranty! Use at own risk!
Watch out for the voltages allowed on the BDM port input pins of your target processor!

Requires a host running linux, tons of installed software...

Have fun!
 

Copyright (c) 1999, 2000, 2001, 2002 VAS GmbH, Hamburg, Germany.
Visit our home page at http://www.vas-gmbh.de/ .
Contact me via mailto:Frank.Przybylski@vas-gmbh.de