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: Pulling the MANUCA OS into your IDE)
- On the top left, select stack-manuca-os 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 44 (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++11 as the standard for software development. Under Build profile, select Import custom profiles.
Go to stack-manuca-os > tools > profile then select mbedstudio_debug.json.
The screenshot below shows how it looks like on Windows OS.
On mbed studio, select the mbedstudio_debug.json build profile. There will be a tick beside the selected profile.
- 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/stack-manuca-os.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 ./tools/profiles/tiny_debug.json
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 e.g.
- 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
stackx2019 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.