summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
60609e6)
* Process monitor.
* $WIZ$ type = "autoenabled"
*/
* Process monitor.
* $WIZ$ type = "autoenabled"
*/
-#define CONFIG_KERN_MONITOR 0
+#define CONFIG_KERN_MONITOR 1
#endif /* CFG_MONITOR_H */
#endif /* CFG_MONITOR_H */
*
* $WIZ$ type = "autoenabled"
*/
*
* $WIZ$ type = "autoenabled"
*/
/**
* Kernel interrupt supervisor. WARNING: Experimental, still incomplete!
/**
* Kernel interrupt supervisor. WARNING: Experimental, still incomplete!
* $WIZ$ type = "boolean"
* $WIZ$ conditional_deps = "timer"
*/
* $WIZ$ type = "boolean"
* $WIZ$ conditional_deps = "timer"
*/
-#define CONFIG_KERN_PREEMPT 0
+#define CONFIG_KERN_PREEMPT 1
/**
* Time sharing quantum (a prime number prevents interference effects) [ms].
/**
* Time sharing quantum (a prime number prevents interference effects) [ms].
* Priority-based scheduling policy.
* $WIZ$ type = "boolean"
*/
* Priority-based scheduling policy.
* $WIZ$ type = "boolean"
*/
-#define CONFIG_KERN_PRI 0
+#define CONFIG_KERN_PRI 1
/**
* Dynamic memory allocation for processes.
* $WIZ$ type = "boolean"
* $WIZ$ conditional_deps = "heap"
*/
/**
* Dynamic memory allocation for processes.
* $WIZ$ type = "boolean"
* $WIZ$ conditional_deps = "heap"
*/
-#define CONFIG_KERN_HEAP 0
+#define CONFIG_KERN_HEAP 1
/**
* Size of the dynamic memory pool used by processes.
* $WIZ$ type = "int"
* $WIZ$ min = 0
*/
/**
* Size of the dynamic memory pool used by processes.
* $WIZ$ type = "int"
* $WIZ$ min = 0
*/
-#define CONFIG_KERN_HEAP_SIZE 2048L
+#define CONFIG_KERN_HEAP_SIZE 16384L
/**
* Module logging level.
/**
* Module logging level.
lpc2378_USER_CSRC = \
examples/lpc2378/main.c \
bertos/drv/timer.c \
lpc2378_USER_CSRC = \
examples/lpc2378/main.c \
bertos/drv/timer.c \
+ bertos/drv/timer_test.c \
bertos/cpu/arm/drv/vic_lpc2.c \
bertos/cpu/arm/drv/timer_lpc2.c \
bertos/cpu/arm/drv/vic_lpc2.c \
bertos/cpu/arm/drv/timer_lpc2.c \
+ bertos/mware/event.c \
+ bertos/kern/proc.c \
+ bertos/kern/coop.c \
+ bertos/kern/preempt.c \
+ bertos/kern/proc_test.c \
+ bertos/kern/monitor.c \
+ bertos/mware/sprintf.c \
+ bertos/struct/heap.c \
#
# Files included by the user.
#
# Files included by the user.
# Files included by the user.
lpc2378_USER_CPPASRC = \
# Files included by the user.
lpc2378_USER_CPPASRC = \
+ bertos/cpu/arm/hw/switch_ctx_arm.S \
#
# Files included by the user.
#
# Files included by the user.
IRQ_ENABLE;
kdbg_init();
timer_init();
IRQ_ENABLE;
kdbg_init();
timer_init();
+ proc_init();
+ timer_delay(3000);
kprintf("NXP LPC2378 BeRTOS port test\n");
kprintf("NXP LPC2378 BeRTOS port test\n");
/* Turn off boot led */
IODIR0 = (1<<21);
IOCLR0 = (1<<21);
/* Turn off boot led */
IODIR0 = (1<<21);
IOCLR0 = (1<<21);
+static void NORETURN bertos_up(void)
{
char spinner[] = {'/', '-', '\\', '|'};
int i = 0;
{
char spinner[] = {'/', '-', '\\', '|'};
int i = 0;
kprintf("BeRTOS is up & running: %c\r",
spinner[i % countof(spinner)]);
kprintf("BeRTOS is up & running: %c\r",
spinner[i % countof(spinner)]);
+ proc_permit();
+ timer_delay(100);
+ }
+}
+
+static void NORETURN status(void)
+{
+ while (1)
+ {
+ timer_delay(250);
+ }
+}
+
+int main(void)
+{
+
+ init();
+ proc_testRun();
+ proc_new(bertos_up, NULL, KERN_MINSTACKSIZE * 3, NULL);
+ proc_new(status, NULL, 0, NULL);
+ while (1)
+ {