Skip to content

Commit e6f25c0

Browse files
authored
Rework examples to use csolution layers (#95)
1 parent df0cb07 commit e6f25c0

179 files changed

Lines changed: 17292 additions & 27602 deletions

File tree

Some content is hidden

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

ARM.CMSIS-FreeRTOS.pdsc

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,11 +1543,11 @@
15431543
</components>
15441544

15451545
<examples>
1546-
<example name="CMSIS-RTOS2 FreeRTOS Blinky" doc="Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Blinky">
1547-
<description>CMSIS-RTOS2 Blinky example using FreeRTOS</description>
1546+
<example name="Hello World" folder="CMSIS/RTOS2/FreeRTOS/Examples" doc="./App/Hello/README.md">
1547+
<description>Hello World example using FreeRTOS and CMSIS-RTOS2 for Arm Virtual Hardware</description>
15481548
<board name="uVision Simulator" vendor="Keil"/>
15491549
<project>
1550-
<environment name="uv" load="Blinky.uvprojx"/>
1550+
<environment name="csolution" load="Examples.csolution.yml"/>
15511551
</project>
15521552
<attributes>
15531553
<component Cclass="CMSIS" Cgroup="CORE"/>
@@ -1557,39 +1557,11 @@
15571557
</attributes>
15581558
</example>
15591559

1560-
<example name="Native FreeRTOS Blinky" doc="Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Native_Blinky">
1561-
<description>Blinky example using FreeRTOS natively</description>
1560+
<example name="TrustZone for ARMv8-M" folder="CMSIS/RTOS2/FreeRTOS/Examples" doc="./App/TrustZone/README.md">
1561+
<description>CMSIS-RTOS2 example with secure/non-secure thread context management using FreeRTOS for Arm Virtual Hardware</description>
15621562
<board name="uVision Simulator" vendor="Keil"/>
15631563
<project>
1564-
<environment name="uv" load="Blinky.uvprojx"/>
1565-
</project>
1566-
<attributes>
1567-
<component Cclass="CMSIS" Cgroup="CORE"/>
1568-
<component Cclass="CMSIS" Cgroup="RTOS2"/>
1569-
<component Cclass="Device" Cgroup="Startup"/>
1570-
<category>Getting Started</category>
1571-
</attributes>
1572-
</example>
1573-
1574-
<example name="TrustZone for ARMv8-M" doc="NonSecure/Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/TrustZone">
1575-
<description>CMSIS-RTOS2 example with secure/non-secure thread context management using FreeRTOS</description>
1576-
<board name="uVision Simulator" vendor="Keil"/>
1577-
<project>
1578-
<environment name="uv" load="TrustZone.uvmpw"/>
1579-
</project>
1580-
<attributes>
1581-
<component Cclass="CMSIS" Cgroup="CORE"/>
1582-
<component Cclass="CMSIS" Cgroup="RTOS2"/>
1583-
<component Cclass="Device" Cgroup="Startup"/>
1584-
<category>Getting Started</category>
1585-
</attributes>
1586-
</example>
1587-
1588-
<example name="CMSIS-RTOS2 FreeRTOS Blinky" doc="Blinky/Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Blinky_IAR">
1589-
<description>CMSIS-RTOS2 Blinky example using FreeRTOS</description>
1590-
<board name="EWARM Simulator" vendor="IAR"/>
1591-
<project>
1592-
<environment name="iar" load="Blinky/Blinky.ewp"/>
1564+
<environment name="csolution" load="Examples.csolution.yml"/>
15931565
</project>
15941566
<attributes>
15951567
<component Cclass="CMSIS" Cgroup="CORE"/>
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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": "CM0",
9+
"type": "arm-debugger.fvp",
10+
"request": "launch",
11+
"program": "${command:arm-debugger.getApplicationFile}",
12+
"cdbEntry": "Arm FVP::MPS2_Cortex_M0::Bare Metal Debug::Bare Metal Debug::Cortex-M0",
13+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM0/fvp_config.txt",
14+
"debugFrom": "Reset_Handler"
15+
},
16+
{
17+
"name": "CM0plus",
18+
"type": "arm-debugger.fvp",
19+
"request": "launch",
20+
"program": "${command:arm-debugger.getApplicationFile}",
21+
"cdbEntry": "Arm FVP::MPS2_Cortex_M0plus::Bare Metal Debug::Bare Metal Debug::Cortex-M0+",
22+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM0plus/fvp_config.txt",
23+
"debugFrom": "Reset_Handler"
24+
},
25+
{
26+
"name": "CM3",
27+
"type": "arm-debugger.fvp",
28+
"request": "launch",
29+
"program": "${command:arm-debugger.getApplicationFile}",
30+
"cdbEntry": "Arm FVP::MPS2_Cortex_M3::Bare Metal Debug::Bare Metal Debug::Cortex-M3",
31+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM3/fvp_config.txt",
32+
"debugFrom": "Reset_Handler"
33+
},
34+
{
35+
"name": "CM4",
36+
"type": "arm-debugger.fvp",
37+
"request": "launch",
38+
"program": "${command:arm-debugger.getApplicationFile}",
39+
"cdbEntry": "Arm FVP::MPS2_Cortex_M4::Bare Metal Debug::Bare Metal Debug::Cortex-M4",
40+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM4/fvp_config.txt",
41+
"debugFrom": "Reset_Handler"
42+
},
43+
{
44+
"name": "CM7",
45+
"type": "arm-debugger.fvp",
46+
"request": "launch",
47+
"program": "${command:arm-debugger.getApplicationFile}",
48+
"cdbEntry": "Arm FVP::MPS2_Cortex_M7::Bare Metal Debug::Bare Metal Debug::Cortex-M7",
49+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM7/fvp_config.txt",
50+
"debugFrom": "Reset_Handler"
51+
},
52+
{
53+
"name": "CM23",
54+
"type": "arm-debugger.fvp",
55+
"request": "launch",
56+
"program": "${command:arm-debugger.getApplicationFile}",
57+
"cdbEntry": "Arm FVP::MPS2_Cortex_M23::Bare Metal Debug::Bare Metal Debug::Cortex-M23_0",
58+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM23/fvp_config.txt",
59+
"debugFrom": "Reset_Handler"
60+
},
61+
{
62+
"name": "CM23_noTZ",
63+
"type": "arm-debugger.fvp",
64+
"request": "launch",
65+
"program": "${command:arm-debugger.getApplicationFile}",
66+
"cdbEntry": "Arm FVP::MPS2_Cortex_M23::Bare Metal Debug::Bare Metal Debug::Cortex-M23_0",
67+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM23_noTZ/fvp_config.txt",
68+
"debugFrom": "Reset_Handler"
69+
},
70+
{
71+
"name": "CM33",
72+
"type": "arm-debugger.fvp",
73+
"request": "launch",
74+
"program": "${command:arm-debugger.getApplicationFile}",
75+
"cdbEntry": "Arm FVP::MPS2_Cortex_M33::Bare Metal Debug::Bare Metal Debug::Cortex-M33_0",
76+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM33/fvp_config.txt",
77+
"debugFrom": "Reset_Handler"
78+
},
79+
{
80+
"name": "CM33_noTZ",
81+
"type": "arm-debugger.fvp",
82+
"request": "launch",
83+
"program": "${command:arm-debugger.getApplicationFile}",
84+
"cdbEntry": "Arm FVP::MPS2_Cortex_M33::Bare Metal Debug::Bare Metal Debug::Cortex-M33_0",
85+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM33_noTZ/fvp_config.txt",
86+
"debugFrom": "Reset_Handler"
87+
},
88+
{
89+
"name": "CM55",
90+
"type": "arm-debugger.fvp",
91+
"request": "launch",
92+
"program": "${command:arm-debugger.getApplicationFile}",
93+
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-300 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M55",
94+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM55/fvp_config.txt",
95+
"debugFrom": "Reset_Handler"
96+
},
97+
{
98+
"name": "CM55_noTZ",
99+
"type": "arm-debugger.fvp",
100+
"request": "launch",
101+
"program": "${command:arm-debugger.getApplicationFile}",
102+
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-300 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M55",
103+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM55_noTZ/fvp_config.txt",
104+
"debugFrom": "Reset_Handler"
105+
},
106+
{
107+
"name": "CM85",
108+
"type": "arm-debugger.fvp",
109+
"request": "launch",
110+
"program": "${command:arm-debugger.getApplicationFile}",
111+
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-310 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M85",
112+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM85/fvp_config.txt",
113+
"debugFrom": "Reset_Handler"
114+
},
115+
{
116+
"name": "CM85_noTZ",
117+
"type": "arm-debugger.fvp",
118+
"request": "launch",
119+
"program": "${command:arm-debugger.getApplicationFile}",
120+
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-310 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M85",
121+
"fvpParameters": "\"${workspaceFolder}\"/Target/CM85_noTZ/fvp_config.txt",
122+
"debugFrom": "Reset_Handler"
123+
}
124+
]
125+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
project:
2+
description: Hello World example
3+
4+
packs:
5+
- pack: ARM::CMSIS@>=6.0.0
6+
- pack: ARM::Cortex_DFP
7+
- pack: ARM::CMSIS-FreeRTOS
8+
- pack: ARM::CMSIS-View
9+
10+
components:
11+
- component: ARM::CMSIS:CORE
12+
- component: ARM::CMSIS:OS Tick
13+
- component: ARM::CMSIS:RTOS2:FreeRTOS
14+
- component: ARM::CMSIS-View:Event Recorder&Semihosting
15+
16+
- component: ARM::RTOS&FreeRTOS:Core&Cortex-M
17+
- component: ARM::RTOS&FreeRTOS:Config&CMSIS RTOS2
18+
- component: ARM::RTOS&FreeRTOS:Event Groups
19+
- component: ARM::RTOS&FreeRTOS:Heap&Heap_4
20+
- component: ARM::RTOS&FreeRTOS:Timers
21+
22+
groups:
23+
- group: Documentation
24+
files:
25+
- file: README.md
26+
- group: Application
27+
files:
28+
- file: hello.c
29+
- group: Board
30+
files:
31+
- file: main.c
32+
33+
layers:
34+
- layer: $Target-Layer$
35+
type: Target
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Hello World Application
2+
This example prints "Hello World" and a counter value via the standard output. It
3+
can be used as a starting point when developing new applications.
4+
5+
### Functionality
6+
The application initializes CMSIS-RTOS2, creates the main application thread and starts
7+
the RTOS scheduler. The application thread increments a counter and outputs it together
8+
with the counter value.
9+
10+
### Output
11+
The "Hello World" string, along with the counter value, is output via printf and
12+
retargeted to the debug console.

