diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-LPC214x-GCC/Makefile | 6 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/main.c | 10 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/chconf.h | 6 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/chcore.h | 1 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/chtypes.h | 1 | ||||
-rw-r--r-- | demos/Win32-MSVS/ch.vcproj | 6 | ||||
-rw-r--r-- | demos/Win32-MSVS/chconf.h | 6 | ||||
-rw-r--r-- | demos/Win32-MSVS/chcore.c | 2 | ||||
-rw-r--r-- | demos/Win32-MSVS/chcore.h | 2 | ||||
-rw-r--r-- | demos/Win32-MSVS/chtypes.h | 1 | ||||
-rw-r--r-- | demos/Win32-MinGW/chconf.h | 6 | ||||
-rw-r--r-- | demos/Win32-MinGW/chcore.c | 2 | ||||
-rw-r--r-- | demos/Win32-MinGW/chcore.h | 2 | ||||
-rw-r--r-- | demos/Win32-MinGW/chtypes.h | 1 |
14 files changed, 45 insertions, 7 deletions
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 0c0ad93e9..eb9cf9bc7 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -93,9 +93,13 @@ AOPT = TOPT = -mthumb -D THUMB
# Common options here
-# NOTE: -ffixed-r7 is only needed if you enabled CH_CURRP_REGISTER_CACHE in chconf.h.
+# NOTE: -ffixed-r7 is only needed if you enabled CH_CURRP_REGISTER_CACHE in
+# chconf.h.
+# NOTE: -falign-functions=16 may improve the performance, not always, but
+# increases the code size.
OPT = -O2 -ggdb -fomit-frame-pointer -fno-strict-aliasing
#OPT += -ffixed-r7
+#OPT += -falign-functions=16
# Define warning options here
WARN = -Wall -Wstrict-prototypes
diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c index fbd4f2726..e10063bcb 100644 --- a/demos/ARM7-LPC214x-GCC/main.c +++ b/demos/ARM7-LPC214x-GCC/main.c @@ -119,8 +119,14 @@ static t_msg Thread3(void *arg) { int main(int argc, char **argv) {
chSysInit();
- chThdCreate(NORMALPRIO, 0, waThread1, sizeof(waThread1), Thread1, NULL);
- chThdCreate(NORMALPRIO, 0, waThread2, sizeof(waThread2), Thread2, NULL);
+ /*
+ * If a button is pressed during the reset then the blinking leds are not
+ * started in order to make accurate benchmarks.
+ */
+ if ((IO0PIN & 0x00018000) == 0x00018000) {
+ chThdCreate(NORMALPRIO, 0, waThread1, sizeof(waThread1), Thread1, NULL);
+ chThdCreate(NORMALPRIO, 0, waThread2, sizeof(waThread2), Thread2, NULL);
+ }
chThdCreate(NORMALPRIO, 0, waThread3, sizeof(waThread3), Thread3, NULL);
chSysPause();
return 0;
diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index 63a391e08..c6146f5e7 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -157,6 +157,12 @@ */
//#define CH_CURRP_REGISTER_CACHE "reg"
+/** Configuration option: Includes basic debug support to the kernel.
+ * @note the debug support is port-dependent, it may be not present on some
+ * targets. In that case stub functions will be included.
+ */
+//#define CH_USE_DEBUG
+
#endif /* _CHCONF_H_ */
/** @} */
diff --git a/demos/AVR-AT90CANx-GCC/chcore.h b/demos/AVR-AT90CANx-GCC/chcore.h index c3e0cfa34..935c37488 100644 --- a/demos/AVR-AT90CANx-GCC/chcore.h +++ b/demos/AVR-AT90CANx-GCC/chcore.h @@ -101,6 +101,7 @@ typedef struct { #define chSysLock() asm("cli")
#define chSysUnlock() asm("sei")
+#define chSysPuts(msg) {}
void chSysHalt(void) __attribute__((noreturn)) ;
void chSysPause(void) __attribute__((noreturn)) ;
diff --git a/demos/AVR-AT90CANx-GCC/chtypes.h b/demos/AVR-AT90CANx-GCC/chtypes.h index d3c26caaf..60e16aaf4 100644 --- a/demos/AVR-AT90CANx-GCC/chtypes.h +++ b/demos/AVR-AT90CANx-GCC/chtypes.h @@ -34,6 +34,7 @@ typedef BYTE8 t_tmode;
typedef BYTE8 t_tstate;
+typedef BYTE8 t_tid;
typedef BYTE8 t_prio;
typedef WORD16 t_msg;
typedef BYTE8 t_eventid;
diff --git a/demos/Win32-MSVS/ch.vcproj b/demos/Win32-MSVS/ch.vcproj index 26dd9557e..3490c810b 100644 --- a/demos/Win32-MSVS/ch.vcproj +++ b/demos/Win32-MSVS/ch.vcproj @@ -142,6 +142,9 @@ Name="src"
Filter="">
<File
+ RelativePath="..\..\src\chdebug.c">
+ </File>
+ <File
RelativePath="..\..\src\chdelta.c">
</File>
<File
@@ -210,6 +213,9 @@ RelativePath="..\..\src\include\ch.h">
</File>
<File
+ RelativePath="..\..\src\include\debug.h">
+ </File>
+ <File
RelativePath="..\..\src\include\delta.h">
</File>
<File
diff --git a/demos/Win32-MSVS/chconf.h b/demos/Win32-MSVS/chconf.h index 1aa089575..be1896046 100644 --- a/demos/Win32-MSVS/chconf.h +++ b/demos/Win32-MSVS/chconf.h @@ -161,6 +161,12 @@ */
//#define CH_CURRP_REGISTER_CACHE "reg"
+/** Configuration option: Includes basic debug support to the kernel.
+ * @note the debug support is port-dependent, it may be not present on some
+ * targets. In that case stub functions will be included.
+ */
+//#define CH_USE_DEBUG
+
#endif /* _CHCONF_H_ */
/** @} */
diff --git a/demos/Win32-MSVS/chcore.c b/demos/Win32-MSVS/chcore.c index 01619f9cd..8aedbb465 100644 --- a/demos/Win32-MSVS/chcore.c +++ b/demos/Win32-MSVS/chcore.c @@ -47,7 +47,7 @@ void InitCore(void) { /*
* Interrupt simulation.
*/
-static void ChkIntSources(void) {
+void ChkIntSources(void) {
LARGE_INTEGER n;
if (Com1InInterruptSimCom() || Com2InInterruptSimCom() ||
diff --git a/demos/Win32-MSVS/chcore.h b/demos/Win32-MSVS/chcore.h index 26e0b66bf..58e278fe4 100644 --- a/demos/Win32-MSVS/chcore.h +++ b/demos/Win32-MSVS/chcore.h @@ -58,8 +58,8 @@ typedef struct { }
#define chSysLock()
-
#define chSysUnlock()
+#define chSysPuts(msg) {}
#define INT_REQUIRED_STACK 0x0
diff --git a/demos/Win32-MSVS/chtypes.h b/demos/Win32-MSVS/chtypes.h index 6481c22a8..5ab9a06e1 100644 --- a/demos/Win32-MSVS/chtypes.h +++ b/demos/Win32-MSVS/chtypes.h @@ -33,6 +33,7 @@ typedef BYTE8 t_tmode;
typedef BYTE8 t_tstate;
+typedef UWORD16 t_tid;
typedef ULONG32 t_prio;
typedef LONG32 t_msg;
typedef LONG32 t_eventid;
diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index b7a8acedd..8ce32defa 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -161,6 +161,12 @@ */
//#define CH_CURRP_REGISTER_CACHE "reg"
+/** Configuration option: Includes basic debug support to the kernel.
+ * @note the debug support is port-dependent, it may be not present on some
+ * targets. In that case stub functions will be included.
+ */
+//#define CH_USE_DEBUG
+
#endif /* _CHCONF_H_ */
/** @} */
diff --git a/demos/Win32-MinGW/chcore.c b/demos/Win32-MinGW/chcore.c index ee04147e9..c96611f8b 100644 --- a/demos/Win32-MinGW/chcore.c +++ b/demos/Win32-MinGW/chcore.c @@ -70,7 +70,7 @@ void InitCore(void) { /*
* Interrupt simulation.
*/
-static void ChkIntSources(void) {
+void ChkIntSources(void) {
LARGE_INTEGER n;
if (Com1InInterruptSimCom() || Com2InInterruptSimCom() ||
diff --git a/demos/Win32-MinGW/chcore.h b/demos/Win32-MinGW/chcore.h index 7f0021854..6d3055081 100644 --- a/demos/Win32-MinGW/chcore.h +++ b/demos/Win32-MinGW/chcore.h @@ -58,8 +58,8 @@ typedef struct { }
#define chSysLock()
-
#define chSysUnlock()
+#define chSysPuts(msg) {}
#define INT_REQUIRED_STACK 0x0
diff --git a/demos/Win32-MinGW/chtypes.h b/demos/Win32-MinGW/chtypes.h index 803b5ead4..2ac219148 100644 --- a/demos/Win32-MinGW/chtypes.h +++ b/demos/Win32-MinGW/chtypes.h @@ -33,6 +33,7 @@ typedef BYTE8 t_tmode;
typedef BYTE8 t_tstate;
+typedef UWORD16 t_tid;
typedef ULONG32 t_prio;
typedef LONG32 t_msg;
typedef LONG32 t_eventid;
|