aboutsummaryrefslogtreecommitdiffstats
path: root/demos/GNU-Linux-GCC
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-23 10:36:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-23 10:36:27 +0000
commit3d64c337cb92683e21325df054da024732bd7199 (patch)
treeb45d3a8110ad5896018ddbd82cf3304249e6617c /demos/GNU-Linux-GCC
parent957da89e719258a6cbb4b7c655baeef976d28cb9 (diff)
downloadChibiOS-3d64c337cb92683e21325df054da024732bd7199.tar.gz
ChibiOS-3d64c337cb92683e21325df054da024732bd7199.tar.bz2
ChibiOS-3d64c337cb92683e21325df054da024732bd7199.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@984 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/GNU-Linux-GCC')
-rw-r--r--demos/GNU-Linux-GCC/Makefile12
-rw-r--r--demos/GNU-Linux-GCC/chcore.c9
-rw-r--r--demos/GNU-Linux-GCC/chcore.h2
-rw-r--r--demos/GNU-Linux-GCC/main.c2
4 files changed, 13 insertions, 12 deletions
diff --git a/demos/GNU-Linux-GCC/Makefile b/demos/GNU-Linux-GCC/Makefile
index 988cf0364..5483d4448 100644
--- a/demos/GNU-Linux-GCC/Makefile
+++ b/demos/GNU-Linux-GCC/Makefile
@@ -16,9 +16,9 @@
# Start of default section
#
-TRGT = i686-pc-cygwin-
-CC = $(TRGT)gcc-4
-AS = $(TRGT)gcc-4 -x assembler-with-cpp
+TRGT =
+CC = $(TRGT)gcc
+AS = $(TRGT)gcc -x assembler-with-cpp
# List all default C defines here, like -D_DEBUG=1
DDEFS =
@@ -102,7 +102,7 @@ CPFLAGS += -MD -MP -MF .dep/$(@F).d
# makefile rules
#
-all: $(OBJS) $(PROJECT).exe
+all: $(OBJS) $(PROJECT)
%o : %c
$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
@@ -110,7 +110,7 @@ all: $(OBJS) $(PROJECT).exe
%o : %s
$(AS) -c $(ASFLAGS) $< -o $@
-%exe: $(OBJS)
+$(PROJECT): $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
gcov:
@@ -120,7 +120,7 @@ gcov:
clean:
-rm -f $(OBJS)
- -rm -f $(PROJECT).exe
+ -rm -f $(PROJECT)
-rm -f $(PROJECT).map
-rm -f $(SRC:.c=.c.bak)
-rm -f $(SRC:.c=.lst)
diff --git a/demos/GNU-Linux-GCC/chcore.c b/demos/GNU-Linux-GCC/chcore.c
index b9aa187ab..e75776e95 100644
--- a/demos/GNU-Linux-GCC/chcore.c
+++ b/demos/GNU-Linux-GCC/chcore.c
@@ -21,6 +21,7 @@
#include <signal.h>
#include <stdlib.h>
#include <sys/time.h>
+#include <stdio.h>
/**
* @addtogroup LINUXSIM_CORE
@@ -34,7 +35,7 @@ static bool_t pending = FALSE;
void timer(int numSignal) {
- pending = TRUE;
+ pending = TRUE;
}
/*
@@ -71,8 +72,8 @@ void ChkIntSources(void) {
*/
__attribute__((used))
static void __dummy(Thread *otp, Thread *ntp) {
- asm volatile (".globl @port_switch@8 \n\t" \
- "@port_switch@8: \n\t" \
+ asm volatile (".globl port_switch \n\t" \
+ "port_switch: \n\t" \
"push %ebp \n\t" \
"push %esi \n\t" \
"push %edi \n\t" \
@@ -101,7 +102,7 @@ void port_halt(void) {
void threadexit(void) {
asm volatile ("push %eax \n\t" \
- "call _chThdExit");
+ "call chThdExit");
}
/** @} */
diff --git a/demos/GNU-Linux-GCC/chcore.h b/demos/GNU-Linux-GCC/chcore.h
index fca0a03ea..48a052513 100644
--- a/demos/GNU-Linux-GCC/chcore.h
+++ b/demos/GNU-Linux-GCC/chcore.h
@@ -106,7 +106,7 @@ struct context {
* calculation of the correct working area size.
*/
#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 0x40000
+#define INT_REQUIRED_STACK 0x8000
#endif
/**
diff --git a/demos/GNU-Linux-GCC/main.c b/demos/GNU-Linux-GCC/main.c
index 15cb358fd..8d0d25879 100644
--- a/demos/GNU-Linux-GCC/main.c
+++ b/demos/GNU-Linux-GCC/main.c
@@ -26,7 +26,7 @@ static msg_t Thread1(void *arg) {
while (TRUE) {
chThdSleepMilliseconds(1000);
- printf("Hello World!");
+ printf("-\n");
}
return 0;
}