CMSIS/RTOS2/FreeRTOS/Examples/Native_Blinky/RTE/Compiler/EventRecorderConf.h renamed to CMSIS/RTOS2/FreeRTOS/Examples/App/Hello/RTE/CMSIS-View/EventRecorderConf.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
/*------------------------------------------------------------------------------
2-
* MDK - Component ::Event Recorder
3-
* Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved.
4-
*------------------------------------------------------------------------------
1+
/*
2+
* Copyright (c) 2016-2021 Arm Limited. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the License); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
518
* Name: EventRecorderConf.h
6-
* Purpose: Event Recorder Configuration
19+
* Purpose: Event Recorder software component configuration options
720
* Rev.: V1.1.0
8-
*----------------------------------------------------------------------------*/
21+
*/
922

1023
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
1124

@@ -17,7 +30,7 @@
1730
// <65536=>65536
1831
// <i>Configures size of Event Record Buffer (each record is 16 bytes)
1932
// <i>Must be 2^n (min=8, max=65536)
20-
#define EVENT_RECORD_COUNT 64U
33+
#define EVENT_RECORD_COUNT 256U
2134

2235
// <o>Time Stamp Source
2336
// <0=> DWT Cycle Counter <1=> SysTick <2=> CMSIS-RTOS2 System Timer
@@ -26,7 +39,7 @@
2639
#define EVENT_TIMESTAMP_SOURCE 0
2740

