# SW4STM32

## Download instructions

*Note: these instruction and images were produced on February 6, 2018 and last verified on July 23, 2018.*

The following steps are the same for Windows, Linux, and MacOS as they simply consist of downloading the installation files. For the actual installation, please refer to the corresponding subsection after the following instructions.

1\) Navigate to the ST [site for the SW4STM32 software](https://www.st.com/en/development-tools/sw4stm32.html).

2\) At the bottom of the page, you should find a link to navigate to a third-party website to download the software; [AC6](http://www.ac6.fr/) develops the software SW4STM32. Press the button "GO TO SITE".

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRJXA9gkoqKAKFN%2F1_get_software%20\(1\).PNG?generation=1542640260423524\&alt=media)

3\) You should be redirected to [this site](http://www.openstm32.org/HomePage). In order to download the software, you will have to make an account. We recommend doing so as it this will give you access to the documentation and to posting in the forum. You can use [this link](http://www.openstm32.org/tiki-register.php) to make an account. You should receive an email to confirm your account.

4\) After making an account, you should be able to access the installation instructions and download links. There are two ways you can install SW4STM32: from Eclipse (as the tool is Eclipse-based) or with the GUI installer. We recommend using the installer as it is a much cleaner process. The following instructions will assume this option; navigate to [this link](http://www.openstm32.org/Downloading%2Bthe%2BSystem%2BWorkbench%2Bfor%2BSTM32%2Binstaller) for downloading the appropriate GUI installer for your OS (you need to be logged in to see these instructions). *Note: it is also recommended to download the MD5 or SHA256 checksum to validate the integrity of your download. We selected the MD5 checksum.*

If you would like to install SW4STM32 from Eclipse, please refer to [this link](http://www.openstm32.org/Installing%2BSystem%2BWorkbench%2Bfor%2BSTM32) (you need to be logged in to see these instructions).

5\) Go to [this link](http://www.openstm32.org/Installing%2BSystem%2BWorkbench%2Bfor%2BSTM32%2Bwith%2Binstaller) for system requirements and detailed download/installation instructions for each OS (you need to be logged in to see these instructions). The instructions at the above link are quite detailed but we will complement this with some screenshots of the process:

* [Windows](#windows)
* [Linux](#linux)
* [MacOS](#macos)

[Here](https://lcav.gitbook.io/dsp-labs/installation/software/eclipse_tips), we provide some useful shortcuts tips when working with Eclipse-based tools like SW4STM32.

## Windows

*Note: the instructions were tested using Windows 10 Pro Insider Preview, Version 1607, with a 64-bit operating system on February 11, 2018.*

1\) Double-click the EXE file to launch the installation wizard.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LV13To7ieIrVl6kdz4n%2F-LV13VodVdCyuVgSrkTm%2F1_initial_win.PNG?generation=1546222966674411\&alt=media)

2\) You will have to accept two license agreements to proceed with the installation, after which you will be asked to specify the installation path (see below). If the path does not exist, you will be asked to create the directory.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZROQ9dmaxMwA-2U%2F2_installation_path.PNG?generation=1542640266276537\&alt=media)

3\) Next, you can select which packs to install; leave as is. You can then decide to create a Start Menu/Desktop shortcut. You will then be asked to confirm your installation path and packs to install. Pressing "Next" will start the installation (see below).

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRQtjFklu4S4zcQ%2F4_create_shortcuts.PNG?generation=1542640267782712\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRS6YkikyOtuLiU%2F5_confirm.PNG?generation=1542640260418034\&alt=media)

4\) During the installation, a separate wizard will also pop-up to install necessary ST drivers (see below). Proceed with the installation by pressing "Next".

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRUdkxjDPyp2M68%2F7_driver_setup.PNG?generation=1542640265587588\&alt=media)

5\) When the driver installation has been successfully completed, you should see something similar to the window pane below.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRWs9tZECwh_G3l%2F8_driver_setup_complete.PNG?generation=1542640268400850\&alt=media)

