Skip to content

Commit 1d86714

Browse files
authored
Add STM U585I (eclipse-threadx#374)
* Add STM U585I * add U5 workflow * add u5 to main readme * output MAC and FW version from device
1 parent 47fbb9c commit 1d86714

File tree

485 files changed

+672011
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+672011
-4
lines changed

.github/workflows/U585I-IOT02A.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: U585I-IOT02A
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
defaults:
10+
run:
11+
working-directory: STMicroelectronics/B-U585I-IOT02A
12+
13+
jobs:
14+
build:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
with:
25+
submodules: recursive
26+
27+
- name: arm-none-eabi-gcc
28+
uses: ryanwinter/arm-none-eabi-gcc@master
29+
with:
30+
release: '10-2021.10'
31+
32+
- name: Install Ninja
33+
uses: seanmiddleditch/gha-setup-ninja@v3
34+
35+
- name: Build binary
36+
run: |
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m33.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following guides will get you started:
2525
|[Silicon Labs EFR32MG12](SiliconLabs/EFR32MG12)|![](https://github.com/azure-rtos/getting-started/actions/workflows/EFR32MG12.yml/badge.svg)||
2626
|[STMicroelectronics B-L475E-IOT01A](STMicroelectronics/B-L475E-IOT01A)|![](https://github.com/azure-rtos/getting-started/actions/workflows/L475E-IOT01A.yml/badge.svg)|
2727
|[STMicroelectronics B-L4S5I-IOT01A](STMicroelectronics/B-L4S5I-IOT01A)|![](https://github.com/azure-rtos/getting-started/actions/workflows/L4S5I-IOT01A.yml/badge.svg)|
28+
|[STMicroelectronics B-U585I-IOT02A](STMicroelectronics/B-U585I-IOT02A)|![](https://github.com/azure-rtos/getting-started/actions/workflows/U585I-IOT02A.yml/badge.svg)|
2829

2930
**Build Status:** A GitHub workflow building on Windows & Linux.
3031

Renesas/RX65N_Cloud_Kit/app/rx_networking.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ UINT rx_network_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
239239
{
240240
nx_dns_delete(&nx_dns_client);
241241
nx_ip_delete(&nx_ip);
242-
nx_packet_pool_delete(&nx_pool);
242+
nx_packet_pool_delete(&nx_pool);
243243
printf("ERROR: Failed to init the SNTP client (0x%08x)\r\n", status);
244244
}
245245

@@ -270,7 +270,7 @@ UINT rx_network_connect()
270270
// Force a disconnect
271271
R_WIFI_SX_ULPGN_Disconnect();
272272

273-
// Obtain the IP internal mutex before reconnecting WiFi
273+
// Obtain the IP internal mutex before reconnecting WiFi
274274
join_result = R_WIFI_SX_ULPGN_Connect(netx_ssid, netx_password, netx_mode, 1, &ip_cfg);
275275

276276
tx_thread_sleep(5 * TX_TIMER_TICKS_PER_SECOND);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"version": "0.2.1",
3+
"configurations": [
4+
{
5+
"project": "CMakeLists.txt",
6+
"projectTarget": "stm32u585_azure_iot.elf (app\\stm32u585_azure_iot.elf)",
7+
"name": "Launch",
8+
"type": "cppdbg",
9+
"request": "launch",
10+
"cwd": "${workspaceRoot}",
11+
"program": "${debugInfo.fullTargetPath}",
12+
"processName": "stm32u585_azure_iot",
13+
"MIMode": "gdb",
14+
"miDebuggerPath": "arm-none-eabi-gdb",
15+
"miDebuggerServerAddress": "localhost:3333",
16+
"debugServerPath": "openocd",
17+
"debugServerArgs": "-f interface/stlink.cfg -f target/stm32u5x.cfg",
18+
"serverStarted": "Listening on port .* for gdb connections",
19+
"filterStderr": true,
20+
//"stopAtConnect": true,
21+
"stopOnEntry": true,
22+
"svdPath": "${workspaceRoot}/STM32U5xx.svd",
23+
"hardwareBreakpoints": {
24+
"require": true,
25+
"limit": 6
26+
},
27+
"postRemoteConnectCommands": [
28+
{
29+
"text": "-target-download",
30+
"ignoreFailures": false
31+
},
32+
{
33+
"text": "-interpreter-exec console \"monitor reset halt\"",
34+
"ignoreFailures": false
35+
}
36+
]
37+
}
38+
]
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Cortex Debug",
9+
"cwd": "${workspaceRoot}",
10+
"executable": "${workspaceFolder}/build/app/stm32u585_azure_iot.elf",
11+
"request": "launch",
12+
"type": "cortex-debug",
13+
"servertype": "openocd",
14+
"runToMain": true,
15+
"breakAfterReset": true,
16+
// "showDevDebugOutput": true,
17+
"configFiles": [
18+
"interface/stlink.cfg",
19+
"target/stm32u5x.cfg"
20+
]
21+
}
22+
]
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
3+
"cmake.configureOnOpen": true,
4+
"cmake.generator": "Ninja",
5+
"cmake.buildDirectory": "${workspaceFolder}/build"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Flash",
6+
"type": "shell",
7+
"command": "openocd -f interface/stlink.cfg -f target/stm32u5x.cfg -c \"program build/app/stm32u585_azure_iot.elf verify\" -c \"reset halt\" -c \"shutdown\"",
8+
"problemMatcher": [],
9+
// "dependsOn": [ "Build" ]
10+
},
11+
{
12+
"label": "Build",
13+
"type": "shell",
14+
"command": "rebuild.bat",
15+
"problemMatcher": "$gcc",
16+
"group": {
17+
"kind": "build",
18+
"isDefault": true
19+
},
20+
// This must be commented out to run on Linux.
21+
"options": {
22+
"shell": {
23+
"executable": "cmd.exe",
24+
"args": [ "/c" ]
25+
}
26+
}
27+
}
28+
]
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
5+
set(CMAKE_C_STANDARD 99)
6+
7+
set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
8+
set(SHARED_SRC_DIR ${GSG_BASE_DIR}/shared/src)
9+
set(SHARED_LIB_DIR ${GSG_BASE_DIR}/shared/lib)
10+
11+
set(PROJECT stm32u585_azure_iot)
12+
13+
# use the repo version of ninja on Windows as there is no Ninja installer
14+
if(WIN32)
15+
set(CMAKE_MAKE_PROGRAM ${GSG_BASE_DIR}/cmake/ninja CACHE STRING "Ninja location")
16+
endif()
17+
18+
# Set the toolchain if not defined
19+
if(NOT CMAKE_TOOLCHAIN_FILE)
20+
set(CMAKE_TOOLCHAIN_FILE "${GSG_BASE_DIR}/cmake/arm-gcc-cortex-m33.cmake")
21+
endif()
22+
23+
include(${GSG_BASE_DIR}/cmake/utilities.cmake)
24+
25+
# Define the Project
26+
# CXX enables IntelliSense only. Sources are still compiled as C.
27+
project(${PROJECT} C CXX ASM)
28+
29+
# Disable common networking component, STM has it's own
30+
set(DISABLE_COMMON_NETWORK true)
31+
32+
add_subdirectory(${SHARED_SRC_DIR} shared_src)
33+
add_subdirectory(lib)
34+
add_subdirectory(app)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": 2,
3+
"configurePresets": [
4+
{
5+
"name": "arm-gcc-cortex-m33",
6+
"generator": "Ninja",
7+
"binaryDir": "${sourceDir}/build",
8+
"cacheVariables": {
9+
"CMAKE_BUILD_TYPE": "Debug",
10+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install",
11+
"CMAKE_TOOLCHAIN_FILE": {
12+
"type": "FILEPATH",
13+
"value": "${sourceDir}/../../cmake/arm-gcc-cortex-m33.cmake"
14+
}
15+
},
16+
"architecture": {
17+
"value": "unspecified",
18+
"strategy": "external"
19+
},
20+
"vendor": {
21+
"microsoft.com/VisualStudioSettings/CMake/1.0": {
22+
"intelliSenseMode": "linux-gcc-arm"
23+
}
24+
}
25+
}
26+
],
27+
"buildPresets": [
28+
{
29+
"name": "arm-gcc-cortex-m33",
30+
"configurePreset": "arm-gcc-cortex-m33"
31+
}
32+
]
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
page_type: sample
3+
description: Connecting an STMicroelectronics B-U585I-IOT02A device to Azure IoT using Azure RTOS
4+
languages:
5+
- c
6+
products:
7+
- azure-iot
8+
- azure-iot-pnp
9+
- azure-rtos
10+
---
11+
12+
# Connect an STMicroelectronics B-U585I-IOT02A Discovery kit to Azure IoT
13+
14+
[![Quickstart article](../../docs/media/docs-link-buttons/azure-quickstart.svg)](https://docs.microsoft.com/azure/iot-develop/quickstart-devkit-stm-b-l4s5i)
15+
[![Documentation](../../docs/media/docs-link-buttons/azure-documentation.svg)](https://docs.microsoft.com/azure/iot-develop/)
16+
17+
The **Quickstart** button above provides the complete steps for creating an IoT Central application and then configuring, building and flashing the device.
18+
19+
For guidance on connecting additional devices, see the [Embedded device quickstarts](https://docs.microsoft.com/azure/iot-develop/quickstart-devkit-mxchip-az3166).
20+
21+
## What you need
22+
23+
* The [B-U585I-IOT02A devkit](https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html)
24+
* Wi-Fi 2.4 GHz
25+
* USB 2.0 A male to Micro USB male cable
26+
27+
## Get the source code
28+
29+
1. Clone the repository:
30+
```shell
31+
git clone https://github.com/azure-rtos/getting-started.git
32+
```
33+
34+
1. Add Wi-Fi and Azure IoT configuration to the config file:
35+
36+
*STMicroelectronics\B-U585I-IOT02A\app\azure_config.h*
37+
38+
1. Configure a serial port app at baud rate **115,200** to monitor the device output.
39+
40+
## STM32CubeMX configuration
41+
42+
The board specific code was creating using [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html). The project file can be found in the [lib/stmcubeu5/stmcubemx]() directory if further customization is needed.
43+

0 commit comments

Comments
 (0)