summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-02-21 19:31:16 +0100
committerMichael Buesch <mb@bu3sch.de>2010-02-21 19:31:16 +0100
commitdfa3c5fe7109ba7d5d4c7e80298e486b81457563 (patch)
treefab664f9c92efc7ff8ce90a34a5fcfede2dd7577
parent707447637f6e020a07e462f9499e05ede65c4ab9 (diff)
downloadtoprammer-dfa3c5fe7109ba7d5d4c7e80298e486b81457563.tar.xz
toprammer-dfa3c5fe7109ba7d5d4c7e80298e486b81457563.zip
Add setup.py
Signed-off-by: Michael Buesch <mb@bu3sch.de>
-rw-r--r--.gitignore2
-rw-r--r--README14
-rw-r--r--libtoprammer/__init__.py (renamed from top2049/__init__.py)0
-rw-r--r--libtoprammer/bit/.gitignore (renamed from bit/.gitignore)0
-rw-r--r--libtoprammer/bit/atmega32dip40.bit (renamed from bit/atmega32dip40.bit)bin24790 -> 24790 bytes
-rw-r--r--libtoprammer/bit/atmega88dip28.bit (renamed from bit/atmega88dip28.bit)bin24790 -> 24790 bytes
-rw-r--r--libtoprammer/bit/atmega8dip28.bit (renamed from bit/atmega8dip28.bit)bin24789 -> 24789 bytes
-rwxr-xr-xlibtoprammer/bit/build.sh (renamed from bit/build.sh)0
-rw-r--r--libtoprammer/bit/m2764a.bit (renamed from bit/m2764a.bit)bin24783 -> 24783 bytes
-rw-r--r--libtoprammer/bit/m8c-issp.bit (renamed from bit/m8c-issp.bit)bin24785 -> 24785 bytes
-rw-r--r--libtoprammer/bit/src/.gitignore (renamed from bit/src/.gitignore)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/Makefile (renamed from bit/src/atmega32dip40/Makefile)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.lso (renamed from bit/src/atmega32dip40/atmega32dip40.lso)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.prj (renamed from bit/src/atmega32dip40/atmega32dip40.prj)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.ucf (renamed from bit/src/atmega32dip40/atmega32dip40.ucf)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.ut (renamed from bit/src/atmega32dip40/atmega32dip40.ut)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.v (renamed from bit/src/atmega32dip40/atmega32dip40.v)0
-rw-r--r--libtoprammer/bit/src/atmega32dip40/atmega32dip40.xst (renamed from bit/src/atmega32dip40/atmega32dip40.xst)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/Makefile (renamed from bit/src/atmega88dip28/Makefile)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.lso (renamed from bit/src/atmega88dip28/atmega88dip28.lso)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.prj (renamed from bit/src/atmega88dip28/atmega88dip28.prj)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.ucf (renamed from bit/src/atmega88dip28/atmega88dip28.ucf)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.ut (renamed from bit/src/atmega88dip28/atmega88dip28.ut)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.v (renamed from bit/src/atmega88dip28/atmega88dip28.v)0
-rw-r--r--libtoprammer/bit/src/atmega88dip28/atmega88dip28.xst (renamed from bit/src/atmega88dip28/atmega88dip28.xst)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/Makefile (renamed from bit/src/atmega8dip28/Makefile)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.lso (renamed from bit/src/atmega8dip28/atmega8dip28.lso)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.prj (renamed from bit/src/atmega8dip28/atmega8dip28.prj)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.ucf (renamed from bit/src/atmega8dip28/atmega8dip28.ucf)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.ut (renamed from bit/src/atmega8dip28/atmega8dip28.ut)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.v (renamed from bit/src/atmega8dip28/atmega8dip28.v)0
-rw-r--r--libtoprammer/bit/src/atmega8dip28/atmega8dip28.xst (renamed from bit/src/atmega8dip28/atmega8dip28.xst)0
-rwxr-xr-xlibtoprammer/bit/src/create.sh (renamed from bit/src/create.sh)0
-rw-r--r--libtoprammer/bit/src/m2764a/Makefile (renamed from bit/src/m2764a/Makefile)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.lso (renamed from bit/src/m2764a/m2764a.lso)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.prj (renamed from bit/src/m2764a/m2764a.prj)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.ucf (renamed from bit/src/m2764a/m2764a.ucf)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.ut (renamed from bit/src/m2764a/m2764a.ut)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.v (renamed from bit/src/m2764a/m2764a.v)0
-rw-r--r--libtoprammer/bit/src/m2764a/m2764a.xst (renamed from bit/src/m2764a/m2764a.xst)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/Makefile (renamed from bit/src/m8c-issp/Makefile)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.lso (renamed from bit/src/m8c-issp/m8c-issp.lso)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.prj (renamed from bit/src/m8c-issp/m8c-issp.prj)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.ucf (renamed from bit/src/m8c-issp/m8c-issp.ucf)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.ut (renamed from bit/src/m8c-issp/m8c-issp.ut)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.v (renamed from bit/src/m8c-issp/m8c-issp.v)0
-rw-r--r--libtoprammer/bit/src/m8c-issp/m8c-issp.xst (renamed from bit/src/m8c-issp/m8c-issp.xst)0
-rw-r--r--libtoprammer/bit/src/template/Makefile (renamed from bit/src/template/Makefile)0
-rw-r--r--libtoprammer/bit/src/template/template.lso (renamed from bit/src/template/template.lso)0
-rw-r--r--libtoprammer/bit/src/template/template.prj (renamed from bit/src/template/template.prj)0
-rw-r--r--libtoprammer/bit/src/template/template.ucf (renamed from bit/src/template/template.ucf)0
-rw-r--r--libtoprammer/bit/src/template/template.ut (renamed from bit/src/template/template.ut)0
-rw-r--r--libtoprammer/bit/src/template/template.v (renamed from bit/src/template/template.v)0
-rw-r--r--libtoprammer/bit/src/template/template.xst (renamed from bit/src/template/template.xst)0
-rw-r--r--libtoprammer/bit/src/unitest/Makefile (renamed from bit/src/unitest/Makefile)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.lso (renamed from bit/src/unitest/unitest.lso)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.prj (renamed from bit/src/unitest/unitest.prj)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.ucf (renamed from bit/src/unitest/unitest.ucf)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.ut (renamed from bit/src/unitest/unitest.ut)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.v (renamed from bit/src/unitest/unitest.v)0
-rw-r--r--libtoprammer/bit/src/unitest/unitest.xst (renamed from bit/src/unitest/unitest.xst)0
-rw-r--r--libtoprammer/bit/unitest.bit (renamed from bit/unitest.bit)bin24784 -> 24784 bytes
-rw-r--r--libtoprammer/bitfile.py (renamed from bitfile.py)7
-rw-r--r--libtoprammer/chip.py (renamed from chip.py)0
-rw-r--r--libtoprammer/chip_atmega32dip40.py (renamed from chip_atmega32dip40.py)0
-rw-r--r--libtoprammer/chip_atmega88dip28.py (renamed from chip_atmega88dip28.py)0
-rw-r--r--libtoprammer/chip_atmega8dip28.py (renamed from chip_atmega8dip28.py)0
-rw-r--r--libtoprammer/chip_atmega_common.py (renamed from chip_atmega_common.py)0
-rw-r--r--libtoprammer/chip_m2764a.py (renamed from chip_m2764a.py)0
-rw-r--r--libtoprammer/chip_m8cissp.py (renamed from chip_m8cissp.py)0
-rw-r--r--libtoprammer/chip_unitest.py (renamed from chip_unitest.py)0
-rw-r--r--libtoprammer/top2049/__init__.py1
-rw-r--r--libtoprammer/top2049/gnd_layouts.py (renamed from top2049/gnd_layouts.py)0
-rw-r--r--libtoprammer/top2049/shiftreg_layout.py (renamed from top2049/shiftreg_layout.py)0
-rw-r--r--libtoprammer/top2049/vccx_layouts.py (renamed from top2049/vccx_layouts.py)0
-rw-r--r--libtoprammer/top2049/vpp_layouts.py (renamed from top2049/vpp_layouts.py)0
-rw-r--r--libtoprammer/toprammer_main.py (renamed from toprammer_main.py)0
-rw-r--r--libtoprammer/util.py (renamed from util.py)0
-rwxr-xr-xmakerelease.sh7
-rwxr-xr-xsetup.py15
-rwxr-xr-xtoprammer2
-rwxr-xr-xtoprammer-unitest2
82 files changed, 37 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index ace8ff8..42f0873 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+build
+
*~
*.swp
*.pyc
diff --git a/README b/README
index 35a5dbe..0351f0a 100644
--- a/README
+++ b/README
@@ -26,7 +26,9 @@ m2764a EPROM | uncertain |
=== INSTALLATION ===
-No installation is required. Just execute the "toprammer" file.
+Just execute
+ python setup.py install
+as root inside of the toprammer distribution package's root directory.
@@ -35,8 +37,8 @@ No installation is required. Just execute the "toprammer" file.
A .BIT file is always needed to do operations on the inserted chip.
The .BIT file must match the chip. For example, do do operations on an
Atmel Mega8 DIP microcontroller, the atmega8dip28.bit file is needed.
-Prebuilt .BIT files can be found in the "bit/" subdirectory.
-Sourcecode for these .BIT files is located in "bit/src/".
+Prebuilt .BIT files can be found in the "libtoprammer/bit/" subdirectory.
+Sourcecode for these .BIT files is located in "libtoprammer/bit/src/".
However, the full path to the .BIT file doesn't need to be specified to
the toprammer tool. If you just pass the chip-name, toprammer will search
for a matching .BIT file in some standard search paths.
@@ -76,12 +78,12 @@ for the top-half.
--- Bottom-half FPGA implementation ---
To create a new sourcecode template fileset for a new chip, go to the
-bit/src/ subdirectory and execute the "create.sh" script:
+libtoprammer/bit/src/ subdirectory and execute the "create.sh" script:
./create.sh name_of_chip
where "name_of_chip" is the name of the new chip.
-Now go to bit/src/name_of_chip/ and implement the bottom-half algorithm
+Now go to libtoprammer/bit/src/name_of_chip/ and implement the bottom-half algorithm
in the name_of_chip.v Verilog file.
-To build the .BIT file from the Verilog sources, go to the bit/ directory
+To build the .BIT file from the Verilog sources, go to the libtoprammer/bit/ directory
and execute:
./build.sh name_of_chip
(if you omit the chipname, all chips will be rebuilt).
diff --git a/top2049/__init__.py b/libtoprammer/__init__.py
index 8d1c8b6..8d1c8b6 100644
--- a/top2049/__init__.py
+++ b/libtoprammer/__init__.py
diff --git a/bit/.gitignore b/libtoprammer/bit/.gitignore
index f9930d5..f9930d5 100644
--- a/bit/.gitignore
+++ b/libtoprammer/bit/.gitignore
diff --git a/bit/atmega32dip40.bit b/libtoprammer/bit/atmega32dip40.bit
index d7a163d..d7a163d 100644
--- a/bit/atmega32dip40.bit
+++ b/libtoprammer/bit/atmega32dip40.bit
Binary files differ
diff --git a/bit/atmega88dip28.bit b/libtoprammer/bit/atmega88dip28.bit
index 02f0964..02f0964 100644
--- a/bit/atmega88dip28.bit
+++ b/libtoprammer/bit/atmega88dip28.bit
Binary files differ
diff --git a/bit/atmega8dip28.bit b/libtoprammer/bit/atmega8dip28.bit
index 8fb5846..8fb5846 100644
--- a/bit/atmega8dip28.bit
+++ b/libtoprammer/bit/atmega8dip28.bit
Binary files differ
diff --git a/bit/build.sh b/libtoprammer/bit/build.sh
index b1dc553..b1dc553 100755
--- a/bit/build.sh
+++ b/libtoprammer/bit/build.sh
diff --git a/bit/m2764a.bit b/libtoprammer/bit/m2764a.bit
index 3f1fc18..3f1fc18 100644
--- a/bit/m2764a.bit
+++ b/libtoprammer/bit/m2764a.bit
Binary files differ
diff --git a/bit/m8c-issp.bit b/libtoprammer/bit/m8c-issp.bit
index fc1f354..fc1f354 100644
--- a/bit/m8c-issp.bit
+++ b/libtoprammer/bit/m8c-issp.bit
Binary files differ
diff --git a/bit/src/.gitignore b/libtoprammer/bit/src/.gitignore
index e5aa91f..e5aa91f 100644
--- a/bit/src/.gitignore
+++ b/libtoprammer/bit/src/.gitignore
diff --git a/bit/src/atmega32dip40/Makefile b/libtoprammer/bit/src/atmega32dip40/Makefile
index 62d5914..62d5914 100644
--- a/bit/src/atmega32dip40/Makefile
+++ b/libtoprammer/bit/src/atmega32dip40/Makefile
diff --git a/bit/src/atmega32dip40/atmega32dip40.lso b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/atmega32dip40/atmega32dip40.lso
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.lso
diff --git a/bit/src/atmega32dip40/atmega32dip40.prj b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.prj
index 7f9b373..7f9b373 100644
--- a/bit/src/atmega32dip40/atmega32dip40.prj
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.prj
diff --git a/bit/src/atmega32dip40/atmega32dip40.ucf b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.ucf
index 42bb7cc..42bb7cc 100644
--- a/bit/src/atmega32dip40/atmega32dip40.ucf
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.ucf
diff --git a/bit/src/atmega32dip40/atmega32dip40.ut b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/atmega32dip40/atmega32dip40.ut
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.ut
diff --git a/bit/src/atmega32dip40/atmega32dip40.v b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.v
index f547d71..f547d71 100644
--- a/bit/src/atmega32dip40/atmega32dip40.v
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.v
diff --git a/bit/src/atmega32dip40/atmega32dip40.xst b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.xst
index fe2a54d..fe2a54d 100644
--- a/bit/src/atmega32dip40/atmega32dip40.xst
+++ b/libtoprammer/bit/src/atmega32dip40/atmega32dip40.xst
diff --git a/bit/src/atmega88dip28/Makefile b/libtoprammer/bit/src/atmega88dip28/Makefile
index ae94a7f..ae94a7f 100644
--- a/bit/src/atmega88dip28/Makefile
+++ b/libtoprammer/bit/src/atmega88dip28/Makefile
diff --git a/bit/src/atmega88dip28/atmega88dip28.lso b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/atmega88dip28/atmega88dip28.lso
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.lso
diff --git a/bit/src/atmega88dip28/atmega88dip28.prj b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.prj
index 295880e..295880e 100644
--- a/bit/src/atmega88dip28/atmega88dip28.prj
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.prj
diff --git a/bit/src/atmega88dip28/atmega88dip28.ucf b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.ucf
index 42bb7cc..42bb7cc 100644
--- a/bit/src/atmega88dip28/atmega88dip28.ucf
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.ucf
diff --git a/bit/src/atmega88dip28/atmega88dip28.ut b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/atmega88dip28/atmega88dip28.ut
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.ut
diff --git a/bit/src/atmega88dip28/atmega88dip28.v b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.v
index 2898dbb..2898dbb 100644
--- a/bit/src/atmega88dip28/atmega88dip28.v
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.v
diff --git a/bit/src/atmega88dip28/atmega88dip28.xst b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.xst
index e602aa8..e602aa8 100644
--- a/bit/src/atmega88dip28/atmega88dip28.xst
+++ b/libtoprammer/bit/src/atmega88dip28/atmega88dip28.xst
diff --git a/bit/src/atmega8dip28/Makefile b/libtoprammer/bit/src/atmega8dip28/Makefile
index 0a8ce4b..0a8ce4b 100644
--- a/bit/src/atmega8dip28/Makefile
+++ b/libtoprammer/bit/src/atmega8dip28/Makefile
diff --git a/bit/src/atmega8dip28/atmega8dip28.lso b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/atmega8dip28/atmega8dip28.lso
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.lso
diff --git a/bit/src/atmega8dip28/atmega8dip28.prj b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.prj
index 25c6746..25c6746 100644
--- a/bit/src/atmega8dip28/atmega8dip28.prj
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.prj
diff --git a/bit/src/atmega8dip28/atmega8dip28.ucf b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.ucf
index 7089175..7089175 100644
--- a/bit/src/atmega8dip28/atmega8dip28.ucf
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.ucf
diff --git a/bit/src/atmega8dip28/atmega8dip28.ut b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/atmega8dip28/atmega8dip28.ut
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.ut
diff --git a/bit/src/atmega8dip28/atmega8dip28.v b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.v
index 77b4d7f..77b4d7f 100644
--- a/bit/src/atmega8dip28/atmega8dip28.v
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.v
diff --git a/bit/src/atmega8dip28/atmega8dip28.xst b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.xst
index dd040ec..dd040ec 100644
--- a/bit/src/atmega8dip28/atmega8dip28.xst
+++ b/libtoprammer/bit/src/atmega8dip28/atmega8dip28.xst
diff --git a/bit/src/create.sh b/libtoprammer/bit/src/create.sh
index cce46db..cce46db 100755
--- a/bit/src/create.sh
+++ b/libtoprammer/bit/src/create.sh
diff --git a/bit/src/m2764a/Makefile b/libtoprammer/bit/src/m2764a/Makefile
index 11e150d..11e150d 100644
--- a/bit/src/m2764a/Makefile
+++ b/libtoprammer/bit/src/m2764a/Makefile
diff --git a/bit/src/m2764a/m2764a.lso b/libtoprammer/bit/src/m2764a/m2764a.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/m2764a/m2764a.lso
+++ b/libtoprammer/bit/src/m2764a/m2764a.lso
diff --git a/bit/src/m2764a/m2764a.prj b/libtoprammer/bit/src/m2764a/m2764a.prj
index 25e4d2c..25e4d2c 100644
--- a/bit/src/m2764a/m2764a.prj
+++ b/libtoprammer/bit/src/m2764a/m2764a.prj
diff --git a/bit/src/m2764a/m2764a.ucf b/libtoprammer/bit/src/m2764a/m2764a.ucf
index 17f86dc..17f86dc 100644
--- a/bit/src/m2764a/m2764a.ucf
+++ b/libtoprammer/bit/src/m2764a/m2764a.ucf
diff --git a/bit/src/m2764a/m2764a.ut b/libtoprammer/bit/src/m2764a/m2764a.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/m2764a/m2764a.ut
+++ b/libtoprammer/bit/src/m2764a/m2764a.ut
diff --git a/bit/src/m2764a/m2764a.v b/libtoprammer/bit/src/m2764a/m2764a.v
index 0082961..0082961 100644
--- a/bit/src/m2764a/m2764a.v
+++ b/libtoprammer/bit/src/m2764a/m2764a.v
diff --git a/bit/src/m2764a/m2764a.xst b/libtoprammer/bit/src/m2764a/m2764a.xst
index bf215df..bf215df 100644
--- a/bit/src/m2764a/m2764a.xst
+++ b/libtoprammer/bit/src/m2764a/m2764a.xst
diff --git a/bit/src/m8c-issp/Makefile b/libtoprammer/bit/src/m8c-issp/Makefile
index 96da03b..96da03b 100644
--- a/bit/src/m8c-issp/Makefile
+++ b/libtoprammer/bit/src/m8c-issp/Makefile
diff --git a/bit/src/m8c-issp/m8c-issp.lso b/libtoprammer/bit/src/m8c-issp/m8c-issp.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/m8c-issp/m8c-issp.lso
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.lso
diff --git a/bit/src/m8c-issp/m8c-issp.prj b/libtoprammer/bit/src/m8c-issp/m8c-issp.prj
index 9394251..9394251 100644
--- a/bit/src/m8c-issp/m8c-issp.prj
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.prj
diff --git a/bit/src/m8c-issp/m8c-issp.ucf b/libtoprammer/bit/src/m8c-issp/m8c-issp.ucf
index 17f86dc..17f86dc 100644
--- a/bit/src/m8c-issp/m8c-issp.ucf
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.ucf
diff --git a/bit/src/m8c-issp/m8c-issp.ut b/libtoprammer/bit/src/m8c-issp/m8c-issp.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/m8c-issp/m8c-issp.ut
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.ut
diff --git a/bit/src/m8c-issp/m8c-issp.v b/libtoprammer/bit/src/m8c-issp/m8c-issp.v
index 7ed28fa..7ed28fa 100644
--- a/bit/src/m8c-issp/m8c-issp.v
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.v
diff --git a/bit/src/m8c-issp/m8c-issp.xst b/libtoprammer/bit/src/m8c-issp/m8c-issp.xst
index 6261e47..6261e47 100644
--- a/bit/src/m8c-issp/m8c-issp.xst
+++ b/libtoprammer/bit/src/m8c-issp/m8c-issp.xst
diff --git a/bit/src/template/Makefile b/libtoprammer/bit/src/template/Makefile
index 3f6d22f..3f6d22f 100644
--- a/bit/src/template/Makefile
+++ b/libtoprammer/bit/src/template/Makefile
diff --git a/bit/src/template/template.lso b/libtoprammer/bit/src/template/template.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/template/template.lso
+++ b/libtoprammer/bit/src/template/template.lso
diff --git a/bit/src/template/template.prj b/libtoprammer/bit/src/template/template.prj
index 32dbdd2..32dbdd2 100644
--- a/bit/src/template/template.prj
+++ b/libtoprammer/bit/src/template/template.prj
diff --git a/bit/src/template/template.ucf b/libtoprammer/bit/src/template/template.ucf
index 42bb7cc..42bb7cc 100644
--- a/bit/src/template/template.ucf
+++ b/libtoprammer/bit/src/template/template.ucf
diff --git a/bit/src/template/template.ut b/libtoprammer/bit/src/template/template.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/template/template.ut
+++ b/libtoprammer/bit/src/template/template.ut
diff --git a/bit/src/template/template.v b/libtoprammer/bit/src/template/template.v
index b25e086..b25e086 100644
--- a/bit/src/template/template.v
+++ b/libtoprammer/bit/src/template/template.v
diff --git a/bit/src/template/template.xst b/libtoprammer/bit/src/template/template.xst
index 00b1958..00b1958 100644
--- a/bit/src/template/template.xst
+++ b/libtoprammer/bit/src/template/template.xst
diff --git a/bit/src/unitest/Makefile b/libtoprammer/bit/src/unitest/Makefile
index 695029c..695029c 100644
--- a/bit/src/unitest/Makefile
+++ b/libtoprammer/bit/src/unitest/Makefile
diff --git a/bit/src/unitest/unitest.lso b/libtoprammer/bit/src/unitest/unitest.lso
index b8f99f5..b8f99f5 100644
--- a/bit/src/unitest/unitest.lso
+++ b/libtoprammer/bit/src/unitest/unitest.lso
diff --git a/bit/src/unitest/unitest.prj b/libtoprammer/bit/src/unitest/unitest.prj
index 6de4d45..6de4d45 100644
--- a/bit/src/unitest/unitest.prj
+++ b/libtoprammer/bit/src/unitest/unitest.prj
diff --git a/bit/src/unitest/unitest.ucf b/libtoprammer/bit/src/unitest/unitest.ucf
index f60e77e..f60e77e 100644
--- a/bit/src/unitest/unitest.ucf
+++ b/libtoprammer/bit/src/unitest/unitest.ucf
diff --git a/bit/src/unitest/unitest.ut b/libtoprammer/bit/src/unitest/unitest.ut
index 009a4e6..009a4e6 100644
--- a/bit/src/unitest/unitest.ut
+++ b/libtoprammer/bit/src/unitest/unitest.ut
diff --git a/bit/src/unitest/unitest.v b/libtoprammer/bit/src/unitest/unitest.v
index ee88bc8..ee88bc8 100644
--- a/bit/src/unitest/unitest.v
+++ b/libtoprammer/bit/src/unitest/unitest.v
diff --git a/bit/src/unitest/unitest.xst b/libtoprammer/bit/src/unitest/unitest.xst
index 1fa414b..1fa414b 100644
--- a/bit/src/unitest/unitest.xst
+++ b/libtoprammer/bit/src/unitest/unitest.xst
diff --git a/bit/unitest.bit b/libtoprammer/bit/unitest.bit
index 376fc50..376fc50 100644
--- a/bit/unitest.bit
+++ b/libtoprammer/bit/unitest.bit
Binary files differ
diff --git a/bitfile.py b/libtoprammer/bitfile.py
index 69b09ef..f728e56 100644
--- a/bitfile.py
+++ b/libtoprammer/bitfile.py
@@ -19,6 +19,7 @@
"""
import sys
+import pkg_resources
class BitfileException(Exception): pass
@@ -126,12 +127,14 @@ def bitfileFind(filename):
filename += ".bit"
if __probeFile(filename):
return filename
- paths = ( ".", "./bit", "/usr/share/toprammer/bit",
- "/usr/local/share/toprammer/bit", )
+ paths = ( ".", "./libtoprammer/bit", )
for path in paths:
fullpath = path + "/" + filename
if __probeFile(fullpath):
return fullpath
+ fullpath = pkg_resources.resource_filename("libtoprammer", "bit/" + filename)
+ if __probeFile(fullpath):
+ return fullpath
return None
if __name__ == "__main__":
diff --git a/chip.py b/libtoprammer/chip.py
index 876c948..876c948 100644
--- a/chip.py
+++ b/libtoprammer/chip.py
diff --git a/chip_atmega32dip40.py b/libtoprammer/chip_atmega32dip40.py
index d82591f..d82591f 100644
--- a/chip_atmega32dip40.py
+++ b/libtoprammer/chip_atmega32dip40.py
diff --git a/chip_atmega88dip28.py b/libtoprammer/chip_atmega88dip28.py
index baa498a..baa498a 100644
--- a/chip_atmega88dip28.py
+++ b/libtoprammer/chip_atmega88dip28.py
diff --git a/chip_atmega8dip28.py b/libtoprammer/chip_atmega8dip28.py
index d0fc660..d0fc660 100644
--- a/chip_atmega8dip28.py
+++ b/libtoprammer/chip_atmega8dip28.py
diff --git a/chip_atmega_common.py b/libtoprammer/chip_atmega_common.py
index 265cdaa..265cdaa 100644
--- a/chip_atmega_common.py
+++ b/libtoprammer/chip_atmega_common.py
diff --git a/chip_m2764a.py b/libtoprammer/chip_m2764a.py
index ca1aff9..ca1aff9 100644
--- a/chip_m2764a.py
+++ b/libtoprammer/chip_m2764a.py
diff --git a/chip_m8cissp.py b/libtoprammer/chip_m8cissp.py
index 3f23a54..3f23a54 100644
--- a/chip_m8cissp.py
+++ b/libtoprammer/chip_m8cissp.py
diff --git a/chip_unitest.py b/libtoprammer/chip_unitest.py
index a5d65ae..a5d65ae 100644
--- a/chip_unitest.py
+++ b/libtoprammer/chip_unitest.py
diff --git a/libtoprammer/top2049/__init__.py b/libtoprammer/top2049/__init__.py
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/libtoprammer/top2049/__init__.py
@@ -0,0 +1 @@
+
diff --git a/top2049/gnd_layouts.py b/libtoprammer/top2049/gnd_layouts.py
index 4e48688..4e48688 100644
--- a/top2049/gnd_layouts.py
+++ b/libtoprammer/top2049/gnd_layouts.py
diff --git a/top2049/shiftreg_layout.py b/libtoprammer/top2049/shiftreg_layout.py
index d5a06de..d5a06de 100644
--- a/top2049/shiftreg_layout.py
+++ b/libtoprammer/top2049/shiftreg_layout.py
diff --git a/top2049/vccx_layouts.py b/libtoprammer/top2049/vccx_layouts.py
index b1df094..b1df094 100644
--- a/top2049/vccx_layouts.py
+++ b/libtoprammer/top2049/vccx_layouts.py
diff --git a/top2049/vpp_layouts.py b/libtoprammer/top2049/vpp_layouts.py
index 07d5845..07d5845 100644
--- a/top2049/vpp_layouts.py
+++ b/libtoprammer/top2049/vpp_layouts.py
diff --git a/toprammer_main.py b/libtoprammer/toprammer_main.py
index f3c8278..f3c8278 100644
--- a/toprammer_main.py
+++ b/libtoprammer/toprammer_main.py
diff --git a/util.py b/libtoprammer/util.py
index 80afadf..80afadf 100644
--- a/util.py
+++ b/libtoprammer/util.py
diff --git a/makerelease.sh b/makerelease.sh
index 53baef6..6a8d55e 100755
--- a/makerelease.sh
+++ b/makerelease.sh
@@ -4,9 +4,10 @@ set -e
project="toprammer"
-origin="$(pwd)"
-version_major="$(cat $origin/toprammer | grep -e VERSION_MAJOR | head -n1 | cut -d'=' -f2)"
-version_minor="$(cat $origin/toprammer | grep -e VERSION_MINOR | head -n1 | cut -d'=' -f2)"
+origin="$PWD/$(dirname $0)"
+
+version_major="$(cat $origin/libtoprammer/toprammer_main.py | grep -e VERSION_MAJOR | head -n1 | cut -d'=' -f2)"
+version_minor="$(cat $origin/libtoprammer/toprammer_main.py | grep -e VERSION_MINOR | head -n1 | cut -d'=' -f2)"
version="$(printf %d.%d $version_major $version_minor)"
if [ -z "$version" ]; then
echo "Could not determine version!"
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..8f2680a
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+from distutils.core import setup
+import libtoprammer.toprammer_main as toprammer_main
+
+setup( name = "toprammer",
+ version = toprammer_main.VERSION,
+ description = "TOP2049 Open Source programming suite",
+ author = "Michael Buesch",
+ author_email = "mb@bu3sch.de",
+ url = "http://bu3sch.de/joomla/index.php/toprammer-top2049",
+ packages = [ "libtoprammer", "libtoprammer/top2049", ],
+ package_data = { "libtoprammer" : [ "bit/*.bit" ], },
+ scripts = [ "toprammer", "toprammer-unitest", ],
+)
diff --git a/toprammer b/toprammer
index 5142dec..e13c5c9 100755
--- a/toprammer
+++ b/toprammer
@@ -21,7 +21,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from toprammer_main import *
+from libtoprammer.toprammer_main import *
import getopt
diff --git a/toprammer-unitest b/toprammer-unitest
index f9453f2..b7803a5 100755
--- a/toprammer-unitest
+++ b/toprammer-unitest
@@ -21,7 +21,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
-from toprammer_main import *
+from libtoprammer.toprammer_main import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
bues.ch cgit interface