2841
// <o>Time Stamp Clock Frequency [Hz] <0-1000000000>
29-
// <i>Defines default time stamp clock frequency (0 when not used)
42+
// <i>Defines initial time stamp clock frequency (0 when not used)
3043
#define EVENT_TIMESTAMP_FREQ 0U
3144

3245
// </h>

CMSIS/RTOS2/FreeRTOS/Examples/Blinky/RTE/Compiler/EventRecorderConf.h renamed to CMSIS/RTOS2/FreeRTOS/Examples/App/Hello/RTE/CMSIS-View/EventRecorderConf.h.base@1.1.0

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
/*------------------------------------------------------------------------------
2-
* MDK - Component ::Event Recorder
3-
* Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved.
4-
*------------------------------------------------------------------------------
1+
/*
2+
* Copyright (c) 2016-2021 Arm Limited. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the License); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
518
* Name: EventRecorderConf.h
6-
* Purpose: Event Recorder Configuration
19+
* Purpose: Event Recorder software component configuration options
720
* Rev.: V1.1.0
8-
*----------------------------------------------------------------------------*/
21+
*/
922

1023
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
1124

@@ -26,7 +39,7 @@
2639
#define EVENT_TIMESTAMP_SOURCE 0
2740

2841
// <o>Time Stamp Clock Frequency [Hz] <0-1000000000>
29-
// <i>Defines default time stamp clock frequency (0 when not used)
42+
// <i>Defines initial time stamp clock frequency (0 when not used)
3043
#define EVENT_TIMESTAMP_FREQ 0U
3144

3245
// </h>

0 commit comments

Comments
 (0)