Skip to content

Commit

Permalink
Rework examples to use csolution layers (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirUmek authored Apr 5, 2024
1 parent df0cb07 commit e6f25c0
Show file tree
Hide file tree
Showing 179 changed files with 17,292 additions and 27,602 deletions.
40 changes: 6 additions & 34 deletions ARM.CMSIS-FreeRTOS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -1543,11 +1543,11 @@
</components>

<examples>
<example name="CMSIS-RTOS2 FreeRTOS Blinky" doc="Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Blinky">
<description>CMSIS-RTOS2 Blinky example using FreeRTOS</description>
<example name="Hello World" folder="CMSIS/RTOS2/FreeRTOS/Examples" doc="./App/Hello/README.md">
<description>Hello World example using FreeRTOS and CMSIS-RTOS2 for Arm Virtual Hardware</description>
<board name="uVision Simulator" vendor="Keil"/>
<project>
<environment name="uv" load="Blinky.uvprojx"/>
<environment name="csolution" load="Examples.csolution.yml"/>
</project>
<attributes>
<component Cclass="CMSIS" Cgroup="CORE"/>
Expand All @@ -1557,39 +1557,11 @@
</attributes>
</example>

<example name="Native FreeRTOS Blinky" doc="Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Native_Blinky">
<description>Blinky example using FreeRTOS natively</description>
<example name="TrustZone for ARMv8-M" folder="CMSIS/RTOS2/FreeRTOS/Examples" doc="./App/TrustZone/README.md">
<description>CMSIS-RTOS2 example with secure/non-secure thread context management using FreeRTOS for Arm Virtual Hardware</description>
<board name="uVision Simulator" vendor="Keil"/>
<project>
<environment name="uv" load="Blinky.uvprojx"/>
</project>
<attributes>
<component Cclass="CMSIS" Cgroup="CORE"/>
<component Cclass="CMSIS" Cgroup="RTOS2"/>
<component Cclass="Device" Cgroup="Startup"/>
<category>Getting Started</category>
</attributes>
</example>

<example name="TrustZone for ARMv8-M" doc="NonSecure/Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/TrustZone">
<description>CMSIS-RTOS2 example with secure/non-secure thread context management using FreeRTOS</description>
<board name="uVision Simulator" vendor="Keil"/>
<project>
<environment name="uv" load="TrustZone.uvmpw"/>
</project>
<attributes>
<component Cclass="CMSIS" Cgroup="CORE"/>
<component Cclass="CMSIS" Cgroup="RTOS2"/>
<component Cclass="Device" Cgroup="Startup"/>
<category>Getting Started</category>
</attributes>
</example>

<example name="CMSIS-RTOS2 FreeRTOS Blinky" doc="Blinky/Abstract.txt" folder="CMSIS/RTOS2/FreeRTOS/Examples/Blinky_IAR">
<description>CMSIS-RTOS2 Blinky example using FreeRTOS</description>
<board name="EWARM Simulator" vendor="IAR"/>
<project>
<environment name="iar" load="Blinky/Blinky.ewp"/>
<environment name="csolution" load="Examples.csolution.yml"/>
</project>
<attributes>
<component Cclass="CMSIS" Cgroup="CORE"/>
Expand Down
125 changes: 125 additions & 0 deletions CMSIS/RTOS2/FreeRTOS/Examples/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "CM0",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M0::Bare Metal Debug::Bare Metal Debug::Cortex-M0",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM0/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM0plus",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M0plus::Bare Metal Debug::Bare Metal Debug::Cortex-M0+",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM0plus/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM3",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M3::Bare Metal Debug::Bare Metal Debug::Cortex-M3",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM3/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM4",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M4::Bare Metal Debug::Bare Metal Debug::Cortex-M4",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM4/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM7",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M7::Bare Metal Debug::Bare Metal Debug::Cortex-M7",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM7/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM23",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M23::Bare Metal Debug::Bare Metal Debug::Cortex-M23_0",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM23/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM23_noTZ",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M23::Bare Metal Debug::Bare Metal Debug::Cortex-M23_0",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM23_noTZ/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM33",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M33::Bare Metal Debug::Bare Metal Debug::Cortex-M33_0",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM33/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM33_noTZ",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm FVP::MPS2_Cortex_M33::Bare Metal Debug::Bare Metal Debug::Cortex-M33_0",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM33_noTZ/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM55",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-300 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M55",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM55/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM55_noTZ",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-300 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M55",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM55_noTZ/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM85",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-310 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M85",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM85/fvp_config.txt",
"debugFrom": "Reset_Handler"
},
{
"name": "CM85_noTZ",
"type": "arm-debugger.fvp",
"request": "launch",
"program": "${command:arm-debugger.getApplicationFile}",
"cdbEntry": "Arm SubSystem FVP::Corstone SSE-310 Ethos-U55 (MPS3)::Bare Metal Debug::Bare Metal Debug::Cortex-M85",
"fvpParameters": "\"${workspaceFolder}\"/Target/CM85_noTZ/fvp_config.txt",
"debugFrom": "Reset_Handler"
}
]
}
35 changes: 35 additions & 0 deletions CMSIS/RTOS2/FreeRTOS/Examples/App/Hello/Hello.cproject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
project:
description: Hello World example

