diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-05-11 21:56:33 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-05-11 21:56:33 +0000 |
commit | b133675d3e39ee9e25f4c6e919b88ceb3e9d51c0 (patch) | |
tree | bb646f6ea97db10260026601f8b64a4855194973 /firmware | |
parent | f70f06cc6bceb53f27273305575d38430ce4243f (diff) | |
download | rockbox-b133675d3e39ee9e25f4c6e919b88ceb3e9d51c0.tar.gz rockbox-b133675d3e39ee9e25f4c6e919b88ceb3e9d51c0.zip |
Cleaned up a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@547 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/test/kernel/Makefile | 7 | ||||
-rw-r--r-- | firmware/test/kernel/main.c | 10 |
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 | |||
11 | TARGET = -DARCHOS_PLAYER_OLD=1 | 11 | TARGET = -DARCHOS_PLAYER_OLD=1 |
12 | #TARGET = -DARCHOS_RECORDER=1 | 12 | #TARGET = -DARCHOS_RECORDER=1 |
13 | 13 | ||
14 | CFLAGS = -g -O -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns -fno-builtin $(INCLUDES) $(TARGET) -DDEBUG | 14 | CFLAGS = -g -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fschedule-insns -fno-builtin $(INCLUDES) $(TARGET) -DDEBUG |
15 | AFLAGS += -small -relax | 15 | AFLAGS += -small -relax |
16 | 16 | ||
17 | OBJS= ../../crt0.o ../../system.o main.o ../../panic.o ../../drivers/lcd.o \ | 17 | OBJS= ../../crt0.o ../../system.o main.o ../../panic.o ../../drivers/lcd.o \ |
18 | ../../thread.o ../../kernel.o ../../drivers/led.o \ | 18 | thread.o ../../kernel.o ../../drivers/led.o \ |
19 | ../../debug.o ../../common/sprintf.o | 19 | ../../debug.o ../../common/sprintf.o |
20 | 20 | ||
21 | %.o: %.S | 21 | %.o: %.S |
@@ -47,3 +47,6 @@ clean: | |||
47 | 47 | ||
48 | install: | 48 | install: |
49 | mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos | 49 | mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos |
50 | |||
51 | thread.o: ../../thread.c | ||
52 | $(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) | |||
55 | SCR1 &= ~0x80; | 55 | SCR1 &= ~0x80; |
56 | IPRE |= 0xf000; /* Set to highest priority */ | 56 | IPRE |= 0xf000; /* Set to highest priority */ |
57 | 57 | ||
58 | set_irq_level(0); | ||
59 | |||
60 | debugf("OK. Let's go\n"); | 58 | debugf("OK. Let's go\n"); |
61 | 59 | ||
62 | kernel_init(); | 60 | kernel_init(); |
63 | 61 | ||
62 | set_irq_level(0); | ||
63 | |||
64 | tick_add_task(testfunc); | 64 | tick_add_task(testfunc); |
65 | 65 | ||
66 | debugf("sleeping 10s...\n"); | 66 | debugf("sleeping 10s...\n"); |
67 | sleep(10000); | 67 | sleep(HZ*10); |
68 | debugf("woke up\n"); | 68 | debugf("woke up\n"); |
69 | 69 | ||
70 | queue_init(&main_q); | 70 | queue_init(&main_q); |
@@ -84,7 +84,7 @@ void t1(void) | |||
84 | debugf("Thread 1 started\n"); | 84 | debugf("Thread 1 started\n"); |
85 | while(1) | 85 | while(1) |
86 | { | 86 | { |
87 | sleep(100); | 87 | sleep(HZ); |
88 | debugf("Thread 1 posting an event\n"); | 88 | debugf("Thread 1 posting an event\n"); |
89 | queue_post(&main_q, 1234, 0); | 89 | queue_post(&main_q, 1234, 0); |
90 | queue_post(&main_q, 5678, 0); | 90 | queue_post(&main_q, 5678, 0); |
@@ -96,7 +96,7 @@ void t2(void) | |||
96 | debugf("Thread 2 started\n"); | 96 | debugf("Thread 2 started\n"); |
97 | while(1) | 97 | while(1) |
98 | { | 98 | { |
99 | sleep(300); | 99 | sleep(HZ*3); |
100 | debugf("Thread 2 awakened\n"); | 100 | debugf("Thread 2 awakened\n"); |
101 | } | 101 | } |
102 | } | 102 | } |