Exemple #1
0
#! /usr/bin/env python
"""
Simplistic GDB server for LEON.
"""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../.."))

from playtag.lib.userconfig import UserConfig
from playtag.gdb.transport import connection
from playtag.leon3.jtag_ahb import LeonMem
from playtag.leon3.gdbproc import CmdProcessor

config = UserConfig()
args = config.loaddefault("leongdb.cfg")
if args:
    raise SystemExit("Unsupported arguments: %s" % args)

cablemodule = config.getcable()

try:
    driver = cablemodule.Jtagger(config)
    if config.SHOW_CABLE and not config.SHOW_CONFIG:
        print "\nUsing driver %s, device %s" % (config.CABLE_DRIVER, config.CABLE_NAME)

    if not os.path.exists(config.JTAGID_FILE) and "/" not in config.JTAGID_FILE:
        config.JTAGID_FILE = os.path.join(config.root, config.JTAGID_FILE)

    if not os.path.exists(config.JTAGID_FILE):
Exemple #2
0
#! /usr/bin/env python
'''
Simplistic GDB server for LEON.
'''

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../..'))

from playtag.lib.userconfig import UserConfig
from playtag.gdb.transport import connection
from playtag.leon3.jtag_ahb import LeonMem
from playtag.leon3.gdbproc import CmdProcessor

config = UserConfig()
args = config.loaddefault('leongdb.cfg')
if args:
    raise SystemExit("Unsupported arguments: %s" % args)

cablemodule = config.getcable()

try:
    driver = cablemodule.Jtagger(config)
    if config.SHOW_CABLE and not config.SHOW_CONFIG:
        print "\nUsing driver %s, device %s" % (config.CABLE_DRIVER,
                                                config.CABLE_NAME)

    if not os.path.exists(
            config.JTAGID_FILE) and '/' not in config.JTAGID_FILE:
        config.JTAGID_FILE = os.path.join(config.root, config.JTAGID_FILE)
#! /usr/bin/env python
import sys
import os

os_cmd = sys.argv[0]

root = os.path.join(os.path.dirname(__file__), '../..')
sys.path.insert(0, root)

from playtag.svf import runsvf
from playtag.lib.userconfig import UserConfig
from playtag.jtag.discover import Chain


config = UserConfig()
config.readargs(parseargs=True)


class SvfDefaults(object):
    SVF = None

config.add_defaults(SvfDefaults)

if not config.SVF:
    print 'Expected SVF=<fname>'

cablemodule = config.getcable()

driver = cablemodule.Jtagger(config)

runsvf(config.SVF,driver)
Exemple #4
0
'''
Simplistic chain discovery
'''

import sys
import os

os_cmd = sys.argv[0]

root = os.path.join(os.path.dirname(__file__), '../..')
sys.path.insert(0, root)

from playtag.lib.userconfig import UserConfig
from playtag.jtag.discover import Chain

config = UserConfig()
config.readargs(parseargs=True)


def showtypes():
    cables = os.listdir(os.path.join(root, 'playtag/cables/'))
    cables = (x for x in cables if not x.startswith(('_', '.')))
    raise SystemExit('''

usage: %s <cabletype> [<cablename>] [<option>=<value>]

Valid cabletypes are the subpackages under playtag/cables:
    %s

Valid cablenames and options vary by cabletype --
    type '%s <cabletype>' for a list.
Exemple #5
0
'''
Simplistic chain discovery
'''

import sys
import os

os_cmd = sys.argv[0]

root = os.path.join(os.path.dirname(__file__), '../..')
sys.path.insert(0, root)

from playtag.lib.userconfig import UserConfig
from playtag.jtag.discover import Chain

config = UserConfig()
config.readargs(parseargs=True)

def showtypes():
    cables = os.listdir(os.path.join(root, 'playtag/cables/'))
    cables = (x for x in cables if not x.startswith(('_', '.')))
    raise SystemExit('''

usage: %s <cabletype> [<cablename>] [<option>=<value>]

Valid cabletypes are the subpackages under playtag/cables:
    %s

Valid cablenames and options vary by cabletype --
    type '%s <cabletype>' for a list.