A Microsoft technology based on an open modeling language that enables developers to connect internet of things (IoT) devices to the cloud without having to write any code.
Hi Amara Rakesh
Trying to summarize the steps mentioned here for STM32 boards
Prerequisites:
- ST Microelectronics DevKit: STM32H745I
- Ethernet Cable
- Micro USB male cable
- CMake (Version 3.13 or higher)
- Ninja build system (Version 1.10 or higher)
- GNU Arm Embedded Toolchain (This sample was tested against Version 10.3)
- Serial terminal tool like Termite, Putty, Tera Term, etc.
- ST Microelectronics DevKit: STM32H745I
- Ethernet Cable
- Micro USB male cable
- Prerequisites
- CMake (Version 3.13 or higher)
- Ninja build system (Version 1.10 or higher)
- GNU Arm Embedded Toolchain (This sample was tested against Version 10.3)
- Serial terminal tool like Termite, Putty, Tera Term, etc.
Setup Steps
- Enable longpath support for Windows and Git
git config --system core.longpaths true - Clone and initialize the Repository:
git clone https://github.com/Azure-Samples/iot-middleware-freertos-samples.git git submodule update --init --recursive - Configure Azure IoT Hub:
- Create an IoT Hub and register your device.
- Use the Azure CLI or UI to retrieve connection strings from Azure IOT hub or use DPS (Device Provisioning Service).
- Update Configuration Files: Update the file **
iot-middleware-freertos-samples/demos/projects/ST/stm32h745i-disco/cm7/config/demo_config.h**with your device credentials (IoT Hub connection string/primary key or DPS info). Prepare the device - Build the image: navigate to the
iot-middleware-freertos-samplesdirectory and run the following commands:
After the build completes, confirm that a folder namedcmake -G Ninja -DVENDOR=ST -DBOARD=stm32h745i-disco -Bstm32h745i-disco . cmake --build stm32h745i-discostm32h745i-disco/was created and it contains a file nameddemo/projects/ST/stm32h745i-disco/iot-middleware-sample.bin. - Flash the Firmware:
- Connect the Micro USB cable to the USB STLINK port on the STM DevKit, and then connect it to your computer.
- In File Explorer, find the binary file that you created in the previous section and copy it.
- In File Explorer, find the STM Devkit that's connected to your computer. The device appears as a drive on your system with the drive label
DIS_H745XI. - Paste the binary file into the root folder of the STM Devkit. Flashing starts automatically and completes in a few seconds.
- Connect an Ethernet cable to your STM DevKit and your network equipment.
- Monitor Output:
- You can use one of the terminal applications to monitor communication and confirm that your device is set up correctly.
- Go to Device Manager in Windows to determine which COM port your device was assigned. The following settings can be used to monitor serial data:
- Baud Rate:
115200 - Data Bits:
8 - Stop Bits:
1 - Parity: none
- Flow Control: none
- The device should connect to Azure IoT Hub and start sending telemetry.
Hope it provides more clarity. Please let us know if it helps
Thank you