Skip to content

Commit 78d0c6b

Browse files
authored
Add Cortex-M35P fast-model blinky example (#9)
The blinky example supports two configurations, blinky demo and full demo. The blinky demo prints a message to the console when a receiver task receives an expected message from the sender task. The full demo implements soak testing of FreeRTOS kernel on Cortex-M35P fast-model. Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 96b10f4 commit 78d0c6b

22 files changed

+10056
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2023 Arm Limited and/or its affiliates <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
cmake_minimum_required(VERSION 3.15)
6+
7+
add_library(cmsis_bsp INTERFACE)
8+
9+
target_include_directories(cmsis_bsp
10+
INTERFACE
11+
include
12+
)
13+
14+
target_compile_definitions(cmsis_bsp
15+
INTERFACE
16+
ARMCM35P
17+
)
18+
19+
target_sources(cmsis_bsp
20+
INTERFACE
21+
${CMAKE_CURRENT_SOURCE_DIR}/source/startup_ARMCM35P.c
22+
${CMAKE_CURRENT_SOURCE_DIR}/source/system_ARMCM35P.c
23+
)
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/**************************************************************************//**
2+
* @file ARMCM35P.h
3+
* @brief CMSIS Core Peripheral Access Layer Header File for
4+
* ARMCM35P Device (configured for ARMCM35P without FPU, without DSP extension, without TrustZone)
5+
* @version V1.0.0
6+
* @date 03. September 2018
7+
******************************************************************************/
8+
/*
9+
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
10+
*
11+
* SPDX-License-Identifier: Apache-2.0
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the License); you may
14+
* not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
21+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
*/
25+
26+
#ifndef ARMCM35P_H
27+
#define ARMCM35P_H
28+
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
32+
33+
34+
/* ------------------------- Interrupt Number Definition ------------------------ */
35+
36+
typedef enum IRQn
37+
{
38+
/* ------------------- Processor Exceptions Numbers ----------------------------- */
39+
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
40+
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
41+
MemoryManagement_IRQn = -12, /* 4 Memory Management Interrupt */
42+
BusFault_IRQn = -11, /* 5 Bus Fault Interrupt */
43+
UsageFault_IRQn = -10, /* 6 Usage Fault Interrupt */
44+
SecureFault_IRQn = -9, /* 7 Secure Fault Interrupt */
45+
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
46+
DebugMonitor_IRQn = -4, /* 12 Debug Monitor Interrupt */
47+
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
48+
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
49+
50+
/* ------------------- Processor Interrupt Numbers ------------------------------ */
51+
Interrupt0_IRQn = 0,
52+
Interrupt1_IRQn = 1,
53+
Interrupt2_IRQn = 2,
54+
Interrupt3_IRQn = 3,
55+
Interrupt4_IRQn = 4,
56+
Interrupt5_IRQn = 5,
57+
Interrupt6_IRQn = 6,
58+
Interrupt7_IRQn = 7,
59+
Interrupt8_IRQn = 8,
60+
Interrupt9_IRQn = 9
61+
/* Interrupts 10 .. 480 are left out */
62+
} IRQn_Type;
63+
64+
65+
/* ================================================================================ */
66+
/* ================ Processor and Core Peripheral Section ================ */
67+
/* ================================================================================ */
68+
69+
/* ------- Start of section using anonymous unions and disabling warnings ------- */
70+
#if defined (__CC_ARM)
71+
#pragma push
72+
#pragma anon_unions
73+
#elif defined (__ICCARM__)
74+
#pragma language=extended
75+
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
76+
#pragma clang diagnostic push
77+
#pragma clang diagnostic ignored "-Wc11-extensions"
78+
#pragma clang diagnostic ignored "-Wreserved-id-macro"
79+
#elif defined (__GNUC__)
80+
/* anonymous unions are enabled by default */
81+
#elif defined (__TMS470__)
82+
/* anonymous unions are enabled by default */
83+
#elif defined (__TASKING__)
84+
#pragma warning 586
85+
#elif defined (__CSMC__)
86+
/* anonymous unions are enabled by default */
87+
#else
88+
#warning Not supported compiler type
89+
#endif
90+
91+
92+
/* -------- Configuration of Core Peripherals ----------------------------------- */
93+
#define __CM35P_REV 0x0000U /* Core revision r0p0 */
94+
#define __SAUREGION_PRESENT 0U /* SAU regions present */
95+
#define __MPU_PRESENT 1U /* MPU present */
96+
#define __VTOR_PRESENT 1U /* VTOR present */
97+
#define __NVIC_PRIO_BITS 3U /* Number of Bits used for Priority Levels */
98+
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
99+
#define __FPU_PRESENT 0U /* no FPU present */
100+
#define __DSP_PRESENT 0U /* no DSP extension present */
101+
102+
#include "core_cm35p.h" /* Processor and core peripherals */
103+
#include "system_ARMCM35P.h" /* System Header */
104+
105+
106+
/* -------- End of section using anonymous unions and disabling warnings -------- */
107+
#if defined (__CC_ARM)
108+
#pragma pop
109+
#elif defined (__ICCARM__)
110+
/* leave anonymous unions enabled */
111+
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
112+
#pragma clang diagnostic pop
113+
#elif defined (__GNUC__)
114+
/* anonymous unions are enabled by default */
115+
#elif defined (__TMS470__)
116+
/* anonymous unions are enabled by default */
117+
#elif defined (__TASKING__)
118+
#pragma warning restore
119+
#elif defined (__CSMC__)
120+
/* anonymous unions are enabled by default */
121+
#else
122+
#warning Not supported compiler type
123+
#endif
124+
125+
126+
#ifdef __cplusplus
127+
}
128+
#endif
129+
130+
#endif /* ARMCM35P_H */
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/**************************************************************************//**
2+
* @file ARMCM35P_DSP_FP.h
3+
* @brief CMSIS Core Peripheral Access Layer Header File for
4+
* ARMCM35P Device (configured for ARMCM35P with FPU, with DSP extension)
5+
* @version V1.0.0
6+
* @date 03. September 2018
7+
******************************************************************************/
8+
/*
9+
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
10+
*
11+
* SPDX-License-Identifier: Apache-2.0
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the License); you may
14+
* not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
21+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
*/
25+
26+
#ifndef ARMCM35P_DSP_FP_H
27+
#define ARMCM35P_DSP_FP_H
28+
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
32+
33+
34+
/* ------------------------- Interrupt Number Definition ------------------------ */
35+
36+
typedef enum IRQn
37+
{
38+
/* ------------------- Processor Exceptions Numbers ----------------------------- */
39+
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
40+
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
41+
MemoryManagement_IRQn = -12, /* 4 Memory Management Interrupt */
42+
BusFault_IRQn = -11, /* 5 Bus Fault Interrupt */
43+
UsageFault_IRQn = -10, /* 6 Usage Fault Interrupt */
44+
SecureFault_IRQn = -9, /* 7 Secure Fault Interrupt */
45+
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
46+
DebugMonitor_IRQn = -4, /* 12 Debug Monitor Interrupt */
47+
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
48+
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
49+
50+
/* ------------------- Processor Interrupt Numbers ------------------------------ */
51+
Interrupt0_IRQn = 0,
52+
Interrupt1_IRQn = 1,
53+
Interrupt2_IRQn = 2,
54+
Interrupt3_IRQn = 3,
55+
Interrupt4_IRQn = 4,
56+
Interrupt5_IRQn = 5,
57+
Interrupt6_IRQn = 6,
58+
Interrupt7_IRQn = 7,
59+
Interrupt8_IRQn = 8,
60+
Interrupt9_IRQn = 9
61+
/* Interrupts 10 .. 480 are left out */
62+
} IRQn_Type;
63+
64+
65+
/* ================================================================================ */
66+
/* ================ Processor and Core Peripheral Section ================ */
67+
/* ================================================================================ */
68+
69+
/* ------- Start of section using anonymous unions and disabling warnings ------- */
70+
#if defined (__CC_ARM)
71+
#pragma push
72+
#pragma anon_unions
73+
#elif defined (__ICCARM__)
74+
#pragma language=extended
75+
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
76+
#pragma clang diagnostic push
77+
#pragma clang diagnostic ignored "-Wc11-extensions"
78+
#pragma clang diagnostic ignored "-Wreserved-id-macro"
79+
#elif defined (__GNUC__)
80+
/* anonymous unions are enabled by default */
81+
#elif defined (__TMS470__)
82+
/* anonymous unions are enabled by default */
83+
#elif defined (__TASKING__)
84+
#pragma warning 586
85+
#elif defined (__CSMC__)
86+
/* anonymous unions are enabled by default */
87+
#else
88+
#warning Not supported compiler type
89+
#endif
90+
91+
92+
/* -------- Configuration of Core Peripherals ----------------------------------- */
93+
#define __CM35P_REV 0x0000U /* Core revision r0p0 */
94+
#define __SAUREGION_PRESENT 0U /* SAU regions present */
95+
#define __MPU_PRESENT 1U /* MPU present */
96+
#define __VTOR_PRESENT 1U /* VTOR present */
97+
#define __NVIC_PRIO_BITS 3U /* Number of Bits used for Priority Levels */
98+
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
99+
#define __FPU_PRESENT 1U /* FPU present */
100+
#define __DSP_PRESENT 1U /* DSP extension present */
101+
102+
#include "core_cm35p.h" /* Processor and core peripherals */
103+
#include "system_ARMCM35P.h" /* System Header */
104+
105+
106+
/* -------- End of section using anonymous unions and disabling warnings -------- */
107+
#if defined (__CC_ARM)
108+
#pragma pop
109+
#elif defined (__ICCARM__)
110+
/* leave anonymous unions enabled */
111+
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
112+
#pragma clang diagnostic pop
113+
#elif defined (__GNUC__)
114+
/* anonymous unions are enabled by default */
115+
#elif defined (__TMS470__)
116+
/* anonymous unions are enabled by default */
117+
#elif defined (__TASKING__)
118+
#pragma warning restore
119+
#elif defined (__CSMC__)
120+
/* anonymous unions are enabled by default */
121+
#else
122+
#warning Not supported compiler type
123+
#endif
124+
125+
126+
#ifdef __cplusplus
127+
}
128+
#endif
129+
130+
#endif /* ARMCM35P_DSP_FP_H */

0 commit comments

Comments
 (0)