xs1 disassembler, assembler, xc-1a/xc-1/xtag jtag tools

XCore Project reviews, ideas, videos and proposals.
Post Reply
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am
Contact:

xs1 disassembler, assembler, xc-1a/xc-1/xtag jtag tools

Post by segher »

Version: 1628
Status: Public release
License: GPL
Download: http://git.infradead.org/users/segher/dis-xs1.git

http://git.infradead.org/users/segher/dis-xs1.git
Licensed under the GPL, version 2.
Current contents:

A full disassembler
An embryonic assembler
Command-line JTAG tools for XC-1A, XC-1, XTAG (or other 2232-based JTAG)

The assembler and disassembler are written in Forth; they are tested with gforth, but should work

with any ISO Forth. If not, please report.
XC-1 support has some shortcomings, to do with the hardware design.

XTAG support was tested with XC-2.
The JTAG tools are written in C. Current tools are:

reset -- do a hard reset, no debug mode (so it starts the rom code);
run -- upload a binary file from stdin to ram, and start it. This is a binary file, no checksum, no nothing;
dump -- write all ram contents to stdout;
dump-rom -- write rom contents to stdout;
regs -- print out all CPU registers on all threads;
term -- a terminal emulator;
pregs -- print out all pswitch regs;
sregs -- print out all sswitch regs;
psregs -- print out all processor status regs.
resources -- print out all resources.

You can use any core on any device in the JTAG chain on any debug adapter;

see --help for the options to use.
Images:


User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm
Contact:

Post by jonathan »

Segher, these look great. You might want to post this to the forum too so people notice it - you'll get some more responses.

I'll try to test these in the next few days.
Image
User avatar
octal
XCore Addict
Posts: 228
Joined: Thu Jan 27, 2011 3:30 pm
Location: Argenteuil - France
Contact:

Post by octal »

Hello,
just wanted to know where did you got all the info about instructions encoding?
I want to start writing a BASIC or PASCAL native compiler for XMOS devices (more interrested in a structured basic), are you interrested to contribute to such effort? (we can make it a commercial tool)
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am
Contact:

Post by segher »

In the "The XMOS XS1 Architecture" book, which you can download
from the xmos.com documentation section.

Note that there are a few errors in there, some pretty big. Compare
with what xobjdump tells you.

It's likely a lot easier for you to output assembler code, and then run
the assembler on that -- that's what all other compilers do.

I'll be happy to answer any questions you have, but please keep it
on the forum, don't PM; that way, other people with the same questions
aren't left out, and things are more efficient.

I'm not interested in working on a BASIC or Pascal compiler, sorry.
I do like Pascal a lot -- XC has adopted some of its stronger points,
btw.
User avatar
Carpentier
Member++
Posts: 31
Joined: Fri Aug 31, 2012 3:42 pm

Post by Carpentier »

Hello. Really good post.
I did not know that JTAG interface was documented. I looks to be.
Thank for this post .
Post Reply