#include <cpu/irq.h>
#include <cpu/power.h> // cpu_relax()
-#include <kern/preempt.h> // proc_decQuantun()
+#include <kern/proc_p.h> // proc_decQuantun()
/*
* Include platform-specific binding code if we're hosted.
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2001, 2004, 2008 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Simple cooperative multitasking scheduler.
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- * \author Stefano Fedrigo <aleph@develer.com>
- */
-
-#include "proc_p.h"
-#include "proc.h"
-
-// Log settings for cfg/log.h.
-#define LOG_LEVEL KERN_LOG_LEVEL
-#define LOG_FORMAT KERN_LOG_FORMAT
-#include <cfg/log.h>
-
-#include <cpu/irq.h>
-#include <cpu/types.h>
-#include <cpu/attr.h>
-#include <cpu/frame.h>
-
-/**
- * Define function prototypes exported outside.
- *
- * Required to silent gcc "no previous prototype" warnings.
- */
-void coop_yield(void);
-void coop_switch(void);
-void coop_wakeup(Process *proc);
-
-static void coop_switchTo(Process *proc)
-{
- Process *old_process = current_process;
-
- SCHED_ENQUEUE(current_process);
- current_process = proc;
- proc_switchTo(current_process, old_process);
-}
-
-/**
- * Give the control of the CPU to another process.
- *
- * \note Assume the current process has been already added to a wait queue.
+ * \note This file is deprecated and kept only for backward compatibility.
*
- * \warning This should be considered an internal kernel function, even if it
- * is allowed, usage from application code is strongly discouraged.
- */
-void coop_switch(void)
-{
- ATOMIC(proc_schedule());
-}
-
-/**
- * Immediately wakeup a process, dispatching it to the CPU.
- */
-void coop_wakeup(Process *proc)
-{
- ASSERT(proc_preemptAllowed());
- ASSERT(current_process);
- IRQ_ASSERT_DISABLED();
-
- if (prio_proc(proc) >= prio_curr())
- coop_switchTo(proc);
- else
- SCHED_ENQUEUE_HEAD(proc);
-}
-
-/**
- * Co-operative context switch
+ * -->
*/
-void coop_yield(void)
-{
- Process *proc;
-
- IRQ_DISABLE;
- proc = (struct Process *)list_remHead(&proc_ready_list);
- if (proc)
- coop_switchTo(proc);
- IRQ_ENABLE;
-}
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2008 Bernie Innocenti <bernie@codewiz.org>
- * Copyright 2009 Andrea Righi <arighi@develer.com>
- * -->
- *
- * \brief Simple preemptive multitasking scheduler.
- *
- * Preemption is explicitly regulated at the exit of each interrupt service
- * routine (ISR). Each task obtains a time quantum as soon as it is scheduled
- * on the CPU and its quantum is decremented at each clock tick. The frequency
- * of the timer determines the system tick granularity and CONFIG_KERN_QUANTUM
- * the time sharing interval.
- *
- * When the quantum expires the handler proc_needPreempt() checks if the
- * preemption is enabled and in this case preempt_schedule() is called, that
- * possibly replaces the current running thread with a different one.
- *
- * The preemption can be disabled or enabled via proc_forbid() and
- * proc_permit() primitives. This is implemented using a global atomic counter.
- * When the counter is greater than 0 the task cannot be preempted; only when
- * the counter reaches 0 the task can be preempted again.
- *
- * Preemption-disabled sections may be nested. The preemption will be
- * re-enabled when the outermost preemption-disabled section completes.
- *
- * The voluntary preemption still happens via proc_switch() or proc_yield().
- * The first one assumes the current process has been already added to a
- * private wait queue (e.g., on a semaphore or a signal), while the second one
- * takes care of adding the process into the ready queue.
- *
- * Context switch is done by CPU-dependent support routines. In case of a
- * voluntary preemption the context switch routine must take care of
- * saving/restoring only the callee-save registers (the voluntary-preemption is
- * actually a function call). The kernel-preemption always happens inside a
- * signal/interrupt context and it must take care of saving all registers. For
- * this, in the entry point of each ISR the caller-save registers must be
- * saved. In the ISR exit point, if the context switch must happen, we switch
- * to user-context and call the same voluntary context switch routine that take
- * care of saving/restoring also the callee-save registers. On resume from the
- * switch, the interrupt exit point moves back to interrupt-context, resumes
- * the caller-save registers (saved in the ISR entry point) and return from the
- * interrupt-context.
- *
- * \note Thread priority (if enabled by CONFIG_KERN_PRI) defines the order in
- * the \p proc_ready_list and the capability to deschedule a running process. A
- * low-priority thread can't preempt a high-priority thread.
- *
- * A high-priority process can preempt a low-priority process immediately (it
- * will be descheduled and replaced in the interrupt exit point). Processes
- * running at the same priority can be descheduled when they expire the time
- * quantum.
- *
- * \note Sleeping while preemption is disabled fallbacks to a busy-wait sleep.
- * Voluntary preemption when preemption is disabled raises a kernel bug.
- *
- * \author Bernie Innocenti <bernie@codewiz.org>
- * \author Andrea Righi <arighi@develer.com>
- */
-
-#include "cfg/cfg_proc.h"
-
-#include "proc_p.h"
-#include "proc.h"
-
-#include <kern/irq.h>
-#include <kern/monitor.h>
-#include <cpu/frame.h> // CPU_IDLE
-#include <cpu/irq.h> // IRQ_DISABLE()...
-#include <cfg/log.h>
-#include <cfg/module.h>
-#include <cfg/depend.h> // CONFIG_DEPEND()
-
-// Check config dependencies
-CONFIG_DEPEND(CONFIG_KERN_PREEMPT, CONFIG_KERN);
-
-MOD_DEFINE(preempt)
-
-/* Global preemption nesting counter */
-cpu_atomic_t preempt_count;
-
-/*
- * The time sharing interval: when a process is scheduled on a CPU it gets an
- * amount of CONFIG_KERN_QUANTUM clock ticks. When these ticks expires and
- * preemption is enabled a new process is selected to run.
- */
-int _proc_quantum;
-
-/**
- * Define function prototypes exported outside.
+ * \note This file is deprecated and kept only for backward compatibility.
*
- * Required to silent gcc "no previous prototype" warnings.
- */
-void preempt_yield(void);
-int preempt_needPreempt(void);
-void preempt_preempt(void);
-void preempt_switch(void);
-void preempt_wakeup(Process *proc);
-void preempt_init(void);
-
-static void preempt_switchTo(Process *proc)
-{
- Process *old_process = current_process;
-
- SCHED_ENQUEUE(current_process);
- _proc_quantum = CONFIG_KERN_QUANTUM;
- current_process = proc;
- proc_switchTo(current_process, old_process);
-}
-
-/**
- * Call the scheduler and eventually replace the current running process.
- */
-static void preempt_schedule(void)
-{
- _proc_quantum = CONFIG_KERN_QUANTUM;
- proc_schedule();
-}
-
-/**
- * Check if we need to schedule another task
- */
-int preempt_needPreempt(void)
-{
- if (UNLIKELY(current_process == NULL))
- return 0;
- if (!proc_preemptAllowed())
- return 0;
- if (LIST_EMPTY(&proc_ready_list))
- return 0;
- return _proc_quantum ? prio_next() > prio_curr() :
- prio_next() >= prio_curr();
-}
-
-/**
- * Preempt the current task.
- */
-void preempt_preempt(void)
-{
- IRQ_ASSERT_DISABLED();
- ASSERT(current_process);
-
- /* Perform the kernel preemption */
- LOG_INFO("preempting %p:%s\n", current_process, proc_currentName());
- /* We are inside a IRQ context, so ATOMIC is not needed here */
- SCHED_ENQUEUE(current_process);
- preempt_schedule();
-}
-
-/**
- * Give the control of the CPU to another process.
- *
- * \note Assume the current process has been already added to a wait queue.
- *
- * \warning This should be considered an internal kernel function, even if it
- * is allowed, usage from application code is strongly discouraged.
- */
-void preempt_switch(void)
-{
- ASSERT(proc_preemptAllowed());
-
- ATOMIC(preempt_schedule());
-}
-
-/**
- * Immediately wakeup a process, dispatching it to the CPU.
- */
-void preempt_wakeup(Process *proc)
-{
- ASSERT(proc_preemptAllowed());
- ASSERT(current_process);
- IRQ_ASSERT_DISABLED();
-
- if (prio_proc(proc) >= prio_curr())
- preempt_switchTo(proc);
- else
- SCHED_ENQUEUE_HEAD(proc);
-}
-
-/**
- * Voluntarily release the CPU.
+ * -->
*/
-void preempt_yield(void)
-{
- Process *proc;
-
- /*
- * Voluntary preemption while preemption is disabled is considered
- * illegal, as not very useful in practice.
- *
- * ASSERT if it happens.
- */
- ASSERT(proc_preemptAllowed());
- IRQ_ASSERT_ENABLED();
-
- IRQ_DISABLE;
- proc = (struct Process *)list_remHead(&proc_ready_list);
- if (proc)
- preempt_switchTo(proc);
- IRQ_ENABLE;
-}
-
-void preempt_init(void)
-{
- MOD_INIT(preempt);
-}
+++ /dev/null
-/**
- * \file
- * <!--
- * This file is part of BeRTOS.
- *
- * Bertos is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As a special exception, you may use this file as part of a free software
- * library without restriction. Specifically, if other files instantiate
- * templates or use macros or inline functions from this file, or you compile
- * this file and link it with other files to produce an executable, this
- * file does not by itself cause the resulting executable to be covered by
- * the GNU General Public License. This exception does not however
- * invalidate any other reasons why the executable file might be covered by
- * the GNU General Public License.
- *
- * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
- *
- * -->
- *
- * \brief Preeptive kernel funtion interfaces.
- *
- * \author Francesco Sacchi <batt@develer.com>
- */
-
-#ifndef KERN_PREEMPT_H
-#define KERN_PREEMPT_H
-
-#include <cfg/compiler.h>
-
-#if CONFIG_KERN_PREEMPT
- INLINE void proc_decQuantum(void)
- {
- extern int _proc_quantum;
- if (_proc_quantum > 0)
- _proc_quantum--;
- }
-#else /* !CONFIG_KERN_PREEMPT */
- #define proc_decQuantum() /* NOP */
-#endif /* CONFIG_KERN_PREEMPT */
-
-#endif /* KERN_PREEMPT_H */
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
+ * \brief Simple preemptive multitasking scheduler.
+ *
+ * Preemption is explicitly regulated at the exit of each interrupt service
+ * routine (ISR). Each task obtains a time quantum as soon as it is scheduled
+ * on the CPU and its quantum is decremented at each clock tick. The frequency
+ * of the timer determines the system tick granularity and CONFIG_KERN_QUANTUM
+ * the time sharing interval.
+ *
+ * When the quantum expires the handler proc_needPreempt() checks if the
+ * preemption is enabled and in this case proc_schedule() is called, that
+ * possibly replaces the current running thread with a different one.
+ *
+ * The preemption can be disabled or enabled via proc_forbid() and
+ * proc_permit() primitives. This is implemented using a global atomic counter.
+ * When the counter is greater than 0 the task cannot be preempted; only when
+ * the counter reaches 0 the task can be preempted again.
+ *
+ * Preemption-disabled sections may be nested. The preemption will be
+ * re-enabled when the outermost preemption-disabled section completes.
+ *
+ * The voluntary preemption still happens via proc_switch() or proc_yield().
+ * The first one assumes the current process has been already added to a
+ * private wait queue (e.g., on a semaphore or a signal), while the second one
+ * takes care of adding the process into the ready queue.
+ *
+ * Context switch is done by CPU-dependent support routines. In case of a
+ * voluntary preemption the context switch routine must take care of
+ * saving/restoring only the callee-save registers (the voluntary-preemption is
+ * actually a function call). The kernel-preemption always happens inside a
+ * signal/interrupt context and it must take care of saving all registers. For
+ * this, in the entry point of each ISR the caller-save registers must be
+ * saved. In the ISR exit point, if the context switch must happen, we switch
+ * to user-context and call the same voluntary context switch routine that take
+ * care of saving/restoring also the callee-save registers. On resume from the
+ * switch, the interrupt exit point moves back to interrupt-context, resumes
+ * the caller-save registers (saved in the ISR entry point) and return from the
+ * interrupt-context.
+ *
+ * \note Thread priority (if enabled by CONFIG_KERN_PRI) defines the order in
+ * the \p proc_ready_list and the capability to deschedule a running process. A
+ * low-priority thread can't preempt a high-priority thread.
+ *
+ * A high-priority process can preempt a low-priority process immediately (it
+ * will be descheduled and replaced in the interrupt exit point). Processes
+ * running at the same priority can be descheduled when they expire the time
+ * quantum.
+ *
+ * \note Sleeping while preemption is disabled fallbacks to a busy-wait sleep.
+ * Voluntary preemption when preemption is disabled raises a kernel bug.
+ *
* -->
*
- * \brief Simple cooperative multitasking scheduler.
+ * \brief Simple cooperative and preemptive multitasking scheduler.
*
* \author Bernie Innocenti <bernie@codewiz.org>
* \author Stefano Fedrigo <aleph@develer.com>
+ * \author Andrea Righi <arighi@develer.com>
*/
#include "proc_p.h"
#endif /* CONFIG_KERN_HEAP */
+/*
+ * Check if the process context switch can be performed directly by the
+ * architecture-dependent asm_switch_context() or if it must be delayed
+ * because we're in the middle of an ISR.
+ *
+ * Return true if asm_switch_context() can be executed, false
+ * otherwise.
+ *
+ * NOTE: if an architecture does not implement IRQ_RUNNING() this function
+ * always returns true.
+ */
+#define CONTEXT_SWITCH_FROM_ISR() (!IRQ_RUNNING())
+
+/*
+ * Save context of old process and switch to new process.
+ */
+static void proc_context_switch(Process *next, Process *prev)
+{
+ cpu_stack_t *dummy;
+
+ if (UNLIKELY(next == prev))
+ return;
+ /*
+ * If there is no old process, we save the old stack pointer into a
+ * dummy variable that we ignore. In fact, this happens only when the
+ * old process has just exited.
+ */
+ asm_switch_context(&next->stack, prev ? &prev->stack : &dummy);
+}
+
static void proc_initStruct(Process *proc)
{
/* Avoid warning for unused argument. */
/**
* Call the scheduler and eventually replace the current running process.
*/
-void proc_schedule(void)
+static void proc_schedule(void)
{
Process *old_process = current_process;
IRQ_DISABLE;
}
if (CONTEXT_SWITCH_FROM_ISR())
- proc_switchTo(current_process, old_process);
+ proc_context_switch(current_process, old_process);
/* This RET resumes the execution on the new process */
LOG_INFO("resuming %p:%s\n", current_process, proc_currentName());
}
+
+#if CONFIG_KERN_PREEMPT
+/* Global preemption nesting counter */
+cpu_atomic_t preempt_count;
+
+/*
+ * The time sharing interval: when a process is scheduled on a CPU it gets an
+ * amount of CONFIG_KERN_QUANTUM clock ticks. When these ticks expires and
+ * preemption is enabled a new process is selected to run.
+ */
+int _proc_quantum;
+
+/**
+ * Check if we need to schedule another task
+ */
+bool proc_needPreempt(void)
+{
+ if (UNLIKELY(current_process == NULL))
+ return false;
+ if (!proc_preemptAllowed())
+ return false;
+ if (LIST_EMPTY(&proc_ready_list))
+ return false;
+ return preempt_quantum() ? prio_next() > prio_curr() :
+ prio_next() >= prio_curr();
+}
+
+/**
+ * Preempt the current task.
+ */
+void proc_preempt(void)
+{
+ IRQ_ASSERT_DISABLED();
+ ASSERT(current_process);
+
+ /* Perform the kernel preemption */
+ LOG_INFO("preempting %p:%s\n", current_process, proc_currentName());
+ /* We are inside a IRQ context, so ATOMIC is not needed here */
+ SCHED_ENQUEUE(current_process);
+ preempt_reset_quantum();
+ proc_schedule();
+}
+#endif /* CONFIG_KERN_PREEMPT */
+
+/* Immediately switch to a particular process */
+static void proc_switchTo(Process *proc)
+{
+ Process *old_process = current_process;
+
+ SCHED_ENQUEUE(current_process);
+ preempt_reset_quantum();
+ current_process = proc;
+ proc_context_switch(current_process, old_process);
+}
+
+/**
+ * Give the control of the CPU to another process.
+ *
+ * \note Assume the current process has been already added to a wait queue.
+ *
+ * \warning This should be considered an internal kernel function, even if it
+ * is allowed, usage from application code is strongly discouraged.
+ */
+void proc_switch(void)
+{
+ ASSERT(proc_preemptAllowed());
+ ATOMIC(
+ preempt_reset_quantum();
+ proc_schedule();
+ );
+}
+
+/**
+ * Immediately wakeup a process, dispatching it to the CPU.
+ */
+void proc_wakeup(Process *proc)
+{
+ ASSERT(proc_preemptAllowed());
+ ASSERT(current_process);
+ IRQ_ASSERT_DISABLED();
+
+ if (prio_proc(proc) >= prio_curr())
+ proc_switchTo(proc);
+ else
+ SCHED_ENQUEUE_HEAD(proc);
+}
+
+/**
+ * Voluntarily release the CPU.
+ */
+void proc_yield(void)
+{
+ Process *proc;
+
+ /*
+ * Voluntary preemption while preemption is disabled is considered
+ * illegal, as not very useful in practice.
+ *
+ * ASSERT if it happens.
+ */
+ ASSERT(proc_preemptAllowed());
+ IRQ_ASSERT_ENABLED();
+
+ IRQ_DISABLE;
+ proc = (struct Process *)list_remHead(&proc_ready_list);
+ if (proc)
+ proc_switchTo(proc);
+ IRQ_ENABLE;
+}
*
* $WIZ$ module_name = "kernel"
* $WIZ$ module_configuration = "bertos/cfg/cfg_proc.h"
- * $WIZ$ module_depends = "switch_ctx", "coop", "preempt"
+ * $WIZ$ module_depends = "switch_ctx"
* $WIZ$ module_supports = "not atmega103"
*/
#include <struct/list.h> // Node, PriNode
#include <cfg/compiler.h>
-
-#if CONFIG_KERN_PREEMPT
- #include <cfg/debug.h> // ASSERT()
- #include <kern/preempt.h>
-#endif
+#include <cfg/debug.h> // ASSERT()
#include <cpu/types.h> // cpu_stack_t
#include <cpu/frame.h> // CPU_SAVED_REGS_CNT
* Public scheduling class methods.
*/
void proc_yield(void);
-void proc_preempt(void);
-int proc_needPreempt(void);
-void proc_wakeup(Process *proc);
-/**
- * Dummy function that defines unimplemented scheduler class methods.
- */
-INLINE void __proc_noop(void)
+#if CONFIG_KERN_PREEMPT
+bool proc_needPreempt(void);
+void proc_preempt(void);
+#else
+INLINE bool proc_needPreempt(void)
{
+ return false;
}
-#if CONFIG_KERN_PREEMPT
- /**
- * Preemptive scheduler public methods.
- */
- #define preempt_yield proc_yield
- #define preempt_needPreempt proc_needPreempt
- #define preempt_preempt proc_preempt
- /**
- * Preemptive scheduler: private methods.
- */
- #define preempt_switch proc_switch
- #define preempt_wakeup proc_wakeup
-#else
- /**
- * Co-operative scheduler: public methods.
- */
- #define coop_yield proc_yield
- #define proc_needPreempt __proc_noop
- #define proc_preempt __proc_noop
- /**
- * Co-operative scheduler: private methods.
- */
- #define coop_switch proc_switch
- #define coop_wakeup proc_wakeup
+INLINE void proc_preempt(void)
+{
+}
#endif
void proc_rename(struct Process *proc, const char *name);
#include <kern/proc.h> // struct Process
-/*
- * Check if the process context switch can be performed directly by the
- * architecture-dependent asm_switch_context() or if it must be delayed
- * because we're in the middle of an ISR.
- *
- * Return true if asm_switch_context() can be executed, false
- * otherwise.
- *
- * NOTE: if an architecture does not implement IRQ_RUNNING() this function
- * always returns true.
- */
-#define CONTEXT_SWITCH_FROM_ISR() (!IRQ_RUNNING())
-
#ifndef asm_switch_context
/**
* CPU dependent context switching routines.
EXTERN_C void asm_switch_context(cpu_stack_t **new_sp, cpu_stack_t **save_sp);
#endif
-/*
- * Save context of old process and switch to new process.
- */
-INLINE void proc_switchTo(Process *next, Process *prev)
-{
- cpu_stack_t *dummy;
-
- if (UNLIKELY(next == prev))
- return;
- /*
- * If there is no old process, we save the old stack pointer into a
- * dummy variable that we ignore. In fact, this happens only when the
- * old process has just exited.
- */
- asm_switch_context(&next->stack, prev ? &prev->stack : &dummy);
-}
-
/**
* \name Flags for Process.flags.
* \{
/* Schedule another process *without* adding the current one to the ready list. */
void proc_switch(void);
-/* Low level scheduling routine. */
-void proc_schedule(void);
-
-/* Low level context switch routine. */
-void proc_switchTo(Process *next, Process *prev);
+/* Immediately schedule a particular process bypassing the scheduler. */
+void proc_wakeup(Process *proc);
/* Initialize a scheduler class. */
void proc_schedInit(void);
void monitor_rename(Process *proc, const char *name);
#endif /* CONFIG_KERN_MONITOR */
+#if CONFIG_KERN_PREEMPT
+INLINE int preempt_quantum(void)
+{
+ extern int _proc_quantum;
+ return _proc_quantum;
+}
+
+INLINE void proc_decQuantum(void)
+{
+ extern int _proc_quantum;
+ if (_proc_quantum > 0)
+ _proc_quantum--;
+}
+
+INLINE void preempt_reset_quantum(void)
+{
+ extern int _proc_quantum;
+ _proc_quantum = CONFIG_KERN_QUANTUM;
+}
+#else /* !CONFIG_KERN_PREEMPT */
+INLINE int preempt_quantum(void)
+{
+ return 0;
+}
+
+INLINE void proc_decQuantum(void)
+{
+}
+
+INLINE void preempt_reset_quantum(void)
+{
+}
+#endif /* CONFIG_KERN_PREEMPT */
+
#endif /* KERN_PROC_P_H */
Currently the kernel code is very stable.
<b> Kernel features </b>:
- \li \link coop.c Cooperative \endlink round-robin scheduling.
+ \li \link preempt.c Cooperative and preemptive \endlink round-robin scheduling.
\li \link monitor.h Stack process monitor \endlink, useful to prevent stack overflows.
\li \link msg.h Inter-process messaging system \endlink (with very low overhead).
\li \link sem.h Binary semaphores \endlink.
bertos/mware/sprintf.c \
bertos/kern/kfile.c \
bertos/kern/proc.c \
- bertos/kern/coop.c \
- bertos/kern/preempt.c \
bertos/kern/proc_test.c \
bertos/kern/signal_test.c \
bertos/kern/monitor.c \
at91sam7s_PREFIX = arm-none-eabi-
-at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug
+at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g
at91sam7s_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_AT91SAM7S256__ -D'CPU_FREQ=(48023000UL)' -D'WIZ_AUTOGEN' -g3 -gdwarf-2 -fverbose-asm -Iexamples/at91sam7 -Ibertos/cpu/arm
at91sam7s_LDFLAGS = -nostartfiles -T bertos/cpu/arm/scripts/at91sam7_256_rom.ld -Wl,--no-warn-mismatch
at91sam7s_CPU = arm7tdmi
bertos/struct/heap.c \
bertos/kern/kfile.c \
bertos/kern/proc.c \
- bertos/kern/coop.c \
- bertos/kern/preempt.c \
bertos/kern/proc_test.c \
bertos/kern/signal_test.c \
bertos/kern/monitor.c \
bertos/struct/heap.c \
bertos/kern/monitor.c \
bertos/drv/timer.c \
- bertos/kern/coop.c \
- bertos/kern/preempt.c \
bertos/cpu/avr/drv/timer_avr.c \
bertos/kern/proc.c \
bertos/mware/formatwr.c \
kernel-core_avr_WIZARD_CSRC = \
bertos/cpu/avr/drv/ser_avr.c \
bertos/drv/ser.c \
- bertos/kern/coop.c \
bertos/kern/proc.c \
bertos/mware/formatwr.c \
bertos/mware/hex.c \
# Files automatically generated by the wizard. DO NOT EDIT, USE kernel-only_arm_USER_CSRC INSTEAD!
kernel-only_arm_WIZARD_CSRC = \
- bertos/kern/coop.c \
bertos/kern/proc.c \
bertos/kern/sem.c \
bertos/kern/signal.c \
# CPU specific flags and options, defined in the CPU definition files.
# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-kernel-only_arm_CPU_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug
+kernel-only_arm_CPU_CPPAFLAGS = -O0 -g -gdwarf-2 -g
kernel-only_arm_CPU_CPPFLAGS = -O0 -g3 -gdwarf-2 -fverbose-asm -Ibertos/cpu/arm/ -D__ARM_AT91SAM7X256__
kernel-only_arm_PROGRAMMER_CPU = at91sam7
kernel-only_arm_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
bertos/mware/resource.c \
bertos/mware/sprintf.c \
bertos/struct/heap.c \
- bertos/kern/coop.c \
- bertos/kern/preempt.c \
bertos/kern/irq.c \
bertos/kern/proc.c \
bertos/kern/proc_test.c \
bertos/kern/monitor.c \
bertos/kern/proc_test.c \
bertos/kern/proc.c \
- bertos/kern/coop.c \
- bertos/kern/preempt.c \
bertos/kern/signal.c \
bertos/cpu/cortex-m3/drv/gpio_lm3s.c \
bertos/cpu/cortex-m3/drv/clock_lm3s.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/kern/proc.c
bertos/kern/signal.c
bertos/kern/sem.c
- bertos/kern/coop.c
bertos/kern/preempt.c
bertos/mware/event.c
bertos/mware/formatwr.c