Difference between revisions of "PCI card code assembly on Linux"

From MCEWiki
 
Line 15: Line 15:
 
== Install CLAS ==
 
== Install CLAS ==
  
The assembler binaries are available from Astrocam [ http://www.astro-cam.com/arcpage.php?txt=software.php#dsp ], or from mhasse [http://e-mode/~mhasse/mce/clas563.zip].  We need the versions for the DSP56300 family.
+
The assembler binaries are available from Astrocam [ http://www.astro-cam.com/arcpage.php?txt=software.php#dsp ], or from mhasse [http://e-mode.phas.ubc.ca/~mhasse/mce/arc_pci/clas563.zip].  We need the versions for the DSP56300 family.
  
 
This will grab the binaries and put them in the right place:   
 
This will grab the binaries and put them in the right place:   
  wget http://e-mode/~mhasse/mce/clas563.zip
+
  wget http://e-mode.phas.ubc.ca/~mhasse/mce/arc_pci/clas563.zip
 
  unzip clas563.zip
 
  unzip clas563.zip
 
  mv CLAS563 ~/.wine/drive_c/
 
  mv CLAS563 ~/.wine/drive_c/

Revision as of 12:06, 30 April 2010

Assembler and linker

Motorola/Frescale provide a Windows/DOS assembler/linker, called CLAS. The binaries run quite well under Linux via Wine. An exception is the final hex-file creation step that converts the .lod file to an Intel S-record file for use with an eprom burner; we have our own code for that.

Install and configure Wine

To install wine (the Windows Emulator for Linux):

sudo apt-get install wine
wine

Running wine with no arguments should initialize it and create a place for the fake windows file system it uses.


Install CLAS

The assembler binaries are available from Astrocam [ http://www.astro-cam.com/arcpage.php?txt=software.php#dsp ], or from mhasse [1]. We need the versions for the DSP56300 family.

This will grab the binaries and put them in the right place:

wget http://e-mode.phas.ubc.ca/~mhasse/mce/arc_pci/clas563.zip
unzip clas563.zip
mv CLAS563 ~/.wine/drive_c/

You could now run the programs via, e.g.

wine ~/.wine/drive_c/CLAS563/BIN/ASM56300.EXE <args>


Install wrapper scripts

The arc_pci repository includes a folder "clash" which contains the lod2s program and some wrapper scripts for launching the CLAS programs. The scripts, and the lod2s program, should probably be copied into the path somewhere. I use ~/bin.

MY_BIN=~/bin
cd src/arc_pci
cd clash
make -C srec lod2s
cp srec/lod2s script/* $MY_BIN

Now the makefiles in, e.g., arc_pci/trunk should work.

The wrapper scripts assume location ~/.wine/drive_c/CLAS563/BIN/ for the CLAS windows binaries. You can override this by putting

export CLAS_BIN=/somewhere/else

in your .bashrc .