6\) You can then proceed to the final pane of the installation by pressing "Next" in the original Installation Wizard (see below). Finally, press "Done" to finish the installation!

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRYPzEAMH74IBUZ%2F9_finish_installation.PNG?generation=1542640270522265\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZR_9s23iPi3fXII%2F10_close_installer.PNG?generation=1542640261867396\&alt=media)

7\) You can launch the software by using one of the shortcuts created before. You will be prompted to select a workspace (see below); we recommend creating a workspace called `"COM303-Workspace"` for the exercises we will be doing.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRb7CmF3uRQ2HpB%2F11_workspace.PNG?generation=1542640262339872\&alt=media)

8\) After setting the workspace, you should see something like the figure below.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRd0qerskDI1ShO%2F12_sw4stm32.PNG?generation=1542640268398649\&alt=media)

You can now proceed to creating [your first project](https://lcav.gitbook.io/dsp-labs/installation/instructions)!

## Linux

*Note: the following instructions were tested using Ubuntu 16.04.1 LTS, x86\_64 architecture on a Lenovo Thinkpad X230 on February 9, 2018.*

1\) From a terminal, navigate to the directory where the downloaded RUN and checksum files are located. Check the permissions with the following command:

```bash
$ ls -l
```

If you do not see an `x` in the permissions for the RUN file:

```bash
>> -rw-rw-r-- ... install_sw4stm32_linux_64bits-vX.X.run
```

You will have to give execution rights to the file as such:

```bash
$ chmod a+x install_sw4stm32_linux_64bits-vX.X.run
```

The `ls -l` command should then show something like:

```bash
>> -rwxrwxr-x install_sw4stm32_linux_64bits-vX.X.run
```

2\) Before running the installation file, please read the warnings for Linux at the bottom of [this page](http://www.openstm32.org/Downloading%2Bthe%2BSystem%2BWorkbench%2Bfor%2BSTM32%2Binstaller#Linux) (you need to be logged in). You may have to install a few libraries; we installed `gksudo`, `libc6:i386`, and `lib32ncurses5` and used Java 1.8.0\_151 during our installation.

3\) You can then run the installation file as so:

```bash
$ ./install_sw4stm32_linux_64bits-vX.X.run
```

The checksum file will be used to check the download integrity which may take some time. Eventually, a window pane similar to below should pop up.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LV13To7ieIrVl6kdz4n%2F-LV13VoqWQILN2kXilAh%2F1_initial_linux.png?generation=1546222966690624\&alt=media)

4\) You will have to accept two license agreements to proceed with the installation, after which you will be asked to specify the installation path. If the path does not exist, you will be asked to create the directory. Take note of this directory because you will have to navigate here to run the software!

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRhXK-bzr8JgMO0%2F5_specify_path.png?generation=1542640275155545\&alt=media)

5\) Next, you can select which packs to install; leave as is. You will then be asked to confirm your installation path and packs to install. Pressing "Next" will start the installation (see below).

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRjxmaibRMBaCQG%2F7_select_packs.png?generation=1542640275140548\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRlxpKDjhYzqEJB%2F8_confirm_packs.png?generation=1542640275188417\&alt=media)

6\) When the installation is done, the progress bars will appear as below. Click "Next" to finish the installation procedure and to proceed to the final pane of the installation wizard. Press "Done" and the installation is complete!

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRn0nvV2iRvCaYu%2F9_installation_done.png?generation=1542640260907719\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRpL6IqtQ9ULDnq%2F11_close_installer.png?generation=1542640269489321\&alt=media)

*Note: you may have to enter your computer password for certain "rules" to be added to* `"/etc/udev/rules.d"` *during the installation (see below).*

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRrFozbuXJUetvb%2F10_enter_pwd_rules.png?generation=1542640265628212\&alt=media)

7\) You can run the software by navigating from a terminal to the directory where SW4STM32 was installed and running the following command (or double-clicking from a file explorer):

