eLooM for STM32 application  v3.3.0
Loading...
Searching...
No Matches
systp.h
Go to the documentation of this file.
1
23#ifndef SYSTARGETPLATFORM_H_
24#define SYSTARGETPLATFORM_H_
25
26/* MCU specific include */
27/************************/
28/* MISRA messages linked to HAL include are ignored */
29/*cstat -MISRAC2012-* */
30#ifdef SYS_TP_MCU_STM32L4
31#include "stm32l4xx.h"
32#elif defined (SYS_TP_MCU_STM32L0)
33#include "stm32l0xx.h"
34#elif defined(SYS_TP_MCU_STM32U5)
35#include "stm32u5xx.h"
36#elif defined(SYS_TP_MCU_STM32WB)
37#include "stm32wbxx.h"
38#elif defined(SYS_TP_MCU_STM32L5)
39#include "stm32l5xx.h"
40#elif defined(SYS_TP_MCU_STM32G4)
41#include "stm32g4xx.h"
42#elif defined(SYS_TP_MCU_STM32H7)
43#include "stm32h7xx.h"
44#else
45#error "no target platform defined in the project options."
46#endif
47/*cstat +MISRAC2012-* */
48
49#if (SYS_TS_CFG_ENABLE_SERVICE == 1)
50/* include the stm32__xx_ll_tim.h for the timestamp service*/
51/* MISRA messages linked to HAL include are ignored */
52/*cstat -MISRAC2012-* */
53#ifdef SYS_TP_MCU_STM32L4
54#include "stm32l4xx_ll_tim.h"
55#elif defined (SYS_TP_MCU_STM32L0)
56#include "stm32l0xx_ll_tim.h"
57#elif defined(SYS_TP_MCU_STM32U5)
58#include "stm32u5xx_ll_tim.h"
59#elif defined(SYS_TP_MCU_STM32WB)
60#include "stm32wbxx_ll_tim.h"
61#elif defined(SYS_TP_MCU_STM32L5)
62#include "stm32l5xx_ll_tim.h"
63#elif defined(SYS_TP_MCU_STM32G4)
64#include "stm32g4xx_ll_tim.h"
65#elif defined(SYS_TP_MCU_STM32H7)
66#include "stm32h7xx_ll_tim.h"
67#else
68#error "no target platform defined in the project options."
69#endif
70/*cstat +MISRAC2012-* */
71#endif // (SYS_TS_CFG_ENABLE_SERVICE == 1)
72
73/* Specifies the RTOS. Valid value are:
74 * - SYS_TP_RTOS_FREERTOS
75 * - SYS_TP_RTOS_THREADX*/
76
77#define SYS_TP_RTOS_THREADX
78
79/* Compiler specific define */
80/****************************/
81
82/*
83 * GCC, IAR and KEIL compiler support the inline keyword, so we do not need to redefine it
84 * for each compiler. For example, in the past, IAR used the #pragma inline directive.
85 * We decided to keep the SYS_DEFINE_INLINE macro for backward compatibility.
86 *
87 */
88#define SYS_DEFINE_INLINE inline
89
95#define SYS_DEFINE_STATIC_INLINE static inline
96
97/*
98 *
99 * This section defines some symbol specific to the STM32L4 memory map.
100 * See bugtabs4 #5265
101 */
102#ifdef SYS_TP_MCU_STM32L4
103#ifdef STM32L431xx
104
105#define SKP_PRWR_SCR_CWUF_1_5 0x1FU
106#define SKP_FLASH_SR_OPTVERR (0x1U << (15U))
107
108#endif
109#endif
110
111/* Early system initialization. */
112/********************************/
113/* With the support of STM32H7 some HAL macro used by the SysInit() and in the
114 * early system initialization inside the INIT task control loop are chenged.
115 */
116
117#if defined (SYS_TP_MCU_STM32H7)
118#define SYS_RCC_FLAG_WWDGRST RCC_FLAG_WWDG1RST
119#define SYS_DBGMCU_FREEZE_WWDG() __HAL_DBGMCU_FREEZE_WWDG1()
120#else
121#define SYS_RCC_FLAG_WWDGRST RCC_FLAG_WWDGRST
122#define SYS_DBGMCU_FREEZE_WWDG() __HAL_DBGMCU_FREEZE_WWDG()
123#endif
124
125
126/* X-CUBE-AI specific define */
127/*****************************/
128
129#ifdef SYS_USE_X_CUBE_AI
130/* MISRA messages linked to X-CUBE-AI include are ignored */
131/*cstat -MISRAC2012-* */
132#include "ai_platform.h"
133/*cstat +MISRAC2012-* */
134#endif
135
136#endif /* SYSTARGETPLATFORM_H_ */