Add kernel test.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Oct 2007 08:06:44 +0000 (08:06 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Oct 2007 08:06:44 +0000 (08:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@923 38d2e660-2303-0410-9eaa-f027e97ec537

app/at91sam7s/appconfig.h
app/at91sam7s/at91sam7s.c
app/at91sam7s/at91sam7s.mk
config_kern.h

index 3d08e4f9d7606b145f5eb2dce7f2e8ea031d1ddc..179f5ace5cff8ea9ce8ad16fbba817c6ae2a489d 100644 (file)
@@ -94,7 +94,7 @@
  *
  * \sa config_kern.h
  */
-#define CONFIG_KERNEL 0
+#define CONFIG_KERNEL 1
 
 /**
  * \name Serial driver parameters
index 000d3322235a65bcbb66a3d9b6a2f2fcff24d89b..4e75cf4e6372fa505bf62125fe3c0f398858fae6 100644 (file)
  * \brief AT91SAM7S-EK porting test.
  */
 
+#include <cfg/macros.h>
 #include <drv/timer.h>
 #include <drv/sysirq_at91.h>
+#include <kern/proc.h>
 #include <drv/ser.h>
 #include <cfg/macros.h>
 #include <io/arm.h>
@@ -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;
index 8584f56ff53753017adaa5a7babe76b7b9f34754..bfa4795718687f40fc8ff83a3af74953e8934c49 100644 (file)
@@ -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
index f43f77a27fb8a5d258ae985611438d256bfa9b10..e5cc71cb077bf3512154112899381e1613a57798 100644 (file)
@@ -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 */