Software Installation

<< Click to Display Table of Contents >>

Navigation:  Get Started >

Software Installation

Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

Waijung Installation Instructions

To install Waijung, follow the following steps.

hmtoggle_plus11. Download and Install STM32 ST-Link Utility and ST-Link/V2 USB driver

STM32 ST-Link Utility and ST-Link/V2 USB driver is available for download free from

For Windows 7 and earlier, ST-Link/V2 USB driver is installed automatically when you install STM32 ST-Link Utility.
For Windows 8 ST-Link/V2 USB driver should be installed after ST-Link Utility installation.

After download, install both software (STM32 ST-Link Utility and ST-Link/V2 USB driver).

ST-Link Utility  is used to download executable files (*.bin or *.hex) to target (STM32)'s flash memory.

Once properly install ST-Link Utility, you should be able to open the ST-Link Utility window as shown below.



hmtoggle_plus12. Download and Install FTDI USB driver for aMG USB Connect

FTDI USB driver is available for download free from The download is specific to the Operating System.

Installation guide for FTDI USB driver:

hmtoggle_plus13. Test Target Board Connection

Connect STM32F4xx board to the host PC and run STM32 ST-Link Utility Program.

You can test connection between STM32 ST-Link Utility (on the host PC) and the target board by pressing the connect to target button.

To pass this test step, ST-Link Utility should show something similar to the picture below.


Depending on your ST-Link hardware, you may need to update the firmware of your ST-Link hardware. Just press the Firmware update menu and follow on the screen instructions.

If the program warns about "the device not in a proper mode", just disconnect and reconnect the power supply and run Firmware update again.



hmtoggle_plus14. Install Waijung Blockset

1. Download

Download Waijung Blockset and STM32F4 Target installation package (waijung_##_##.7z) from



2. Extract the downloaded 7z File

After the download is completed. Extract the downloaded installation package to your desired directory. (7-Zip is one good free open-source utility for extracting  compressed files.) This will be the root directory for your Waijung Blockset and STM32F4 Target. Although you can extract and run Waijung from any directory in your computer. We recommend extracting to a directory where you have full write access. If you are updating the software, you can replace the content of previous software with the new version and run install_waijung.m as normal.



3. Run "install_waijung.m"

Run "install_waijung.m" from within Matlab.

Matlab must be "Run as Administrator".



5. Check Installation Status

After a successful installation, Matlab Command Window should report status as shown below.



6. Check Installed Blockset

Open the Simulink Library Browser and you should see Waijung Blockset and STM32F4 Target. This completes the installation process.



What are included in the installation package?

Waijung Blockset and STM32F4 Target package already contains all tools you need to get started, including:

1.Waijung Blockset.
2.STM32F4 Target Blockset.
3.GNU ARM Compiler for compiling the generated source code.
4.GNU Make utilities for controlling the build process.
5.OpenOCD Tools for debugging.
6.Base software libraries for STM32F4 (Standard peripherals etc.)
7.ST-Link Utility (Lastest version available for download from