```bash
$ ./eclipse
```

The application is called `"eclipse"` since the software is based off of Eclipse.

8\) You will be prompted to select a workspace (see below); we recommend creating a workspace called "COM303-Workspace" for the exercises we will be doing.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRtFxAxsM_8ackz%2F12_select_workspace_1.png?generation=1542640261154603\&alt=media)

After setting the workspace, you should see a window pane similar to below.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRvAZlSyGXaMtLL%2F13_sw4stm32.png?generation=1542640266366396\&alt=media)

You can now proceed to creating [your first project](https://lcav.gitbook.io/dsp-labs/installation/instructions)!

## MacOS

*Note: the instructions were tested using MacOS Sierra, Version 10.12.6 on February 7, 2018. There is also a requirement for (at least) Xcode 7; we tested with Xcode 8.3.3.*

If you face any complications, please refer to the [official instructions](http://www.openstm32.org/Installing%2BSystem%2BWorkbench%2Bfor%2BSTM32%2Bwith%2Binstaller) (MacOS installation instructions are at the bottom) and/or to the forums (you need to be logged in to see the instructions). Below we provide the instructions that worked for our system setup.

1\) From a terminal, navigate to the directory where the downloaded RUN and checksum files are located. Check the permissions with the following command:

```bash
$ ls -l
```

If you do not see an `x` in the permissions for the RUN file:

```bash
>> -rw-r--r--@ ... install_sw4stm32_macos_64bits-vX.X.run
```

You will have to give execution rights to the file as such:

```bash
$ chmod 755 install_sw4stm32_macos_64bits-vX.X.run
```

The `ls -l` command should then show something like:

```bash
>> -rwxr-xr-x@ ... install_sw4stm32_macos_64bits-vX.X.run
```

You can now run the installation file as so:

```bash
$ ./install_sw4stm32_macos_64bits-vX.X.run
```

The checksum file will be used to check the download integrity which may take some time. Eventually, a window pane similar to below should pop up.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRxpyboPU_NNBCD%2Fmac_install_1.png?generation=1542640261380265\&alt=media)

2\) You will have to accept two license agreements to proceed with the installation, after which you will be asked to specify the installation path (see below). If the path does not exist, you will be asked to create the directory.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZRzejtmCcjgw_KF%2Fmac_install_4.png?generation=1542640260607657\&alt=media)

3\) Next, you can select which packs to install; leave as is. You will then be asked to confirm your installation path and packs to install. Pressing "Next" will start the installation (see below).

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZS0eBZsekHpp_0F%2Fmac_install_6%20\(1\).png?generation=1542640260582076\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZS26NHNOV0MkBY6%2Fmac_install_7%20\(1\).png?generation=1542640260979848\&alt=media)

4\) When the installation is done, the progress bars will appear as below. Click "Next" to finish the installation procedure and to proceed to the final pane of the installation wizard (see below). Press "Done" and the installation is complete!

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZS48YSfyQsYrFSr%2Fmac_install_9.png?generation=1542640262971431\&alt=media)

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZS6hvPJzq1uLAQy%2Fmac_install_10.png?generation=1542640268400768\&alt=media)

5\) You can run the software by navigating to the directory where SW4STM32 was installed and double-clicking the Application file called "SystemWorkbench" You will be prompted to select a workspace (see below); we recommend creating a workspace called "COM303-Workspace" for the exercises we will be doing.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZS8bJYNG44z4yfI%2Fmac_install_11.png?generation=1542640271406355\&alt=media)\
After setting the workspace, you should see a window pane similar to below.

![](https://2920775871-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPoyKvCv4LRUhdM3-rr%2F-LRgWXZcG-lrH5oKZak6%2F-LRgWZSAEV0kvUVrw9Nw%2Fmac_install_12.png?generation=1542640261314323\&alt=media)

You can now proceed to creating [your first project](https://lcav.gitbook.io/dsp-labs/installation/instructions)!
