Skip to content

Commit a6c02cb

Browse files
authored
Cleaned project files and updated README.md files (#40)
1 parent cbb136b commit a6c02cb

File tree

18 files changed

+153
-116
lines changed

18 files changed

+153
-116
lines changed

.ci/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# Continuous Integration (CI) test for csolution-examples
22

3-
43
Content of `.ci` Directory | Description
54
:----------------------------|:-----------------
65
`vcpkg-configuration.json` | Tool setup for the CI test.
76

8-
97
## GitHub Action Workflows
108

119
The [**`GitHub Actions`**](https://docs.github.com/en/actions) in the directory `.github/workflows` are the scripts for the CI tests. These scripts contain detailed comments about each step that is executed.
@@ -17,4 +15,4 @@ Projects in the Arm csolution-examples uses the **`ARM compiler (AC6)`** as well
1715

1816
- **`SimpleTZ-CI.yml`** implements build tests for a **`TrustZone`** based project by using the **`AC6`** and **`GCC`** toolchains. The execution tests runs on [**`Arm Virtual Hardware - Fixed Virtual Platforms (AVH FVP)`**](https://arm-software.github.io/AVH/main/simulation/html/index.html) simulation models. The directory **`FVP`** contains configuration files for the **`FVP simulation models`**.
1917

20-
- **`CubeMX-CI.yml`** implements a build test for a **`CubeMX`** generated project by using only the **`AC6`** toolchain. The output of this build test is stored as artifact and can be downloaded.
18+
- **`CubeMX-CI.yml`** implements a build test for a **`CubeMX`** generated project by using only the **`AC6`** toolchain.

CubeMX/README.md

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
1-
# CubeMX project
1+
# CubeMX Example
22

3-
This project shows the usage of CubeMX. Refer to the documentation chapter
4-
[**CMSIS-Toolbox > Configure STM32 Devices with CubeMX**](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/tree/main/docs/CubeMX.md) for details.
3+
This *csolution project* shows the usage of [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html) which uses a [generator import file](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-CBuild-Format.md#generator-import-file) to obtain the device configuration and HAL driver source files.
4+
5+
This project uses two different target-types to configure execution from Flash ROM or execution from RAM. It uses a [variable](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-Input-Format.md#variables) to define the regions header file for each target in the file [`CubeMX.csolution.yml`](./CubeMX.csolution.yml).
56

67
## Prerequisites
78

89
### Tools
910

10-
- [CMSIS-Toolbox 2.3.0](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) or higher
11-
- [Keil MDK 5.37](https://www2.keil.com/mdk5/) or higher
11+
- [CMSIS-Toolbox 2.6.0](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) or higher
12+
- [Keil MDK 5.40](https://www2.keil.com/mdk5/) or higher
1213
- [STM32CubeMX 6.11](https://www.st.com/en/development-tools/stm32cubemx.html) or higher
1314

14-
>**Note:** later versions will also compile with GCC.
15+
>**Note:**
16+
>
17+
> This example uses the Arm Compiler 6 (AC6). [Using GCC Compiler](#using-gcc-compiler) explains how to configure for different compiler. A similar process also works for IAR.
1518
1619
### Packs
1720

18-
- Required packs are listed in the file [`CubeMX.csolution.yml`](./CubeMX.csolution.yml) and [`CubeMX.cproject.yml`](./CubeMX.cproject.yml)
21+
- Required packs are listed in the file [`CubeMX.csolution.yml`](./CubeMX.csolution.yml)
22+
23+
## Build Project
1924

20-
DFP and BSP development packs are available here [github.com/Open-CMSIS-Pack/pack-examples](https://github.com/Open-CMSIS-Pack/pack-examples). Clone the repo to `<working-dir>` and install the packs by executing:
25+
This command builds the project and downloads missing packs. If the file `CubeMX.cbuild-set.yml` is missing it creates this file with the context-set selection of the first `target-type` and the first `build-type`.
2126

2227
```bash
23-
> cpackget add <working-dir>\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc
24-
> cpackget add <working-dir>\pack-examples\B-U585I-IOT02A_BSP\Keil.B-U585I-IOT02A_BSP.pdsc
28+
> cbuild setup CubeMX.csolution.yml --context-set --packs
2529
```
2630

2731
## Run CubeMX
2832

29-
This command starts STM32CubeMX using the specified context.
33+
To change the device configuration, start STM32CubeMX using the following command.
3034

3135
```bash
32-
> csolution CubeMX.csolution.yml run --generator CubeMX --context CubeMX.Debug+MyBoard
36+
> csolution CubeMX.csolution.yml run --generator CubeMX --context-set
3337
```
3438

35-
For using CubeMX refer to the documentation chapter
39+
For using CubeMX refer to the documentation
3640
[**CMSIS-Toolbox > Configure STM32 Devices with CubeMX**](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/tree/main/docs/CubeMX.md).
3741

38-
## Generated Project
39-
40-
```bash
41-
> cbuild CubeMX.csolution.yml --packs --update-rte
42-
```
42+
The source code generated by CubeMX is imported using the file [STM32CubeMX\<target-type>\CubeMX.cgen.yml](./STM32CubeMX/MyBoard_ROM/CubeMX.cgen.yml). This allows you to create different settings for each target, for example evaluation board and custom hardware.
4343

44-
>**Note:** During the build process required packs may be downloaded.
44+
>**Note:**
45+
>
46+
> Refer to the pack overview page, for example the [STM32F4_DFP](https://www.keil.arm.com/packs/stm32f4xx_dfp-keil) for information on how to use an IDE workflow with CubeMX.
4547
4648
## Execute Project
4749

4850
You may use the debugger of choice for executing this program.
51+
52+
## Using GCC Compiler
53+
54+
By default this project is the Arm Compiler 6 (AC6). Using STM32CubeMX it can be reconfigured for the GCC or IAR compiler. To configure it for the GCC compiler execute these steps:
55+
56+
- In the file [`CubeMX.csolution.yml`](./CubeMX.csolution.yml) set `compiler: GCC`.
57+
58+
- Launch the STM32CubeMX generator with this CMSIS-Toolbox command: csolution <solution_name>.csolution.yml run -g CubeMX -c <context>
59+
60+
- In STM32CubeMX:
61+
- Open from the menu Project Manager - Project - Toolchain/IDE:
62+
- Select STM32CubeIDE and disable Generate Under Root.
63+
- Click GENERATE CODE to recreate the CubeMX generated files for the GCC compiler.
64+
65+
In the file [CubeMX.cproject.yml](./CubeMX.cproject.yml), update `linker:` node configuration to reference appropriate [GCC linker script template](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/build-overview.md#linker-script-templates). You may customize this GCC linker script template file to your project's requirements.
66+
67+
[Rebuild the project](#build-project) using the CMSIS-Toolbox command `cbuild` with the option `--rebuild`.

DualCore/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ This example generates **HelloWorld** executables for the **FRDM-K32L3A6** evalu
99
- [CMSIS-Toolbox 2.6.0](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) or higher
1010
- Arm Compiler 6.22 or higher
1111
- GCC Compiler 13.2.1 or higher
12-
- Arm Virtual Hardware for Corstone-300 v11.26.11
13-
14-
All these tools can be installed via [vcpkg](https://learn.arm.com/learning-paths/microcontrollers/vcpkg-tool-installation/)
1512

1613
### Packs
1714

@@ -31,3 +28,7 @@ The project is generated using the [CMSIS-Toolbox](https://github.com/Open-CMSIS
3128
```txt
3229
> cbuild HelloWorld.csolution.yml --packs --toolchain AC6
3330
```
31+
32+
## Execute Project
33+
34+
You may use the debugger of choice for executing this program.

Hello/Hello.csolution.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ solution:
22
created-for: [email protected]
33
description: Print Hello World and a counter value via UART
44
cdefault:
5-
compiler: AC6
5+
6+
select-compiler: # list of tested compilers
7+
- compiler: AC6
8+
- compiler: GCC
69

710
# It is recommended to list the pack or packs that define the device or board used in the csolution.yml file
811
packs:

Hello/README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ This project prints "Hello World" and a counter value via the UART output. It is
99
- [CMSIS-Toolbox 2.6.0](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) or higher
1010
- Arm Compiler 6.22 or higher
1111
- GCC Compiler 13.2.1 or higher
12-
- Arm Virtual Hardware for Corstone-300 v11.26.11
13-
14-
All these tools can be installed via [vcpkg](https://learn.arm.com/learning-paths/microcontrollers/vcpkg-tool-installation/)
12+
- Arm Virtual Hardware for Corstone-300 v11.26.11 or higher
1513

1614
### Packs
1715

18-
- Required packs are listed in the file [`Hello.csolution.yml`](./Hello.csolution.yml)
16+
- Required packs are listed in the file [`Hello.csolution.yml`](./Hello.csolution.yml). The file [`Hello.cbuild-pack.yml`](./Hello.cbuild-pack.yml) records the versions that have been used to generate the application.
1917

2018
## Project Structure
2119

@@ -24,10 +22,14 @@ The project is generated using the [CMSIS-Toolbox](https://github.com/Open-CMSIS
2422
- [`Hello.csolution.yml`](./Hello.csolution.yml) lists the required packs, defines,hardware targets, and thebuild-types (along with the compiler).
2523
- [`Hello.cproject.yml`](./Hello.cproject.yml) defines the source files and the software components.
2624

25+
> **Note:**
26+
>
27+
> The project also builds with the GCC compiler.
28+
2729
## Generate project binaries
2830

29-
```txt
30-
> cbuild Hello.csolution.yml --packs
31+
```bash
32+
> cbuild Hello.csolution.yml --packs --toolchain AC6
3133
```
3234

3335
>**Note:** During the build process required packs may be downloaded.
@@ -37,16 +39,21 @@ The project is generated using the [CMSIS-Toolbox](https://github.com/Open-CMSIS
3739
The project is configured for execution on [**Arm Virtual Hardware**](https://developer.arm.com/Tools%20and%20Software/Arm%20Virtual%20Hardware) which removes the requirement for a physical hardware board.
3840

3941
### Execute this project via command line
42+
4043
#### For debug type
41-
```txt
42-
> FVP_Corstone_SSE-300 -f FVP/FVP_Corstone_SSE-300/fvp-config.txt -a ./out/Debug/Hello.axf
43-
```
44+
45+
```bash
46+
> FVP_Corstone_SSE-300 -f FVP/FVP_Corstone_SSE-300/fvp-config.txt -a ./out/Debug/Hello.axf
47+
```
48+
4449
#### For release type
45-
```txt
46-
> FVP_Corstone_SSE-300 -f FVP/FVP_Corstone_SSE-300/fvp-config.txt -a ./out/Release/Hello.axf
47-
```
50+
51+
```bash
52+
> FVP_Corstone_SSE-300 -f FVP/FVP_Corstone_SSE-300/fvp-config.txt -a ./out/Release/Hello.axf
53+
```
4854

4955
### Execute this project in [**Keil Studio Cloud**](https://studio.keil.arm.com/)
56+
5057
- Keil Studio Cloud integrates also the Arm Virtual Hardware for FVP_Corstone_SSE-300/_Ethos-U55/_Ethos-U65 models. The steps to use the example are:
5158
- Start [Keil Studio Cloud](https://studio.keil.arm.com/) and login to the system using your account.
5259
- Use **File - Clone** and enter the URL: (https://github.com/Open-CMSIS-Pack/csolution-examples).

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
1-
[![License](https://img.shields.io/github/license/Open-CMSIS-Pack/csolution-examples?label)](https://github.com/Open-CMSIS-Pack/csolution-examples/blob/main/LICENSE)
1+
[![License](https://img.shields.io/github/license/Open-CMSIS-Pack/csolution-examples)](https://github.com/Open-CMSIS-Pack/csolution-examples/blob/main/LICENSE)
22
[![Hello: Test Build and Execution test](https://img.shields.io/github/actions/workflow/status/Open-CMSIS-Pack/csolution-examples/Hello-CI.yml?logo=arm&logoColor=0091bd&label=Hello:%20Test%20Build%20and%20Execution)](/.github/workflows/Hello-CI.yml)
33
[![DualCore: Test Build](https://img.shields.io/github/actions/workflow/status/Open-CMSIS-Pack/csolution-examples/DualCore-CI.yml?logo=arm&logoColor=0091bd&label=DualCore:%20Test%20Build)](/.github/workflows/DualCore-CI.yml)
44
[![CubeMX: Test Build](https://img.shields.io/github/actions/workflow/status/Open-CMSIS-Pack/csolution-examples/CubeMX-CI.yml?logo=arm&logoColor=0091bd&label=CubeMX:%20Test%20and%20Build)](/.github/workflows/CubeMX-CI.yml)
55
[![SimpleTZ: Test Build and Execution](https://img.shields.io/github/actions/workflow/status/Open-CMSIS-Pack/csolution-examples/SimpleTZ-CI.yml?logo=arm&logoColor=0091bd&label=SimpleTZ:%20Test%20Build%20and%20Execution)](/.github/workflows/SimpleTZ-CI.yml)
66

7-
# CMSIS-Toolbox Examples in `csolution` project format
7+
# CMSIS-Toolbox Examples in *csolution project format*
88

9-
This is a collection of [CMSIS-Toolbox](https://github.com/Open-CMSIS-Pack/cmsis-toolbox) project examples using the [`csolution` project format](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-Input-Format.md) utility. The project files are provided for experimentation, exploration and education purposes.
9+
This is a collection of [CMSIS-Toolbox](https://github.com/Open-CMSIS-Pack/cmsis-toolbox) project examples in [*csolution project format*](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-Input-Format.md). The project examples are provided for experimentation, exploration and education purposes.
1010

11-
> **Note:** These examples use **CMSIS-Toolbox 2.6.0** or higher.
12-
>
13-
> Refer to [**Installation of the CMSIS-Toolbox**](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/installation.md) for information how to setup an environment.
11+
## Tool Requirements
12+
13+
The examples use **CMSIS-Toolbox 2.6.0** or higher and require additional tools such as CMake, Ninja, Arm Compiler 6, GCC Compiler, and Arm Fixed Virtual Platforms (AVH-FVP).
14+
15+
Refer to [**Installation of the CMSIS-Toolbox**](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/installation.md) for information on the setup of a development environment with these tools.
16+
17+
When using VS Code with the [Arm Environment Manager](https://marketplace.visualstudio.com/items?itemName=Arm.environment-manager) the required tools are installed based on the settings in the file [`vcpkg-configuration.json`](./vcpkg-configuration.json) using the [Arm Tools Artifactory](https://artifacts.tools.arm.com/).
1418

1519
## Project Examples
1620

1721
Examples in this repository:
1822

19-
Source | Description
23+
*csolution project* | Description
2024
:------------------------------------|:----------------------------------
21-
[Hello](./Hello) | A simple project to get started.
22-
[DualCore](./DualCore) | Application with multiple processors.
23-
[SimpleTrustZone](./SimpleTrustZone) | Simple TrustZone example.
24-
[CubeMX](./CubeMX) | Project that uses [STM32Cube](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/tree/main/docs/CubeMX.md) as generator for device configuration.
25+
[Hello](./Hello) | A simple project to get started. Requires no hardware as it runs on [AVH-FVP](https://github.com/ARM-software/AVH) simulation models.
26+
[DualCore](./DualCore) | Application with multiple processors that runs on the [NXP FRDM-K32L3A6](https://www.keil.arm.com/boards/nxp-frdm-k32l3a6-989d2e5/projects/) board.
27+
[SimpleTrustZone](./SimpleTrustZone) | Simple TrustZone example that shows the concept of secure and non-secure projects. Runs on [AVH-FVP](https://github.com/ARM-software/AVH) simulation models.
28+
[CubeMX](./CubeMX) | Project that uses [STM32Cube](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/tree/main/docs/CubeMX.md) for device configuration and contains a RAM and ROM target.
29+
30+
Each *csolution project* example shows different aspects of the CMSIS-Toolbox. For example, the [CubeMX](./CubeMX) *csolution project* contains two targets that show RAM and ROM execution.
2531

2632
## Build Projects
2733

@@ -37,12 +43,18 @@ The project files contain a list of software packs that are used. When using th
3743
> cbuild Hello.csolution.yml --packs --context-set --toolchain AC6 --rebuild
3844
```
3945

40-
## Examples in other repositories
46+
## Template Projects
47+
48+
The directory [Templates](./Templates) may be used as starting point for different types of embedded applications: simple single core, multi-core, TrustZone, and unit test.
49+
50+
## GitHub Action Workflows
51+
52+
The directory [.ci](./.ci) contains the required setup for the Continuous Integration (CI) test of these examples with [GitHub action](./.github) workflows. The tools are downloaded from the [Arm Tools Artifactory](https://artifacts.tools.arm.com/). The test results are available in the [*Actions*](/../../actions) view.
53+
54+
## Examples in Other Repositories
4155

4256
Source | Description
4357
:-----------------|:----------------------------------
44-
[Hello](./Hello) | A simple project to get started
45-
[AWS_MQTT_MutualAuth_Demo](https://github.com/Open-CMSIS-Pack/AWS_MQTT_MutualAuth_SW_Framework) | MQTT demo that uses layers for re-targeting to different physical boards
46-
[Arm TrustZone Demo](https://github.com/MDK-Packs/TrustZone) | Example that uses TF-M and Bootloader for firmware update. Runs on [STM32U5 board](https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html) or [AVH](https://avh.arm.com/)
47-
48-
>**Note:** The examples may require additional tools. Refer to the instructions for each example to install the required toolchain.
58+
[github.com/Arm-Examples](https://github.com/Arm-Examples) | A collection of several example projects
59+
[AWS_MQTT_MutualAuth_Demo](https://github.com/Open-CMSIS-Pack/AWS_MQTT_MutualAuth_SW_Framework) | MQTT demo that uses layers for re-targeting to different physical boards
60+
[AVH_CI_Template](https://github.com/Arm-Examples/AVH_CI_Template) | CI Template for unit test automation that uses [GitHub Actions](https://github.com/features/actions)

SimpleTrustZone/CM33_s/RTE/_Debug_AVH/RTE_Components.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* CSOLUTION generated file: DO NOT EDIT!
3-
* Generated by: csolution version 2.5.0
3+
* Generated by: csolution version 2.6.0
44
*
55
* Project: 'CM33_s.Debug+AVH'
66
* Target: 'Debug+AVH'
@@ -15,6 +15,9 @@
1515
*/
1616
#define CMSIS_device_header "ARMCM33.h"
1717

18+
/* ARM::CMSIS-View:Event Recorder&[email protected] */
19+
#define RTE_CMSIS_View_EventRecorder
20+
#define RTE_CMSIS_View_EventRecorder_DAP
1821

1922

2023
#endif /* RTE_COMPONENTS_H */

SimpleTrustZone/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ The project is generated using the [CMSIS-Toolbox](https://github.com/Open-CMSIS
4242

4343
## Generate the project binaries
4444

45+
Note that the file [SimpleTZ.cbuild-set.yml](./SimpleTZ.cbuild-set.yml) contains the selected [context set](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/build-overview.md#working-with-context-set) for the application.
46+
4547
```txt
46-
> cbuild SimpleTZ.csolution.yml --packs .Debug+AVH --toolchain AC6
48+
> cbuild SimpleTZ.csolution.yml --packs .Debug+AVH --toolchain AC6 --context-set
4749
```
4850

4951
## Execute the project on ARM Virtual Hardware

SimpleTrustZone/SimpleTZ.csolution.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
solution:
22
created-for: [email protected]
33
cdefault:
4+
select-compiler:
5+
- compiler: AC6
46

57
packs:
68
- pack: ARM::CMSIS

Templates/Multicore/MyName.csolution.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
solution:
2-
# A solution is a collection of related projects that share same base configration
2+
# A solution is a collection of related projects that share same base configuration
33

4-
created-for: CMSIS-Toolbox@2.0.0
4+
created-for: CMSIS-Toolbox@2.6.0
55
cdefault: # use cdefault.yml for default toolchain settings
66
# compiler: AC6 # uncomment to select a different compiler (AC6 or IAR)
77

@@ -20,7 +20,7 @@ solution:
2020
build-types:
2121
- type: Debug
2222
debug: on
23-
optimize: none
23+
optimize: debug
2424

2525
- type: Release
2626
debug: off

0 commit comments

Comments
 (0)