top of page

pysimCoder Linux Installation

In this tutorial, we present 2 step-by-step instructions to install pysimCoder in Ubuntu 22.04.

One is to install with Anaconda Distribution and one without.

Installing with Anaconda Distribution simplifies the installation of Slycot and Python Control Systems Toolbox.

For more information regarding pysimCoder, please visit Prof.Roberto Bucher's GitHub:

https://github.com/robertobucher

Installation of pysimCoder with Anaconda Distribution
(updated on 1/25/2025)

 Step 1: Basic Installation 

 

- Step 1a

Open Terminal and type: uname -r
Note the output, it will be used in Step1c, in this example the output was 6.8.0-51-generic

​​

- Step 1b

Type: sudo su
Enter password

​

- Step 1c

Type: apt-get install linux-headers-6.8.0-51-generic
 

- Step 1d

Type apt-get install make​​​​​

After it completes, close Terminal.

pysim_installation_step1.png

 Step 2: Install Anaconda Distribution 

 

- Step 2

Follow Linux Installer from: https://docs.anaconda.com/anaconda/install/

 Step 3: Install Slycot and Python Control 

 

- Step 3

Link: https://python-control.readthedocs.io/en/latest/intro.html

​(In a new Terminal window, type: conda install -c conda-forge control slycot )

​​

 Step 4: Download necessary files 

 

- Step 4a

Download the files (Makefile, flash_f7, shv) from https://github.com/robertobucher/LinuxLabo/tree/master/Ubuntu_installer

To install pysimCoder with Anaconda Distribution, we need to change the Makefile to reflect that Slycot and Python Control were already installed. 

You can download an updated Makefile for Anaconda Distribution installation from our GitHub: Makefile for Anaconda​

​

- Step 4b

Change the name of the Makefile (Robots5's GitHub) download from "Makefile (for Anaconda Install)" to "Makefile"

​

- Step 4c

Make sure "Allow executing files as program" is checked for "shv" and "flash_f7" â€‹â€‹â€‹â€‹â€‹

download_files.png

 Step 5: Create Develop folder and run packages 

 

- Step 5a

Open Terminal and type: mkdir Develop
A new folder called Develop is created.

​​

- Step 5b

Copy files from Step 4 into Develop.
​

- Step 5c

In the Terminal, type: cd Develop

Now you should be in the Develop folder.
 

- Step 5d

Type: make packages​​​​​

Afterwards, close the Terminal.

​

copy files.png

 Step 6: pysimCoder 

 

- Step 6

In the Develop folder, open Terminal and type: make pysimcoder

After it completes, close Terminal.
​​​​​

makepysimcoder.png

 Step 7: Install SHV 

 

- Step 7a

In the Develop folder, open Terminal and type: make Shv

After it completes, close Terminal.

​​

- Step 7b

Start a new Terminal as "normal user" and type: cd pysimCoder/CodeGen/LinuxRT/devices
​

- Step 7c

In that location, type: make SHV=1

​​

shv.png

 Step 8: Install NuttX 

 

- Step 8a

In the Develop folder, open Terminal and type: make nuttx

After it completes, close Terminal.

​​​

- Step 8b

In the Develop folder, open Terminal and type: make f7

​​

- Step 8c

Configure "make menuconfig" to match the target needs.

In the case of our DAQs (EMB-DAQ1 and EMB-DAQ2) we will configure without complimentary PWM signals.​​​​​​​

Go to "System Type", then "Timer Configuration", uncheck the complementary outputs for TIM1.

Save as .config and exit.

nuttx.png
f7_1.png
f7_2.png
f7_3.png

 Step 9: Configuring NuttX â€‹

​

- Step 9a

Start a new Terminal as "normal user" and type: cd pysimCoder/CodeGen/nuttx/devices
​

- Step 9b

In that location, type: make SHV=1

​​

nuttx_2.png

 Step 10: Configure SHV Application 

 

- Step 10a

Open Terminal and type: shv
The shvspy application opens.

​​

- Step 10b

Right click on the server "test" and enter Server Properties.
​

- Step 10c

Set User: admin

Set Password: admin!123​

Screenshot from 2025-01-25 22-27-05.png
Screenshot from 2025-01-25 22-28-44.png

 Step 11: pyshv module 

 

- Step 11

Open Terminal and type: pip install pyshv
​​​

 Congratulations, the installation is complete. 

Installation of pysimCoder without Anaconda Distribution
(updated on 1/25/2025)

 Step 1: Basic Installation 

 

- Step 1a

Open Terminal and type: uname -r
Note the output, it will be used in Step1c, in this example the output was 6.8.0-51-generic

​​

- Step 1b

Type: sudo su
Enter password

​

- Step 1c

Type: apt-get install linux-headers-6.8.0-51-generic
 

- Step 1d

Type apt-get install make​​​​​

After it completes, close Terminal.

pysim_installation_step1.png

 Step 2: Download necessary files 

 

- Step 2a

Download the files (Makefile, flash_f7, shv) from https://github.com/robertobucher/LinuxLabo/tree/master/Ubuntu_installer

​​​​

- Step 2b

Make sure "Allow executing files as program" is checked for "shv" and "flash_f7" â€‹â€‹â€‹â€‹â€‹

download_files.png

 Step 3: Create Develop folder and run packages 

 

- Step 3a

Open Terminal and type: mkdir Develop
A new folder called Develop is created.

​​

- Step 3b

Copy files from Step 2 into Develop.
​

- Step 3c

In the Terminal, type: cd Develop

Now you should be in the Develop folder.
 

- Step 3d

Type: make packages​​​​​

Afterwards, close the Terminal.

​

copy files.png

 Step 4: pysimCoder 

 

- Step 4

In the Develop folder, open Terminal and type: make pysimcoder

After it completes, close Terminal.
​​​​​

makepysimcoder.png

 Step 5: Install SHV 

 

- Step 5a

In the Develop folder, open Terminal and type: make Shv

After it completes, close Terminal.

​​

- Step 5b

Start a new Terminal as "normal user" and type: cd pysimCoder/CodeGen/LinuxRT/devices
​

- Step 5c

In that location, type: make SHV=1

​​

shv.png

 Step 6: Install NuttX 

 

- Step 6a

In the Develop folder, open Terminal and type: make nuttx

After it completes, close Terminal.

​​​

- Step 6b

In the Develop folder, open Terminal and type: make f7

​​

- Step 6c

Configure "make menuconfig" to match the target needs.

In the case of our DAQs (EMB-DAQ1 and EMB-DAQ2) we will configure without complimentary PWM signals.​​​​​​​

Go to "System Type", then "Timer Configuration", uncheck the complementary outputs for TIM1.

Save as .config and exit.

nuttx.png
f7_1.png
f7_2.png
f7_3.png

 Step 7: Configuring NuttX â€‹

​

- Step 7a

Start a new Terminal as "normal user" and type: cd pysimCoder/CodeGen/nuttx/devices
​

- Step 7b

In that location, type: make SHV=1

​​

nuttx_2.png

 Step 8: Configure SHV Application 

 

- Step 8a

Open Terminal and type: shv
The shvspy application opens.

​​

- Step 8b

Right click on the server "test" and enter Server Properties.
​

- Step 8c

Set User: admin

Set Password: admin!123​

Screenshot from 2025-01-25 22-27-05.png
Screenshot from 2025-01-25 22-28-44.png

 Step 11: pyshv module 

 

- Step 11

Open Terminal and type: pip install pyshv
​​​

 Congratulations, the installation is complete. 

bottom of page