summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/test/kernel/Makefile7
-rw-r--r--firmware/test/kernel/main.c10
2 files changed, 10 insertions, 7 deletions
diff --git a/firmware/test/kernel/Makefile b/firmware/test/kernel/Makefile
index 2a9ef0f71b..be82abfcb9 100644
--- a/firmware/test/kernel/Makefile
+++ b/firmware/test/kernel/Makefile
@@ -11,11 +11,11 @@ INCLUDES=-I../../ -I../../drivers
TARGET = -DARCHOS_PLAYER_OLD=1
#TARGET = -DARCHOS_RECORDER=1
-CFLAGS = -g -O -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns -fno-builtin $(INCLUDES) $(TARGET) -DDEBUG
+CFLAGS = -g -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fschedule-insns -fno-builtin $(INCLUDES) $(TARGET) -DDEBUG
AFLAGS += -small -relax
OBJS= ../../crt0.o ../../system.o main.o ../../panic.o ../../drivers/lcd.o \
- ../../thread.o ../../kernel.o ../../drivers/led.o \
+ thread.o ../../kernel.o ../../drivers/led.o \
../../debug.o ../../common/sprintf.o
%.o: %.S
@@ -47,3 +47,6 @@ clean:
install:
mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos
+
+thread.o: ../../thread.c
+ $(CC) -O -fomit-frame-pointer -c $(CFLAGS) $<
diff --git a/firmware/test/kernel/main.c b/firmware/test/kernel/main.c
index 46a77eae16..b651324ae1 100644
--- a/firmware/test/kernel/main.c
+++ b/firmware/test/kernel/main.c
@@ -55,16 +55,16 @@ int main(void)
SCR1 &= ~0x80;
IPRE |= 0xf000; /* Set to highest priority */
- set_irq_level(0);
-
debugf("OK. Let's go\n");
kernel_init();
+ set_irq_level(0);
+
tick_add_task(testfunc);
debugf("sleeping 10s...\n");
- sleep(10000);
+ sleep(HZ*10);
debugf("woke up\n");
queue_init(&main_q);
@@ -84,7 +84,7 @@ void t1(void)
debugf("Thread 1 started\n");
while(1)
{
- sleep(100);
+ sleep(HZ);
debugf("Thread 1 posting an event\n");
queue_post(&main_q, 1234, 0);
queue_post(&main_q, 5678, 0);
@@ -96,7 +96,7 @@ void t2(void)
debugf("Thread 2 started\n");
while(1)
{
- sleep(300);
+ sleep(HZ*3);
debugf("Thread 2 awakened\n");
}
}