1. Open the Source Code
- Open Mbed Studio and login using your Mbed account
- Go to File → Open Workspace → <workspace_directory> (the workspace you have created in Set up your Software Environment: Downloading the example code onto your local machine)
- On the top left, select decada-embedded-example-mbedos as the Active program
Visual Studio Code
- In VS Code, go to File → Open Workspace... → <workspace_directory> (the workspace you have created in Set up your Software Environment: Pulling the MANUCA OS into your IDE)
2. Set up Important Configurations
2.1 Input DECADA Credentials into Source Code
- On your IDE (mbed studio/vs code), open the mbed_app.json file and go to line 41 (as seen below) to add in your DECADA Credentials (which is obtained from Set up your Cloud Service: Configuring your Device(s)).
"help": "Organization Unit ID issued for connecting to DECADAcloud",
"help": "Access key issued for connecting to DECADAcloud application",
"help": "Access secret issued for connecting to DECADAcloud application",
"help": "Product key issued for connecting to DECADAcloud product",
"help": "Product secret issued for connecting to DECADAcloud product",
- Save your changes.
3. Build the binary
In Mbed Studio, ensure target is set to NUCLEO-F767ZI (NUCLEO_F767ZI)
We use C++14 as the standard for software development, which is included in mbedos's default build profiles.
Select Release under build profile, for the smallest compiled binary.
Click on the blue hammer icon on the left to build the source code.
If your build is successful, you should see the line
Image: BUILD/NUCLEO_F767ZI/ARMC6/decada-embedded-example-mbedos.bin, where the binary image is located.
Visual Studio Code
- In VS Code's terminal (or your regular terminal) enter the following line to compile:
mbed compile --target NUCLEO_F767ZI --toolchain GCC_ARM --profile release
If your build was successful, you should see something similar to the screenshot below:
The binary image will be located in
4. Flash the binary into MANUCA DK
- Locate the binary file in the BUILD folder i.e.
- Using ST-Link V3 programmer, simply drag-and-drop the binary into the hardware folder (similar to copying a file into a USB stick).
5. Configure WiFi SSID, and verify flash success
The ST-Link programmer should flash red and green as the binary is being flashed on the MANUCA DK.
Open your serial debug program, for example minicom, and press the hardware reset button on the MANUCA DK as shown below. The button is labelled as H/W RESET, located on the right of the WIRELESS MODULE slot.
Hit the spacebar while in your serial debug program, and you should see the Boot Manager screen as shown. Note that the BootManager can only be accessed within the first 5 seconds of a hard reset.
Enter the passphrase
stack2020 (for R2.1.0 builds onwards) to login to the Boot Manager.
After successfully logging into Boot Manager:
- Select option (1) to change to your dedicated WiFi SSID
- Select option (2) to change to your dedicated WiFi Password
- Select option (-2) to perform a software reset and exit the BootManager.
- Select option (-1) if you wish to clear the WiFi SSID, WiFi Password and SSL Certificates, which are all stored in Persistence Storage.
- The program will automatically register with DECADA Cloud and publish the on-board temperature sensor readings upstream onto your DECADA dashboard.