URL
https://opencores.org/ocsvn/phr/phr/trunk
Subversion Repositories phr
Compare Revisions
- This comparison shows the changes necessary to convert path
/phr
- from Rev 335 to Rev 336
- ↔ Reverse comparison
Rev 335 → Rev 336
/trunk/codigo/gui/xin/phrgui.py
7,6 → 7,7
import os # se usa para el dialogo de abrir fichero |
import subprocess # para interactuar con el shell |
import thread # to prevent gui blocking |
from sys import platform as _platform # para detectar el sistema operativo |
|
|
class phrgui (guiparent.guiParent): |
75,13 → 76,10
|
1. Conecte el programador y presione en el botón \"Detectar\". |
Se listaran los dispositivos encontrados en la cadena JTAG. |
|
2. Seleccione el dispositivo que desea programar o configurar. |
|
3. Elija un fichero de configuración/programación. |
*.BIT para FPGA |
*.JED para CPLD |
|
4. Presione el botón \"Transferir\". |
|
Considere las recomendaciones de la placa específica que esté |
138,21 → 136,37
else: |
position = "" |
|
## accion |
# se copia el fichero de programacion al directorio local |
#subprocess.call ("copy \"" + self.text_ctrl_file.GetValue() + "\" fpgaFile", shell=True) |
if _platform == "linux" or _platform == "linux2": |
# linux |
command = "./xc3sprog/xc3sprog -v -c ftdi -p " + position + " \""+ self.text_ctrl_fichero.GetValue() + "\"" |
else: |
# windows |
subprocess.call ("copy \"" + self.text_ctrl_fichero.GetValue() + "\" fpgaFile", shell=True) |
command = "xc3sprog\\xc3sprog.exe -v -L -c ftdi -p " + position + " fpgaFile:w:0:BIT" |
|
# se ejecuta el xc3sprog |
command = "./xc3sprog/xc3sprog -v -c ftdi -p " + position + " \""+ self.text_ctrl_fichero.GetValue() + "\"" |
|
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
|
if _platform == "linux" or _platform == "linux2": |
# linux |
for line in iter(process.stdout.readline, ''): |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
else: |
# Windows |
line = '' |
while True: |
out = process.stdout.read(1) |
if out == '' and process.poll() != None: |
break |
if out != '' and out != '\x0a': |
line = line + out |
if out == '\x0d': |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
line = '' |
|
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
170,8 → 184,14
wx.CallAfter(self.list_box_dispositivos_conectados.Clear) |
|
## accion |
command = "./xc3sprog/xc3sprog -c ftdi" # the shell command |
|
if _platform == "linux" or _platform == "linux2": |
# linux |
command = "./xc3sprog/xc3sprog -c ftdi" |
else: |
# windows |
command = "xc3sprog\\xc3sprog -c ftdi -L -j -v" |
|
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
/trunk/codigo/gui/xin/grafica/phr-gui ico.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
trunk/codigo/gui/xin/grafica/phr-gui ico.png
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/codigo/gui/xin/grafica/banner.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/codigo/gui/xin/grafica/banner.jpg
===================================================================
--- trunk/codigo/gui/xin/grafica/banner.jpg (revision 335)
+++ trunk/codigo/gui/xin/grafica/banner.jpg (nonexistent)
trunk/codigo/gui/xin/grafica/banner.jpg
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property