packs:
- pack: ARM::CMSIS@>=6.0.0
- pack: ARM::Cortex_DFP
- pack: ARM::CMSIS-FreeRTOS
- pack: ARM::CMSIS-View

components:
- component: ARM::CMSIS:CORE
- component: ARM::CMSIS:OS Tick
- component: ARM::CMSIS:RTOS2:FreeRTOS
- component: ARM::CMSIS-View:Event Recorder&Semihosting

- component: ARM::RTOS&FreeRTOS:Core&Cortex-M
- component: ARM::RTOS&FreeRTOS:Config&CMSIS RTOS2
- component: ARM::RTOS&FreeRTOS:Event Groups
- component: ARM::RTOS&FreeRTOS:Heap&Heap_4
- component: ARM::RTOS&FreeRTOS:Timers

groups:
- group: Documentation
files:
- file: README.md
- group: Application
files:
- file: hello.c
- group: Board
files:
- file: main.c

layers:
- layer: $Target-Layer$
type: Target
12 changes: 12 additions & 0 deletions CMSIS/RTOS2/FreeRTOS/Examples/App/Hello/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Hello World Application
This example prints "Hello World" and a counter value via the standard output. It
can be used as a starting point when developing new applications.

### Functionality
The application initializes CMSIS-RTOS2, creates the main application thread and starts
the RTOS scheduler. The application thread increments a counter and outputs it together
with the counter value.

### Output
The "Hello World" string, along with the counter value, is output via printf and
retargeted to the debug console.
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
/*------------------------------------------------------------------------------
* MDK - Component ::Event Recorder
* Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved.
*------------------------------------------------------------------------------
/*
* Copyright (c) 2016-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Name: EventRecorderConf.h
* Purpose: Event Recorder Configuration
* Purpose: Event Recorder software component configuration options
* Rev.: V1.1.0
*----------------------------------------------------------------------------*/
*/

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

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

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

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

// </h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
/*------------------------------------------------------------------------------
* MDK - Component ::Event Recorder
* Copyright (c) 2016-2018 ARM Germany GmbH. All rights reserved.
*------------------------------------------------------------------------------
/*
* Copyright (c) 2016-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Name: EventRecorderConf.h
* Purpose: Event Recorder Configuration
* Purpose: Event Recorder software component configuration options
* Rev.: V1.1.0
*----------------------------------------------------------------------------*/
*/

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

Expand All @@ -26,7 +39,7 @@
#define EVENT_TIMESTAMP_SOURCE 0

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

// </h>
Expand Down
Loading

0 comments on commit e6f25c0

Please sign in to comment.