Propeller 1-2-3 A7 FPGA Development Tools on Linux under Wine
mindrobots
Posts: 6,506
A short tutorial on how to set up Wine under Linux in order to run teh px.exe loader provided by Parallax.
My testing was done with Fedora 22 running on a Toshiba I7 laptop with 8GB of RAM. The wine version used was 1.6.2 installed from https://www.winehq.org/
Installing Wine
You should follow the download and installation instruction for your Linux Distribution. When complete, you can run the following command to test your installation:
$ wine control
You should see a very Windows looking screen pop up with a very Windows looking Control Panel program. If you do not get this, then you need to debug you Wine installation with the help of the information on their site. I won't get into debugging Wine installations.
Configuring Wine
Now, there is really only one more step before you can start working with px.exe - you need to create a Windows COM port pointing to where your 1-2-3 FPGA board will appear under Linux. As with any device in Linux, to use it most effectively with programming tools, you need to make sure that you are in the same group it is in. Sorry, the steps required to do this vary from distribution to distribution and are not included here.
Wine needs a symbolic link in its dosdevices directory so it can find the 1-2-3 FPGA serial ports. The dosdevices directory was created by the Wine installation process in your ~/.wine directory. This directory contains everything related to your Wine installation.
Plug your 1-2-3 FPGA board into your computer and note the device name it shows up as (typically, /dev/ttyUSB0).
To create the symbolic link in Linux, type in the following command:
$ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com3
You will need to replace ttyUSB0 with whatever your 1-2-3 FPGA board showed up as when you plugged it into your computer.
You can change com3 to anything from com1 through com9, px.exe does not work with a com port number greater than 9.
Running px.exe to load a *.rbf file into your 1-2-3 FPGA board
The Wine installation creates the ~/.wine dirctory which in turn contains a directory named drive_c - this is the C: drive for your wine installation. The px.exe file from Parallax should be copied directly into this directory, in effect making it c:px.exe - a windows program, ready to run. To make it easy, you can also put an *.rbf files you create with Quartus or Parallax provides on your new c: drive.
When you want to load a new image into you your FPGA, you can run this command from Linux and it will run px.exe under the Wine environment. Make sure your 1-2-3 FPGA Prog/Run switch is in the Prog position.
$ wine c:px.exe c: op.rbf /3
This basically tells wine to run the program c:px.exe which you earlier copied to the root directory of your Wine c: drive
c: op.rbf is the FGPA image - I copied mine to c: but you can put it anyplace in your Wine directory tree. Remember, this is an input parameter to px.exe which is a Windows program running under Wine, so it can only see files on the Wine c: drive.
/3 is the px.exe switch telling it to use COM3:
You should really only need to use px.exe if you want/need to load a new P2 FPGA image from Parallax or if you are experimenting with your own FPGA images for a P1V design or some other FPGA project. The rest of the time, the 1-2-3 FPGA board will load the FPGA image from its on-board memory.
When a P2 FPGA image is released, it will contain an up to date version of PNUT - the Propeller 2 programming tool and loader. It should also be usable from this Wine installation. With the previous incarnation of the P2, I was able to program and load it using PNUT under Wine.
This was really a straight forward process and for these tools is much quicker than setting up a Windows VM. Feel free to post questions or observations related to using Wine under Linux for P2 development to this thread.
Have fun!!
Rick
My testing was done with Fedora 22 running on a Toshiba I7 laptop with 8GB of RAM. The wine version used was 1.6.2 installed from https://www.winehq.org/
Installing Wine
You should follow the download and installation instruction for your Linux Distribution. When complete, you can run the following command to test your installation:
$ wine control
You should see a very Windows looking screen pop up with a very Windows looking Control Panel program. If you do not get this, then you need to debug you Wine installation with the help of the information on their site. I won't get into debugging Wine installations.
Configuring Wine
Now, there is really only one more step before you can start working with px.exe - you need to create a Windows COM port pointing to where your 1-2-3 FPGA board will appear under Linux. As with any device in Linux, to use it most effectively with programming tools, you need to make sure that you are in the same group it is in. Sorry, the steps required to do this vary from distribution to distribution and are not included here.
Wine needs a symbolic link in its dosdevices directory so it can find the 1-2-3 FPGA serial ports. The dosdevices directory was created by the Wine installation process in your ~/.wine directory. This directory contains everything related to your Wine installation.
Plug your 1-2-3 FPGA board into your computer and note the device name it shows up as (typically, /dev/ttyUSB0).
To create the symbolic link in Linux, type in the following command:
$ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com3
You will need to replace ttyUSB0 with whatever your 1-2-3 FPGA board showed up as when you plugged it into your computer.
You can change com3 to anything from com1 through com9, px.exe does not work with a com port number greater than 9.
Running px.exe to load a *.rbf file into your 1-2-3 FPGA board
The Wine installation creates the ~/.wine dirctory which in turn contains a directory named drive_c - this is the C: drive for your wine installation. The px.exe file from Parallax should be copied directly into this directory, in effect making it c:px.exe - a windows program, ready to run. To make it easy, you can also put an *.rbf files you create with Quartus or Parallax provides on your new c: drive.
When you want to load a new image into you your FPGA, you can run this command from Linux and it will run px.exe under the Wine environment. Make sure your 1-2-3 FPGA Prog/Run switch is in the Prog position.
$ wine c:px.exe c: op.rbf /3
This basically tells wine to run the program c:px.exe which you earlier copied to the root directory of your Wine c: drive
c: op.rbf is the FGPA image - I copied mine to c: but you can put it anyplace in your Wine directory tree. Remember, this is an input parameter to px.exe which is a Windows program running under Wine, so it can only see files on the Wine c: drive.
/3 is the px.exe switch telling it to use COM3:
You should really only need to use px.exe if you want/need to load a new P2 FPGA image from Parallax or if you are experimenting with your own FPGA images for a P1V design or some other FPGA project. The rest of the time, the 1-2-3 FPGA board will load the FPGA image from its on-board memory.
When a P2 FPGA image is released, it will contain an up to date version of PNUT - the Propeller 2 programming tool and loader. It should also be usable from this Wine installation. With the previous incarnation of the P2, I was able to program and load it using PNUT under Wine.
This was really a straight forward process and for these tools is much quicker than setting up a Windows VM. Feel free to post questions or observations related to using Wine under Linux for P2 development to this thread.
Have fun!!
Rick
Comments
Its good to flush out things like this well in advance of the A9 board being widely available.