Skip to content

Commit ee896b4

Browse files
authored
Update example (#5)
- Move RTOS init/start to app_main - Update csolution.yml and cproject.yml files - Update RTE_Components.h - Improve formatting
1 parent 31954af commit ee896b4

File tree

34 files changed

+307
-315
lines changed

34 files changed

+307
-315
lines changed

Hello.cproject.yml

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,66 @@
1+
# A project translates into one executable or library.
12
project:
23

3-
# it is recommended to list the packs that contain the components in the cproject.yml file.
4-
groups:
5-
- group: Documentation
6-
files:
7-
- file: ./README.md
8-
- group: Main
9-
files:
10-
- file: ./main.c
11-
- group: App
12-
files:
13-
- file: ./hello.c
14-
- group: Board IO
15-
files:
16-
- file: ./Board_IO/retarget_stdio.c
17-
4+
# List components to use for your application.
5+
# A software component is a re-usable unit that may be configurable.
186
components:
19-
- component: CMSIS:CORE # short form, vendor selected from available packs
20-
- component: ARM::CMSIS:RTOS2:Keil RTX5&Source # long form, vendor explicitly stated
21-
- component: ARM::CMSIS:OS Tick:SysTick
7+
- component: CMSIS:CORE
8+
- component: CMSIS:RTOS2:Keil RTX5&Source
9+
- component: CMSIS:OS Tick:SysTick
2210
- component: CMSIS Driver:USART
2311
- component: Device:Startup&C Startup
24-
- component: ARM::CMSIS-Compiler:CORE
25-
- component: ARM::CMSIS-Compiler:STDERR:Custom
26-
- component: ARM::CMSIS-Compiler:STDOUT:Custom
27-
- component: ARM::CMSIS-Compiler:STDIN:Custom
28-
12+
- component: CMSIS-Compiler:CORE
13+
- component: CMSIS-Compiler:STDERR:Custom
14+
- component: CMSIS-Compiler:STDOUT:Custom
15+
- component: CMSIS-Compiler:STDIN:Custom
2916

30-
- component: ARM::Device:Native Driver:IO
17+
- component: Device:Native Driver:IO
3118
for-context:
3219
- +CS300
3320
- +CS310
3421
- +CS315
3522

36-
- component: ARM::Device:Native Driver:UART
23+
- component: Device:Native Driver:UART
3724
for-context:
3825
- +CS300
3926
- +CS310
4027
- +CS315
4128

42-
- component: ARM::Device:Native Driver:SysCounter
29+
- component: Device:Native Driver:SysCounter
4330
for-context:
4431
- +CS300
4532
- +CS310
4633
- +CS315
4734

48-
- component: ARM::Device:Native Driver:SysTimer
35+
- component: Device:Native Driver:SysTimer
4936
for-context:
5037
- +CS300
5138
- +CS310
5239
- +CS315
5340

54-
- component: ARM::Device:Native Driver:Timeout
41+
- component: Device:Native Driver:Timeout
5542
for-context:
5643
- +CS300
5744
- +CS310
5845
- +CS315
5946

60-
- component: ARM::Device:Definition
47+
- component: Device:Definition
6148
for-context:
6249
- +CS300
6350
- +CS310
6451
- +CS315
6552

53+
# List of source groups and files added to a project or a layer.
54+
groups:
55+
- group: Documentation
56+
files:
57+
- file: ./README.md
58+
- group: Main
59+
files:
60+
- file: ./main.c
61+
- group: App
62+
files:
63+
- file: ./hello.c
64+
- group: Board IO
65+
files:
66+
- file: ./Board_IO/retarget_stdio.c

Hello.csolution.yml

Lines changed: 78 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,85 @@
1-
solution:
2-
3-
created-for: [email protected]
4-
description: Print Hello World and a counter value via UART
5-
select-compiler:
6-
- compiler: AC6
7-
- compiler: GCC
8-
cdefault:
9-
10-
11-
# It is recommended to list the pack or packs that define the device or board used in the csolution.yml file
12-
packs:
13-
- pack: ARM::CMSIS
14-
- pack: ARM::CMSIS-RTX
1+
# A solution is a collection of related projects that share same base configuration.
2+
solution:
3+
4+
created-for: [email protected]
5+
description: Print Hello World and a counter value via UART
6+
cdefault:
7+
8+
# List of tested compilers that can be selected.
9+
select-compiler:
10+
- compiler: AC6
11+
- compiler: GCC
12+
13+
# List the packs that define the device and/or board.
14+
packs:
15+
- pack: ARM::CMSIS
16+
- pack: ARM::CMSIS-RTX
1517
- pack: ARM::V2M_MPS3_SSE_300_BSP # Corstone-300 (Cortex-M55)
1618
- pack: ARM::V2M_MPS3_SSE_310_BSP # SSE-310-MPS3_FVP
1719
- pack: ARM::SSE_315_BSP # SSE-315-FVP
1820
- pack: Keil::V2M-MPS2_CMx_BSP # For Cortex-M0 .. M33 ; AVH-CM* devices.
1921
- pack: Keil::V2M-MPS2_IOTKit_BSP # For the IOTKit_CM23_VHT, IOTKit_CM33_VHT, and IOTKit_CM33_FP_VHT devices
2022
- pack: Keil::V2M-MPS3_IOTKit_BSP # For the IOTKit_CM33_MPS3 and the IOTKit_CM33_FP_MPS3 devices
2123
- pack: ARM::CMSIS-Compiler # For retargeting stdout to UART
22-
23-
24-
target-types:
25-
- type: CS300 # Runs on Arm Virtual Hardware
26-
device: ARM::SSE-300-MPS3
27-
28-
- type: CS310
29-
device: ARM::SSE-310-MPS3_FVP
30-
31-
- type: CS315
32-
device: ARM::SSE-315-FVP
33-
34-
- type: CM0plus
35-
device: ARM::CMSDK_CM0plus_VHT
36-
37-
- type: CM0
38-
device: ARM::CMSDK_CM0_VHT
39-
40-
- type: CM3
41-
device: ARM::CMSDK_CM3_VHT
42-
43-
- type: CM4
44-
device: ARM::CMSDK_CM4_VHT
45-
46-
- type: CM4_FP
47-
device: ARM::CMSDK_CM4_FP_VHT
48-
49-
- type: CM7
50-
device: ARM::CMSDK_CM7_VHT
51-
52-
- type: CM7_SP
53-
device: ARM::CMSDK_CM7_SP_VHT
54-
55-
- type: CM7_DP
56-
device: ARM::CMSDK_CM7_DP_VHT
57-
58-
- type: CM23
59-
device: ARM::IOTKit_CM23_VHT
60-
61-
- type: CM33
62-
device: ARM::IOTKit_CM33_VHT
63-
64-
- type: CM33_FP
65-
device: ARM::IOTKit_CM33_FP_VHT
66-
67-
# add more hardware targets (don't forget to add the required packs)
68-
build-types: # defines toolchain options for 'debug' and 'release'
69-
- type: Debug
70-
debug: on
71-
optimize: none
72-
73-
- type: Release
74-
debug: off
75-
optimize: balanced
76-
77-
output-dirs:
78-
outdir: $SolutionDir()$/out/$Project$/$TargetType$/$BuildType$/$Compiler$
79-
80-
projects: # list related projects
81-
- project: ./Hello.cproject.yml
24+
25+
# List different targets that are used to deploy the solution.
26+
target-types:
27+
- type: CS300
28+
device: ARM::SSE-300-MPS3
29+
30+
- type: CS310
31+
device: ARM::SSE-310-MPS3_FVP
32+
33+
- type: CS315
34+
device: ARM::SSE-315-FVP
35+
36+
- type: CM0plus
37+
device: ARM::CMSDK_CM0plus_VHT
38+
39+
- type: CM0
40+
device: ARM::CMSDK_CM0_VHT
41+
42+
- type: CM3
43+
device: ARM::CMSDK_CM3_VHT
44+
45+
- type: CM4
46+
device: ARM::CMSDK_CM4_VHT
47+
48+
- type: CM4_FP
49+
device: ARM::CMSDK_CM4_FP_VHT
50+
51+
- type: CM7
52+
device: ARM::CMSDK_CM7_VHT
53+
54+
- type: CM7_SP
55+
device: ARM::CMSDK_CM7_SP_VHT
56+
57+
- type: CM7_DP
58+
device: ARM::CMSDK_CM7_DP_VHT
59+
60+
- type: CM23
61+
device: ARM::IOTKit_CM23_VHT
62+
63+
- type: CM33
64+
device: ARM::IOTKit_CM33_VHT
65+
66+
- type: CM33_FP
67+
device: ARM::IOTKit_CM33_FP_VHT
68+
69+
# List of different build configurations.
70+
build-types:
71+
- type: Debug
72+
debug: on
73+
optimize: none
74+
75+
- type: Release
76+
debug: off
77+
optimize: balanced
78+
79+
# Set output directory.
80+
output-dirs:
81+
outdir: $SolutionDir()$/out/$Project$/$TargetType$/$BuildType$/$Compiler$
82+
83+
# List related projects.
84+
projects:
85+
- project: ./Hello.cproject.yml

RTE/_Debug_CM0/RTE_Components.h

Lines changed: 6 additions & 6 deletions
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: 'Hello.Debug+CM0'
66
* Target: 'Debug+CM0'
@@ -17,17 +17,17 @@
1717

1818
/* ARM::CMSIS-Compiler:STDERR:[email protected] */
1919
#define RTE_CMSIS_Compiler_STDERR /* CMSIS-Compiler STDERR */
20-
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
20+
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
2121
/* ARM::CMSIS-Compiler:STDIN:[email protected] */
2222
#define RTE_CMSIS_Compiler_STDIN /* CMSIS-Compiler STDIN */
23-
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
23+
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
2424
/* ARM::CMSIS-Compiler:STDOUT:[email protected] */
2525
#define RTE_CMSIS_Compiler_STDOUT /* CMSIS-Compiler STDOUT */
26-
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
26+
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
2727
/* ARM::CMSIS:RTOS2:Keil RTX5&[email protected] */
2828
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
29-
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30-
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
29+
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30+
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
3131
/* Keil::CMSIS Driver:[email protected] */
3232
#define RTE_Drivers_USART
3333

RTE/_Debug_CM0plus/RTE_Components.h

Lines changed: 6 additions & 6 deletions
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: 'Hello.Debug+CM0plus'
66
* Target: 'Debug+CM0plus'
@@ -17,17 +17,17 @@
1717

1818
/* ARM::CMSIS-Compiler:STDERR:[email protected] */
1919
#define RTE_CMSIS_Compiler_STDERR /* CMSIS-Compiler STDERR */
20-
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
20+
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
2121
/* ARM::CMSIS-Compiler:STDIN:[email protected] */
2222
#define RTE_CMSIS_Compiler_STDIN /* CMSIS-Compiler STDIN */
23-
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
23+
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
2424
/* ARM::CMSIS-Compiler:STDOUT:[email protected] */
2525
#define RTE_CMSIS_Compiler_STDOUT /* CMSIS-Compiler STDOUT */
26-
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
26+
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
2727
/* ARM::CMSIS:RTOS2:Keil RTX5&[email protected] */
2828
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
29-
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30-
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
29+
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30+
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
3131
/* Keil::CMSIS Driver:[email protected] */
3232
#define RTE_Drivers_USART
3333

RTE/_Debug_CM23/RTE_Components.h

Lines changed: 6 additions & 6 deletions
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: 'Hello.Debug+CM23'
66
* Target: 'Debug+CM23'
@@ -17,17 +17,17 @@
1717

1818
/* ARM::CMSIS-Compiler:STDERR:[email protected] */
1919
#define RTE_CMSIS_Compiler_STDERR /* CMSIS-Compiler STDERR */
20-
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
20+
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
2121
/* ARM::CMSIS-Compiler:STDIN:[email protected] */
2222
#define RTE_CMSIS_Compiler_STDIN /* CMSIS-Compiler STDIN */
23-
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
23+
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
2424
/* ARM::CMSIS-Compiler:STDOUT:[email protected] */
2525
#define RTE_CMSIS_Compiler_STDOUT /* CMSIS-Compiler STDOUT */
26-
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
26+
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
2727
/* ARM::CMSIS:RTOS2:Keil RTX5&[email protected] */
2828
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
29-
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30-
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
29+
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30+
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
3131
/* Keil::CMSIS Driver:[email protected] */
3232
#define RTE_Drivers_USART
3333

RTE/_Debug_CM3/RTE_Components.h

Lines changed: 6 additions & 6 deletions
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: 'Hello.Debug+CM3'
66
* Target: 'Debug+CM3'
@@ -17,17 +17,17 @@
1717

1818
/* ARM::CMSIS-Compiler:STDERR:[email protected] */
1919
#define RTE_CMSIS_Compiler_STDERR /* CMSIS-Compiler STDERR */
20-
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
20+
#define RTE_CMSIS_Compiler_STDERR_Custom /* CMSIS-Compiler STDERR: Custom */
2121
/* ARM::CMSIS-Compiler:STDIN:[email protected] */
2222
#define RTE_CMSIS_Compiler_STDIN /* CMSIS-Compiler STDIN */
23-
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
23+
#define RTE_CMSIS_Compiler_STDIN_Custom /* CMSIS-Compiler STDIN: Custom */
2424
/* ARM::CMSIS-Compiler:STDOUT:[email protected] */
2525
#define RTE_CMSIS_Compiler_STDOUT /* CMSIS-Compiler STDOUT */
26-
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
26+
#define RTE_CMSIS_Compiler_STDOUT_Custom /* CMSIS-Compiler STDOUT: Custom */
2727
/* ARM::CMSIS:RTOS2:Keil RTX5&[email protected] */
2828
#define RTE_CMSIS_RTOS2 /* CMSIS-RTOS2 */
29-
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30-
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
29+
#define RTE_CMSIS_RTOS2_RTX5 /* CMSIS-RTOS2 Keil RTX5 */
30+
#define RTE_CMSIS_RTOS2_RTX5_SOURCE /* CMSIS-RTOS2 Keil RTX5 Source */
3131
/* Keil::CMSIS Driver:[email protected] */
3232
#define RTE_Drivers_USART
3333

0 commit comments

Comments
 (0)