1. Setting up the Integrated Development Environment (IDE)
Proceed with the following steps, depending on which Operating System your development machine is running on.
Available Integrated Development Environments (IDEs):
- Mbed Studio (Recommended) - macOS, Windows and Linux
- Visual Studio Code (VS Code) - Ubuntu Setup Included Only
Mbed Studio Setup
- Create an Mbed Account at https://os.mbed.com/account/signup/ (This account is required to use Mbed Studio IDE)
- Download Mbed Studio from https://os.mbed.com/studio/
- Install Mbed Studio
Visual Studio Code Setup
- Download VS Code for Ubuntu at https://code.visualstudio.com/download
- Install VS Code
- Install Python by entering the following line in Terminal:
sudo apt-get install python2.7
- Install Pip by entering the following line in Terminal:
sudo apt-get install python-pip
- Download gcc-arm-embedded-9-2020-q2-update Toolchain; download the toolchain 9-2020-q2-update from here, and decompress the folder
- Install mbed client by entering the following line in Terminal:
Enter the following line in Terminal to check if mbed-cli is properly installed.
sudo pip install mbed-cli
- Add gcc-arm toolchain to mbed-cli compiler by entering the following line in Terminal:
mbed config -G GCC_ARM_PATH <path to GCC_ARM bin\> # path example: ~/gcc-arm/gcc-arm-none-eabi-9-2020-q2-update/bin/
<path to GCC_ARM bin\> with the file path of the downloaded GCC ARM toolchain.
Enter the following line in Terminal to show the toolchain attached to mbed-cli compiler.
- On VS Code, install the following packages under Extensions (ctrl + shift + x)
a. C/C++ By Microsoft
b. Cortex-Debug by marus25
c. ESLint by Dirk Baeumer
d. Python by Microsoft
2. Downloading the example code onto your local machine
We will be using decada-embedded-example-mbedos in this guide.
Development Machine Pre-requisite(s):
> Git installed
- Create a folder that would be your mbed work space by entering the following line in terminal. Replace
<workspace_directory> with your desired workspace name.
- Go into the workspace by entering the following line in Terminal:
- Enter the following line in Terminal to initialize a git work space
- Then, enter the following line to download pull the remote repository to your development machine.
git clone --recurse-submodules https://github.com/GovTechSIOT/decada-embedded-example-mbedos.git
- For non-Mbed Studio users, install the required python modules by running the following code lines in Terminal:
sudo pip install -r requirements.txt
3. Installing your Serial Debug Program
This program will allow you to read the serial debug output from the MANUCA DK. Proceed with the following steps to install your serial debug program, depending on which OS your local machine is running on.
- Install minicom using the following commands in Terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install minicom
Download Tera Term for Windows.
Run the Tera Term
.exe file and install the software.
- Install minicom by entering the following line into Terminal. This step will install minicom if not installed yet.
sudo apt-get install minicom