README_windows_cygwin_installation.md 8.08 KB

The Spice cable modelling software may be run on windows using Cygwin as follows:

Cygwin installation

Go to the website www.cygwin.com

Under the heading Current Cygwin DLL version

Download the cygwin setup for your machine (32 or 64 bit as appropriate) i.e. click setup-x86.exe or setup-x86_64.exe as appropriate (the following notes are based on 64bit installation but I guess it shouldn't be too different for 32 bit.) Save the file Double click on the file to run it. (i.e. run the cygwin setup executable)

Click next at the copyright page

Choose a download source: (e.g. Install from Internet) Then click next

Choose Root directory: (e.g. C:\cygwin64) Select Install for all users Then click next

Select Local Package Directory (e.g. C:\Program Files (x86)\Mozilla Firefox) Then click next

Select Your Internet Connection as appropriate (e.g. Direct Connection) Then click next

Choose a download Site (e.g. cygwin.mirror.uk.sargasso.net works fine in the UK) Then click next

Select Packages (i.e. what to install) Default is a minimal install and we need some extra stuff so add the following (by clicking where it says 'default' to change to 'install'): Devel X11 In the following click the + sign to expand the top level list (e.g. Editors) , find the package in the list (e.g. nedit), then click where it says 'skip' this then changes to the version number to be installed. Editors->nedit Graphics->gnuplot

Geda requires the following: (use search and 'view' button) - some of these may already be flagged atk-devel crypt file gcc gtk2-x11-devel guile-devel libgmp-devel libtool1.5 make pango-devel patchutils pcre-devel pcre-doc pkg-config xorg-x11-devel xorg-x11-fscl xterm

Then click next

Resolving_dependencies Ensure that the 'select required packages' box is ticked Then click next

(I got an error here but things did proceed OK inspite of this)

The Cygwin setup proceeds. this takes quite a long time...

Postinstall script Errors: Click next

Create Icons Ensure that the 'Create icon on desktop' box is ticked Click Finish

An icon 'Cygwin64 Terminal' appears on the desktop

Run Xlaunch from the programs menu (Programs->Cygwin-X->Xlaunch)

Select Display Settings: Select 'Multiple windows' Click next

Select how to start clients Click 'start no client' Click next

Extra settings Tick clipboard and Native OpenGL Click next

Configuration complete Click finish.

Start a cygwin terminal by clicking the icon on desktop.

Find the name of your cygwin home directory with the command pwd (The result will be something like /home/user)

Ngspice software installation

Go to the ngspice website http://ngspice.sourceforge.net/download.html

click the download button

click the link Download_ngspice-26_140112.zip

download the file and save it to you cygwin home directory. Unzip the file unzip ngspice-26_140112.zip

This should produce the directory spice

Go into the directory spice/bin cd spice/bin

Check the permissions on the file ngspice.exe by trying to run it ngpsice

if you get the message bash: ./ngspice: Permission denied

then give the file executable permissions with chmod +x ngspice.exe

** gmsh software installation**

go to the gmsh website:

http://gmsh.info/

In the Download section click on the Windows 32 bit or 64 bit link as appropriate Save the gmsh zip file in your cygwin home directory.

Unzip the file with the command:

unzip gmsh-2.13.1-Windows (or equivalent for your downloaded version)

the gmsh executable will be in the directory

gmsh-2.13.1-Windows

This directory should be included in your path to allow the software to find gmsh. This is described towards the end of this README file.

{ wxWidgets installation goto the web page: http://www.wxwidgets.org/downloads

under Previous Stable Release 2.8.12, click the wxAll: GZIP button to download. Save the file (wxWidgets-2.8.12.tar.gz) to your cygwin home directory

unzip the file with command gunzip wxWidgets-2.8.12.tar.gz

untar the file with the command tar -xvf wxWidgets-2.8.12.tar

go into the wxWidgets-2.8.12 directory cd wxWidgets-2.8.12

mkdir my-build

cd my-build configure with the following: ../configure --enable-unicode --without-subdirs --disable-compat26 --disable-xrc --host=i686-w64-mingw32 --build=i686-pc-cygwin --disable-precomp-headers { adding --disable-precomp-headers helps the compilation run further but it still fails...}

{if there is an error message to do with "guess build type" check the latest version of automake

automake --version

if the version is 1.10 for example then

find the appropriate automake folder in /usr/share/automake.1.10/config.guess

replace config.guess from the wxWidgets-2.8.12 directory with /usr/share/automake.1.10/config.guess}

fix a bug which stops it making for cygwin...

from wxWidgets-2.8.12 nedit include/wx/filename.h &

change // get the canonical path separator for this format static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE) { return GetPathSeparators(format)[0u]; }

to

// get the canonical path separator for this format static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE) { return GetPathSeparators(format)[(size_t)0u]; }

{see http://stackoverflow.com/questions/23600736/cant-build-wxwidgets-on-cygwin-ambiguous-overload-for-operator-basedll-ape)

make

starting to compile but fails

#######WORKING HERE##########

** geda for cygwin (gschem, gnetlist) ** See the following web page for instructions... http://wiki.geda-project.org/geda:cygwin

got to the website: www.geda-project.org

click download download the gEDA/gaf (stable) version) Tarball

unzip with gunzip geda-gaf-1.8.2.tar.gz tar -xvf geda-gaf-1.8.2.tar.gz

Append these lines to your .bash_profile:

export LD_LIBRARY_PATH=$HOME/geda/lib:$LD_LIBRARY_PATH export PATH=$HOME/geda/bin:$PATH export PKG_CONFIG_PATH=$HOME/geda/lib/pkgconfig:$PKG_CONFIG_PATH

Update your environment: source .bash_profile

Fix cygwin compillation bug:

edit the following files and add /usr/lib/libgio-2.0.dll.a to *_LDADD nedit libgeda/src/Makefile.am gschem/src/Makefile.am gattrib/src/Makefile.am gsymmcheck/src/Makefile.am gnetlist/src/Makefile.am utils/gschlas/Makefile.am

run configuration script ./configure --prefix=$HOME/geda

make

make install

The code compiles but gschem exits with segmentation fault.

WORKING HERE

gspiceui installation go to the website: http://sourceforge.net/projects/gspiceui click the download button and save the file gspiceui-v1.0.00.tar.gz to your cygwin home directory

unzip the file with command gunzip gspiceui-v1.0.00.tar.gz

untar the file with the command tar -xvf gspiceui-v1.0.00.tar

WORKING HERE BUT NEED wxwidgets...

}

** download gwave** http://gwave.sourceforge.net/

ESA_SPICE_CABLE_MODELLING software installation

Go to the git server website: 128.243.70.77

Log in to GitLab using you username and password

go to the ESA_SPICE_CABLE_MODELLING project

click the Download zip button (top RH corner) and save the zip file to your cygwin home directory. The file name will be of the form ESA_SPICE_CABLE_MODELLING-CHECKOUT_ID.zip where CHECKOUT_ID is a long hex number

unzip the file with the command unzip ESA_SPICE_CABLE_MODELLING-CHECKOUT_ID.zip

You should now have a directory ESA_SPICE_CABLE_MODELLING.git

Go into the source code directory and make the executables cd ESA_SPICE_CABLE_MODELLING.git/SRC make

Setting your PATH correctly Once the software is installed yoout PATH needs to be set so that the executables can be found

Go to your cygwin home directory and Edit or create a file .bash_profile with the command nedit .bash_profile Add the folllowing line to the end of the file to include ngspice and gmsh in your path PATH="${HOME}/spice/bin:${HOME}/gmsh-2.13.1-Windows:.:${PATH}" then save the file and exit the editor.

*Running the ESA_SPICE_CABLE_MODELLING software *

Go into the test case directory cd ../TEST_CASES

Run all the available test cases with the command ./generate_spice_cable_model run

Plot all the results with the coommand ./generate_spice_cable_model plot

Using the spice transmission line models in your own circuits

You will need the following software: gschem