From: batt Date: Mon, 22 Oct 2007 08:06:44 +0000 (+0000) Subject: Add kernel test. X-Git-Tag: 1.0.0~319 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0ace0d776cdbb34ed7f4aaa0815d4e2dd46fcec7;p=bertos.git Add kernel test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@923 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/at91sam7s/appconfig.h b/app/at91sam7s/appconfig.h index 3d08e4f9..179f5ace 100644 --- a/app/at91sam7s/appconfig.h +++ b/app/at91sam7s/appconfig.h @@ -94,7 +94,7 @@ * * \sa config_kern.h */ -#define CONFIG_KERNEL 0 +#define CONFIG_KERNEL 1 /** * \name Serial driver parameters diff --git a/app/at91sam7s/at91sam7s.c b/app/at91sam7s/at91sam7s.c index 000d3322..4e75cf4e 100644 --- a/app/at91sam7s/at91sam7s.c +++ b/app/at91sam7s/at91sam7s.c @@ -37,8 +37,10 @@ * \brief AT91SAM7S-EK porting test. */ +#include #include #include +#include #include #include #include @@ -77,6 +79,10 @@ int main(void) sysirq_init(); timer_init(); + proc_init(); + ASSERT(!IRQ_GETSTATE()); + + /* Open the main communication port */ Serial *host_port = ser_open(0); @@ -84,6 +90,7 @@ int main(void) ser_setparity(host_port, SER_PARITY_NONE); IRQ_ENABLE; + ASSERT(IRQ_GETSTATE()); /* Disable all pullups */ PIOA_PUDR = 0xffffffff; @@ -99,20 +106,16 @@ int main(void) /* turn first led on */ PIOA_CODR = 0x00000001; - - - -/* timer_set_event_softint(&leds_timer, (Hook)leds_toggle, 0); timer_setDelay(&leds_timer, ms_to_ticks(100)); timer_add(&leds_timer); -*/ // Main loop for(;;) { ser_printf(host_port," %s", "a"); kprintf("W la figa!\n"); + proc_test(); iort+= 1; iort1+= 1; iort2+= 1; diff --git a/app/at91sam7s/at91sam7s.mk b/app/at91sam7s/at91sam7s.mk index 8584f56f..bfa47957 100644 --- a/app/at91sam7s/at91sam7s.mk +++ b/app/at91sam7s/at91sam7s.mk @@ -24,11 +24,15 @@ at91sam7s_CSRC = \ cpu/arm/drv/ser_at91.c \ mware/event.c \ mware/formatwr.c \ - mware/hex.c - - - -at91sam7s_CPPASRC = cpu/arm/hw/crtat91sam7s256_rom.S + mware/hex.c \ + kern/proc.c \ + kern/proc_test.c \ + kern/monitor.c \ + kern/signal.c \ + +at91sam7s_CPPASRC = \ + cpu/arm/hw/crtat91sam7s256_rom.S \ + kern/switch_arm.S at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug at91sam7s_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_AT91SAM7S256__ -g3 -gdwarf-2 -fverbose-asm -Iapp/at91sam7s/hw -Iapp/at91sam7s -Icpu/arm diff --git a/config_kern.h b/config_kern.h index f43f77a2..e5cc71cb 100644 --- a/config_kern.h +++ b/config_kern.h @@ -99,7 +99,7 @@ #if (ARCH & ARCH_EMUL) #define CONFIG_KERN_DEFSTACKSIZE 65536 #else - #define CONFIG_KERN_DEFSTACKSIZE 128 /**< Default stack size for each thread. */ + #define CONFIG_KERN_DEFSTACKSIZE 1024 /**< Default stack size for each thread. */ #endif /* Memory fill codes to help debugging */