From 3d64c337cb92683e21325df054da024732bd7199 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 23 May 2009 10:36:27 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@984 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/GNU-Linux-GCC/Makefile | 12 ++++++------ demos/GNU-Linux-GCC/chcore.c | 9 +++++---- demos/GNU-Linux-GCC/chcore.h | 2 +- demos/GNU-Linux-GCC/main.c | 2 +- 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 #include #include +#include /** * @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; }