VSF Documented
cortex_a_generic.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __CORTEX_A_GENERIC_H__
19#define __CORTEX_A_GENERIC_H__
20
21/*============================ INCLUDES ======================================*/
22#include "hal/vsf_hal_cfg.h"
23
24#define __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
25#include "hal/driver/driver.h"
26#undef __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31/*============================ MACROS ========================================*/
32
33#ifndef __BYTE_ORDER
34# define __BYTE_ORDER __LITTLE_ENDIAN
35#endif
36
37// TODO:
38#if __ARM_ARCH == 6 || __TARGET_ARCH_6_M == 1 || __TARGET_ARCH_6S_M == 1
39# ifndef VSF_ARCH_PRI_NUM
40# define VSF_ARCH_PRI_NUM 4
41# undef VSF_ARCH_PRI_BIT
42# define VSF_ARCH_PRI_BIT 2
43# endif
44
45# ifndef VSF_ARCH_PRI_BIT
46# define VSF_ARCH_PRI_BIT 2
47# endif
48#elif __ARM_ARCH >= 7 || __TARGET_ARCH_7_M == 1 || __TARGET_ARCH_7E_M == 1
49# ifndef VSF_ARCH_PRI_NUM
50# define VSF_ARCH_PRI_NUM 128
51# undef VSF_ARCH_PRI_BIT
52# define VSF_ARCH_PRI_BIT 7
53# endif
54
55# ifndef VSF_ARCH_PRI_BIT
56# define VSF_ARCH_PRI_BIT 7
57# endif
58#endif
59
60// software interrupt provided by arch
61#define VSF_ARCH_SWI_NUM 1
62#define __VSF_ARCH_SYSTIMER_BITS 24
63
64/*============================ MACROFIED FUNCTIONS ===========================*/
65
66#define vsf_arch_wakeup()
67
68/*============================ TYPES =========================================*/
69
71
72#define __VSF_ARCH_PRI_INDEX(__N, __UNUSED) \
73 __vsf_arch_prio_index_##__N = (__N),
74
75enum {
77};
78
79#define __VSF_ARCH_PRI(__N, __BIT) \
80 VSF_ARCH_PRIO_##__N = \
81 ((VSF_ARCH_PRI_NUM - 1 - __vsf_arch_prio_index_##__N)) & 0xFF, \
82 vsf_arch_prio_##__N = \
83 ((VSF_ARCH_PRI_NUM - 1 - __vsf_arch_prio_index_##__N)) & 0xFF,
84
85typedef enum vsf_arch_prio_t {
86 // avoid vsf_arch_prio_t to be optimized to 8bit
91
94
95/*============================ GLOBAL VARIABLES ==============================*/
96/*============================ LOCAL VARIABLES ===============================*/
97/*============================ PROTOTYPES ====================================*/
98
99static VSF_CAL_ALWAYS_INLINE void vsf_arch_set_stack(uint32_t stack, uint32_t stack_size)
100{
101 VSF_HAL_ASSERT(false);
102}
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif
109/* EOF */
110
#define VSF_ARCH_PRI_NUM
Definition arm9_generic.h:43
vsf_arch_prio_t
Definition cortex_a_generic.h:85
@ __VSF_ARCH_PRIO_LEAST_MAX
Definition cortex_a_generic.h:87
@ __VSF_ARCH_PRIO_LEAST_MIN
Definition cortex_a_generic.h:88
@ VSF_ARCH_PRIO_INVALID
Definition cortex_a_generic.h:89
@ vsf_arch_prio_invalid
Definition cortex_a_generic.h:90
#define __VSF_ARCH_PRI(__N, __BIT)
Definition cortex_a_generic.h:79
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:70
#define __VSF_ARCH_PRI_INDEX(__N, __UNUSED)
Definition cortex_a_generic.h:72
#define VSF_ARCH_PRI_BIT
Definition mcs51_generic.h:39
unsigned uint32_t
Definition stdint.h:9
unsigned long long uint64_t
Definition stdint.h:11
#define INT16_MAX
Definition stdint.h:50
#define INT16_MIN
Definition stdint.h:45
#define VSF_HAL_ASSERT(__CON)
all hal modules use this configuration file
Definition vsf_hal_cfg.h:36
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51
Generated from commit: vsfteam/vsf@85be636