From 79e1611103b288b114e36df7a8783b7274386724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Sat, 28 Mar 2009 00:31:24 +0000 Subject: [PATCH] implement bsdl2jtag as a wrapper script that calls jtag shell with 'bsdl dump ...' git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1467 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 3 +++ jtag/doc/UrJTAG.txt | 4 ++-- jtag/src/Makefile.am | 3 +++ jtag/src/bsdl2jtag | 48 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100755 jtag/src/bsdl2jtag diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 37d71dfa..117ff453 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,5 +1,8 @@ 2009-03-28 Arnim Laeuger + * src/bsdl2jtag, src/Makefile.am, doc/UrJTAG.txt: implement bsdl2jtag + as a wrapper script that calls jtag shell with 'bsdl dump ...' + * src/Makefile.am, src/bsdl2jtag.c: removed bsdl2jtag 2009-03-27 Arnim Laeuger diff --git a/jtag/doc/UrJTAG.txt b/jtag/doc/UrJTAG.txt index 910ac112..9827ccdc 100644 --- a/jtag/doc/UrJTAG.txt +++ b/jtag/doc/UrJTAG.txt @@ -82,8 +82,8 @@ that. Please also send proven working files back to this project. Starting with post-0.7 releases, UrJTAG contains a BSDL subsystem that retrieves the descriptions for chips in the chain from BSDL files on the -fly. Be aware that this feature is currently experimental and may not work -with every BSDL file yet. +fly. "bsdl2jtag" is in fact a wrapper that uses the BSDL subsystem to +convert the BSDL file. ==== SVF files ==== diff --git a/jtag/src/Makefile.am b/jtag/src/Makefile.am index ef88ceba..8fe33ddf 100644 --- a/jtag/src/Makefile.am +++ b/jtag/src/Makefile.am @@ -42,6 +42,9 @@ endif bin_PROGRAMS = \ jtag +bin_SCRIPTS = \ + bsdl2jtag + jtag_SOURCES = \ jtag.c diff --git a/jtag/src/bsdl2jtag b/jtag/src/bsdl2jtag new file mode 100755 index 00000000..f7ebaab9 --- /dev/null +++ b/jtag/src/bsdl2jtag @@ -0,0 +1,48 @@ +#!/bin/bash +# +# $Id$ +# +# Convert a BSDL file to a jtag part description +# +# Copyright (C) 2009, A. Laeuger +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# + +scriptname=`basename $0` + +function usage () +{ + cat < +Converts a BSDL file to a jtag part description. + +Parameters + bsdl-file : Name of BSDL file + jtag-file : Name of converted jtag description file + +EOF +} + +if [[ -z $1 || -z $2 ]]; then + usage + exit 1 +fi + + +echo "bsdl dump $1" | jtag > $2 + +exit 0