Browse Source

Add support for CMSIS V2 OS's eg RTX5

inmarket 2 years ago
parent
commit
2b4bd12ffa
5 changed files with 26 additions and 4 deletions
  1. 2 0
      changelog.txt
  2. 2 0
      gfxconf.example.h
  3. 4 0
      src/gos/gos.h
  4. 15 1
      src/gos/gos_options.h
  5. 3 3
      src/gos/gos_rules.h

+ 2 - 0
changelog.txt

@@ -42,6 +42,8 @@ CHANGE:		Upgrade GFILE FATFS support from V0.10b to V0.13
42 42
 FEATURE:	Added UC1610 driver
43 43
 FIX:		Fixed to allow gwinSetText with static text on a TextEdit control
44 44
 FIX:		Fixed to ChibiOS realloc on a TextEdit control
45
+FEATURE:	Added support for CMSIS V2.0 operating systems (eg RTX5)
46
+REMOVED:	Removed long deprecated functions gfxSemCounter() and gfxSemCounterI()
45 47
 
46 48
 
47 49
 *** Release 2.7 ***

+ 2 - 0
gfxconf.example.h

@@ -36,7 +36,9 @@
36 36
 //#define GFX_USE_OS_RAWRTOS                           FALSE
37 37
 //#define GFX_USE_OS_ARDUINO                           FALSE
38 38
 //#define GFX_USE_OS_KEIL                              FALSE
39
+//#define GFX_USE_OS_RTX5                              FALSE
39 40
 //#define GFX_USE_OS_CMSIS                             FALSE
41
+//#define GFX_USE_OS_CMSIS2                            FALSE
40 42
 //#define GFX_USE_OS_RAW32                             FALSE
41 43
 //#define GFX_USE_OS_NIOS                              FALSE
42 44
 //#define GFX_USE_OS_QT                                FALSE

+ 4 - 0
src/gos/gos.h

@@ -476,8 +476,12 @@
476 476
 	#include "gos_arduino.h"
477 477
 #elif GFX_USE_OS_CMSIS
478 478
  	#include "gos_cmsis.h"
479
+#elif GFX_USE_OS_CMSIS2
480
+ 	#include "gos_cmsis2.h"
479 481
 #elif GFX_USE_OS_KEIL
480 482
     #include "gos_keil.h"
483
+#elif GFX_USE_OS_RTX5
484
+    #include "gos_rtx5.h"
481 485
 #elif GFX_USE_OS_NIOS
482 486
     #include "gos_nios.h"
483 487
 #elif GFX_USE_OS_QT

+ 15 - 1
src/gos/gos_options.h

@@ -91,12 +91,26 @@
91 91
 		#define GFX_USE_OS_CMSIS		FALSE
92 92
 	#endif
93 93
 	/**
94
-	 * @brief   Use Keil CMSIS
94
+	 * @brief	Use CMSIS2 RTOS compatible OS
95
+	 * @details	Defaults to FALSE
96
+	 */
97
+	#ifndef GFX_USE_OS_CMSIS2
98
+		#define GFX_USE_OS_CMSIS2		FALSE
99
+	#endif
100
+	/**
101
+	 * @brief   Use Keil CMSIS 1.x (RTOS, RTX4)
95 102
 	 * @details	Defaults to FALSE
96 103
 	 */
97 104
 	#ifndef GFX_USE_OS_KEIL
98 105
 		#define GFX_USE_OS_KEIL			FALSE
99 106
 	#endif
107
+	/**
108
+	 * @brief   Use Keil RTX5
109
+	 * @details	Defaults to FALSE
110
+	 */
111
+	#ifndef GFX_USE_OS_RTX5
112
+		#define GFX_USE_OS_RTX5			FALSE
113
+	#endif
100 114
 	/**
101 115
 	 * @brief   Use NIOS-II
102 116
 	 * @details	Defaults to FALSE

+ 3 - 3
src/gos/gos_rules.h

@@ -16,11 +16,11 @@
16 16
 #ifndef _GOS_RULES_H
17 17
 #define _GOS_RULES_H
18 18
 
19
-#if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_LINUX && !GFX_USE_OS_OSX && !GFX_USE_OS_RAW32 && !GFX_USE_OS_FREERTOS && !GFX_USE_OS_ECOS && !GFX_USE_OS_RAWRTOS && !GFX_USE_OS_ARDUINO && !GFX_USE_OS_CMSIS && !GFX_USE_OS_KEIL && !GFX_USE_OS_NIOS && !GFX_USE_OS_QT
19
+#if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_LINUX && !GFX_USE_OS_OSX && !GFX_USE_OS_RAW32 && !GFX_USE_OS_FREERTOS && !GFX_USE_OS_ECOS && !GFX_USE_OS_RAWRTOS && !GFX_USE_OS_ARDUINO && !GFX_USE_OS_CMSIS && !GFX_USE_OS_CMSIS2 && !GFX_USE_OS_KEIL && !GFX_USE_OS_RTX5 && !GFX_USE_OS_NIOS && !GFX_USE_OS_QT
20 20
 	#error "GOS: No operating system has been defined."
21 21
 #endif
22 22
 
23
-#if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_LINUX + GFX_USE_OS_OSX + GFX_USE_OS_RAW32 + GFX_USE_OS_FREERTOS + GFX_USE_OS_ECOS + GFX_USE_OS_RAWRTOS + GFX_USE_OS_ARDUINO + GFX_USE_OS_CMSIS + GFX_USE_OS_KEIL + GFX_USE_OS_NIOS + GFX_USE_OS_QT != 1 * TRUE
23
+#if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_LINUX + GFX_USE_OS_OSX + GFX_USE_OS_RAW32 + GFX_USE_OS_FREERTOS + GFX_USE_OS_ECOS + GFX_USE_OS_RAWRTOS + GFX_USE_OS_ARDUINO + GFX_USE_OS_CMSIS + GFX_USE_OS_CMSIS2 + GFX_USE_OS_KEIL + GFX_USE_OS_RTX5 + GFX_USE_OS_NIOS + GFX_USE_OS_QT != 1 * TRUE
24 24
 	#error "GOS: More than one operation system has been defined as TRUE."
25 25
 #endif
26 26
 
@@ -30,7 +30,7 @@
30 30
 
31 31
 #if GFX_EMULATE_MALLOC
32 32
 	#if GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || GFX_USE_OS_ECOS || \
33
-			(GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_KEIL))
33
+			(GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_CMSIS2 || GFX_USE_OS_KEIL || GFX_USE_OS_RTX5))
34 34
 		#if GFX_DISPLAY_RULE_WARNINGS
35 35
 			#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
36 36
 				#warning "GOS: Cannot emulate malloc as gfxAlloc() internally uses malloc on this platform"