Skip to content

Commit fe41b48

Browse files
authored
seperate stm l475 & l4s5 (#314)
* add seperate L475 and L4S5 devkit code bases * Create seperate workflows for each STM board.
1 parent 65ec5aa commit fe41b48

File tree

989 files changed

+1063713
-10
lines changed

Some content is hidden

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

989 files changed

+1063713
-10
lines changed

.github/workflows/STM32L4_L4+.yml renamed to .github/workflows/L475E-IOT01A.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: STM32L4_L4+
1+
name: L475E-IOT01A
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88

99
defaults:
1010
run:
11-
working-directory: STMicroelectronics/STM32L4_L4+
11+
working-directory: STMicroelectronics/B-L475E-IOT01A
1212

1313
jobs:
1414
build:

.github/workflows/L4S5I-IOT01A.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ The following guides will get you started:
2222
|[Renesas RX65N Cloud Kit](Renesas/RX65N_Cloud_Kit)|![](https://github.com/azure-rtos/getting-started/workflows/RX65N-Cloud-Kit/badge.svg)||
2323
|[Renesas RSK+RX65N-2MB](Renesas/RSK_RX65N_2MB)|![](https://github.com/azure-rtos/getting-started/workflows/RSK-RX65N-2MB/badge.svg)||
2424
|[Silicon Labs EFR32MG12](SiliconLabs/EFR32MG12)|![](https://github.com/azure-rtos/getting-started/workflows/EFR32MG12/badge.svg)||
25-
|[STMicroelectronics B-L475E-IOT01A](STMicroelectronics/STM32L4_L4+)|![](https://github.com/azure-rtos/getting-started/workflows/STM32L4_L4+/badge.svg)|![](https://expresslogic.visualstudio.com/DeviceLab%20AzureRTOS%20GSG/_apis/build/status/azure-rtos.getting-started.stm.l475?repoName=azure-rtos%2Fgetting-started&branchName=master)|
26-
|[STMicroelectronics B-L4S5I-IOT01A](STMicroelectronics/STM32L4_L4+)|![](https://github.com/azure-rtos/getting-started/workflows/STM32L4_L4+/badge.svg)|![](https://expresslogic.visualstudio.com/DeviceLab%20AzureRTOS%20GSG/_apis/build/status/azure-rtos.getting-started.stm.l4s5?repoName=azure-rtos%2Fgetting-started&branchName=master)|
25+
|[STMicroelectronics B-L475E-IOT01A](STMicroelectronics/B-L475E-IOT01A)|![](https://github.com/azure-rtos/getting-started/workflows/B-L475E-IOT01A/badge.svg)|![](https://expresslogic.visualstudio.com/DeviceLab%20AzureRTOS%20GSG/_apis/build/status/azure-rtos.getting-started.stm.l475?repoName=azure-rtos%2Fgetting-started&branchName=master)|
26+
|[STMicroelectronics B-L4S5I-IOT01A](STMicroelectronics/B-L4S5I-IOT01A)|![](https://github.com/azure-rtos/getting-started/workflows/B-L4S5I-IOT01A/badge.svg)|![](https://expresslogic.visualstudio.com/DeviceLab%20AzureRTOS%20GSG/_apis/build/status/azure-rtos.getting-started.stm.l4s5?repoName=azure-rtos%2Fgetting-started&branchName=master)|
2727

2828
**Build Status:** A GitHub workflow building on Windows & Linux.
2929

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "0.2.1",
3+
"configurations": [
4+
{
5+
"project": "CMakeLists.txt",
6+
"projectTarget": "stm32l475_azure_iot.elf (app\\stm32l475_azure_iot.elf)",
7+
"name": "Launch",
8+
"type": "cppdbg",
9+
"request": "launch",
10+
"cwd": "${workspaceRoot}",
11+
"program": "${debugInfo.fullTargetPath}",
12+
"MIMode": "gdb",
13+
"miDebuggerPath": "arm-none-eabi-gdb",
14+
"miDebuggerServerAddress": "localhost:3333",
15+
"debugServerPath": "openocd",
16+
"debugServerArgs": "-f board/stm32l4discovery.cfg",
17+
"serverStarted": "Listening on port .* for gdb connections",
18+
"filterStderr": true,
19+
"stopAtConnect": true,
20+
"hardwareBreakpoints": {
21+
"require": true,
22+
"limit": 6
23+
},
24+
"postRemoteConnectCommands": [
25+
{
26+
"text": "-target-download",
27+
"ignoreFailures": false
28+
},
29+
{
30+
"text": "-interpreter-exec console \"monitor reset halt\"",
31+
"ignoreFailures": false
32+
}
33+
],
34+
"svdPath": "${workspaceRoot}/STM32L4x5.svd"
35+
}
36+
]
37+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"name": "ARM GCC Cortex",
4+
"toolchainFile": "${workspaceFolder}/../../cmake/arm-gcc-cortex-m4.cmake"
5+
},
6+
{
7+
"name": "ARM IAR Cortex",
8+
"toolchainFile": "${workspaceFolder}/../../cmake/arm-iar-cortex-m4.cmake"
9+
}
10+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["ms-vscode.cpptools", "ms-vscode.cmake-tools"]
3+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "L475E: Launch",
6+
"type": "cortex-debug",
7+
"request": "launch",
8+
"servertype": "openocd",
9+
"device": "STM32L475VG",
10+
"runToMain": true,
11+
"executable": "${workspaceFolder}/build/app/stm32l475_azure_iot.elf",
12+
"svdFile": "${workspaceFolder}/STM32L4x5.svd",
13+
"cwd": "${workspaceRoot}",
14+
"configFiles": [
15+
"board/stm32l4discovery.cfg"
16+
]
17+
},
18+
{
19+
"name": "Launch",
20+
"type": "cppdbg",
21+
"request": "launch",
22+
"cwd": "${workspaceFolder}",
23+
"program": "${workspaceFolder}/build/app/stm32l475_azure_iot.elf",
24+
"MIMode": "gdb",
25+
"miDebuggerPath": "arm-none-eabi-gdb",
26+
"miDebuggerServerAddress": "localhost:3333",
27+
"debugServerPath": "openocd",
28+
"debugServerArgs": "-f board/stm32l4discovery.cfg",
29+
"serverStarted": "Listening on port .* for gdb connections",
30+
"filterStderr": true,
31+
"stopAtConnect": true,
32+
"hardwareBreakpoints": {
33+
"require": true,
34+
"limit": 6
35+
},
36+
"preLaunchTask": "Flash",
37+
"svdPath": "${workspaceFolder}/STM32L4x5.svd"
38+
}
39+
]
40+
}
Lines changed: 6 additions & 0 deletions
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+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Flash",
6+
"type": "shell",
7+
"command": "openocd -f board/stm32l4discovery.cfg -c \"program build/app/stm32l475_azure_iot.elf verify\" -c \"reset halt\" -c shutdown",
8+
"windows": {
9+
"options": {
10+
"shell": {
11+
"executable": "cmd.exe",
12+
"args": ["/c"]
13+
}
14+
}
15+
},
16+
"problemMatcher": [],
17+
"dependsOn": [ "Build" ]
18+
},
19+
{
20+
"label": "Build",
21+
"type": "cmake",
22+
"command": "build",
23+
"problemMatcher": "$gcc",
24+
"group": {
25+
"kind": "build",
26+
"isDefault": true
27+
},
28+
// This must be commented out to run on Linux.
29+
"options": {
30+
"shell": {
31+
"executable": "cmd.exe",
32+
"args": [ "/c" ]
33+
}
34+
}
35+
}
36+
]
37+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
# use the repo version of ninja on Windows as there is no Ninja installer
12+
if(WIN32)
13+
set(CMAKE_MAKE_PROGRAM ${GSG_BASE_DIR}/cmake/ninja CACHE STRING "Ninja location")
14+
endif()
15+
16+
# Set the toolchain if not defined
17+
if(NOT CMAKE_TOOLCHAIN_FILE)
18+
set(CMAKE_TOOLCHAIN_FILE "${GSG_BASE_DIR}/cmake/arm-gcc-cortex-m4.cmake")
19+
endif()
20+
21+
include(${GSG_BASE_DIR}/cmake/utilities.cmake)
22+
23+
# Define the Project
24+
# CXX enables IntelliSense only. Sources are still compiled as C.
25+
project(stm32l475_azure_iot C CXX ASM)
26+
27+
# Disable common networking component, STM has it's own
28+
set(DISABLE_COMMON_NETWORK true)
29+
30+
add_subdirectory(${SHARED_SRC_DIR} shared_src)
31+
add_subdirectory(lib)
32+
add_subdirectory(app)

0 commit comments

Comments
 (0)