Merge two at91sam7 project.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 27 Apr 2009 14:06:47 +0000 (14:06 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 27 Apr 2009 14:06:47 +0000 (14:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2674 38d2e660-2303-0410-9eaa-f027e97ec537

20 files changed:
examples/at91sam7/at91sam7s.c [new file with mode: 0644]
examples/at91sam7/at91sam7s.mk [new file with mode: 0644]
examples/at91sam7/cfg/cfg_monitor.h [new file with mode: 0644]
examples/at91sam7/cfg/cfg_proc.h [new file with mode: 0644]
examples/at91sam7/cfg/cfg_sem.h [new file with mode: 0644]
examples/at91sam7/cfg/cfg_ser.h [new file with mode: 0644]
examples/at91sam7/cfg/cfg_signal.h [new file with mode: 0644]
examples/at91sam7/cfg/cfg_timer.h [new file with mode: 0644]
examples/at91sam7/hw/hw_ser.h [new file with mode: 0644]
examples/at91sam7/verstag.h [new file with mode: 0644]
examples/at91sam7s/at91sam7s.c [deleted file]
examples/at91sam7s/at91sam7s.mk [deleted file]
examples/at91sam7s/cfg/cfg_monitor.h [deleted file]
examples/at91sam7s/cfg/cfg_proc.h [deleted file]
examples/at91sam7s/cfg/cfg_sem.h [deleted file]
examples/at91sam7s/cfg/cfg_ser.h [deleted file]
examples/at91sam7s/cfg/cfg_signal.h [deleted file]
examples/at91sam7s/cfg/cfg_timer.h [deleted file]
examples/at91sam7s/hw/hw_ser.h [deleted file]
examples/at91sam7s/verstag.h [deleted file]

diff --git a/examples/at91sam7/at91sam7s.c b/examples/at91sam7/at91sam7s.c
new file mode 100644 (file)
index 0000000..04ee19f
--- /dev/null
@@ -0,0 +1,189 @@
+/**
+ * \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 2009 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \version $Id$
+ *
+ * \author Francesco Sacchi <batt@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
+ *
+ * \brief Simple BeRTOS test on AT91SAM7X-EK evaluation board.
+ *
+ * This short program shows you a simple demo of some BeRTOS feature:
+ *
+ * - Debug system
+ * - Timer interrupt
+ * - Serial
+ * - Cooperative BeRTOS Kernel
+ *
+ */
+
+#include "cfg/cfg_ser.h"
+#include <cfg/macros.h>
+
+#include <kern/proc.h>
+
+#include <cpu/detect.h>
+
+#include <drv/timer.h>
+#include <drv/sysirq_at91.h>
+#include <drv/ser.h>
+
+#include <io/arm.h>
+
+Timer leds_timer;
+Serial ser_fd;
+
+enum
+{
+       FORWARD,
+       BACKWARD,
+};
+
+int direction = FORWARD;
+
+static void leds_init(void)
+{
+       #if CPU_ARM_AT91SAM7X256
+               /* Set PB19..22 connected to PIOB */
+               PIOB_PER  = 0x780000;
+               /* Set PB19..22 as output */
+               PIOB_OER  = 0x780000;
+
+               /* Set PB19..22 to 1 to turn off leds */
+               PIOB_SODR  = 0x780000;
+
+               /* turn first led on (PB19) */
+               PIOB_CODR  = 0x80000;
+       #elif CPU_ARM_AT91SAM7S256
+               /* Set PA0..3 connected to PIOA */
+               PIOA_PER  = 0x0000001f;
+               /* Set PA0..3 as output */
+               PIOA_OER  = 0x0000001f;
+
+               /* Set PA0..3 to 1 to turn off leds */
+               PIOA_SODR  = 0x0000000f;
+               /* turn first led on (PA0) */
+               PIOA_CODR  = 0x00000001;
+       #endif
+}
+
+#if CPU_ARM_AT91SAM7X256
+       #define GET_PIO_STATUS()  (~PIOB_ODSR & 0x780000)
+       #define LAST_LED                        0x200000
+       #define FIRST_LED                       0x100000
+       #define SET_PIO_BITS                    PIOB_SODR
+       #define CLEAR_PIO_BITS                  PIOB_CODR
+       #define AT91SAM7_MSG      "BeRTOS is run on AT91SAM7X256..\n"
+#elif CPU_ARM_AT91SAM7S256
+       #define GET_PIO_STATUS()  (~PIOA_ODSR & 0x0000000f)
+       #define LAST_LED                        0x00000004
+       #define FIRST_LED                       0x00000002
+       #define SET_PIO_BITS                    PIOA_SODR
+       #define CLEAR_PIO_BITS                  PIOA_CODR
+       #define AT91SAM7_MSG      "BeRTOS is run on AT91SAM7S256..\n"
+#endif
+
+/*
+ * Knight Rider leds effect..
+ */
+static void leds_toggle(void)
+{
+       uint32_t led_status = GET_PIO_STATUS();
+
+       // Turn on led in forward direction
+       if (direction == FORWARD)
+       {
+               if(led_status == LAST_LED)
+                       direction = BACKWARD;
+
+               SET_PIO_BITS = led_status;
+               CLEAR_PIO_BITS = led_status << 1;
+       }
+       // Turn on led in backward direction
+       else if (direction == BACKWARD)
+       {
+               if(led_status == FIRST_LED)
+                       direction = FORWARD;
+
+               SET_PIO_BITS = led_status;
+               CLEAR_PIO_BITS = led_status >> 1;
+       }
+
+       /* Wait for interval time */
+       timer_setDelay(&leds_timer, ms_to_ticks(100));
+       timer_add(&leds_timer);
+}
+
+int main(void)
+{      char msg[]="BeRTOS, be fast be beatiful be realtime";
+
+
+       kdbg_init();
+       timer_init();
+       proc_init();
+       leds_init();
+
+       ASSERT(!IRQ_ENABLED());
+
+       /* Open the main communication port */
+       ser_init(&ser_fd, 0);
+       ser_setbaudrate(&ser_fd, 115200);
+       ser_setparity(&ser_fd, SER_PARITY_NONE);
+
+       IRQ_ENABLE;
+       ASSERT(IRQ_ENABLED());
+
+       /*
+        * Register timer and arm timer interupt.
+        */
+       timer_setSoftint(&leds_timer, (Hook)leds_toggle, 0);
+       timer_setDelay(&leds_timer, ms_to_ticks(100));
+       timer_add(&leds_timer);
+
+       /*
+        * Run process test.
+        */
+       if(!proc_testRun())
+               kfile_printf(&ser_fd.fd, "ProcTest..ok!\n");
+       else
+               kfile_printf(&ser_fd.fd, "ProcTest..FAIL!\n");
+
+
+       kputs(AT91SAM7_MSG);
+
+       // Main loop
+       for(;;)
+       {
+               kfile_printf(&ser_fd.fd, "From serial 0: %s\r\n", msg);
+       }
+       return 0;
+}
diff --git a/examples/at91sam7/at91sam7s.mk b/examples/at91sam7/at91sam7s.mk
new file mode 100644 (file)
index 0000000..d4585d2
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# $Id: at91sam7s.mk 18234 2007-10-08 13:39:48Z rasky $
+# Copyright 2006 Develer S.r.l. (http://www.develer.com/)
+# All rights reserved.
+#
+# Makefile fragment for DevLib at91sam7s application.
+#
+# Author: Bernie Innocenti <bernie@codewiz.org>
+#
+#
+
+# Set to 1 for debug builds
+at91sam7s_DEBUG = 1
+
+# Our target application
+TRG += at91sam7s
+
+at91sam7s_CSRC = \
+       examples/at91sam7s/at91sam7s.c \
+       bertos/drv/timer.c \
+       bertos/drv/ser.c \
+       bertos/cpu/arm/drv/sysirq_at91.c \
+       bertos/cpu/arm/drv/ser_at91.c \
+       bertos/cpu/arm/drv/timer_at91.c \
+       bertos/mware/event.c \
+       bertos/mware/formatwr.c \
+       bertos/mware/hex.c \
+       bertos/kern/kfile.c \
+       bertos/kern/proc.c \
+       bertos/kern/coop.c \
+       bertos/kern/proc_test.c \
+       bertos/kern/monitor.c \
+       bertos/kern/signal.c \
+       #
+
+at91sam7s_CPPASRC = \
+       bertos/cpu/arm/hw/crtat91sam7_rom.S \
+       bertos/cpu/arm/hw/switch_ctx_arm.S \
+       #
+
+at91sam7s_PREFIX = arm-none-eabi-
+
+at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug
+at91sam7s_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_AT91SAM7S256__ -D'CPU_FREQ=(48023000UL)' -D'WIZ_AUTOGEN' -g3 -gdwarf-2 -fverbose-asm -Iexamples/at91sam7s -Ibertos/cpu/arm
+at91sam7s_LDFLAGS = -nostartfiles -T bertos/cpu/arm/scripts/at91sam7_256_rom.ld -Wl,--no-warn-mismatch
+
+at91sam7s_CPU = arm7tdmi
+
diff --git a/examples/at91sam7/cfg/cfg_monitor.h b/examples/at91sam7/cfg/cfg_monitor.h
new file mode 100644 (file)
index 0000000..6391b40
--- /dev/null
@@ -0,0 +1,48 @@
+/**
+ * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
+ * -->
+ *
+ * \brief Kernel monitor configuration parameters
+ *
+ * \version $Id$
+ * \author Bernie Innocenti <bernie@codewiz.org>
+ */
+
+#ifndef CFG_MONITOR_H
+#define CFG_MONITOR_H
+
+/**
+ * Process monitor.
+ * $WIZ$ type = "autoenabled"
+ */
+#define CONFIG_KERN_MONITOR 1
+
+#endif /*  CFG_MONITOR_H */
diff --git a/examples/at91sam7/cfg/cfg_proc.h b/examples/at91sam7/cfg/cfg_proc.h
new file mode 100644 (file)
index 0000000..9f5f3a2
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
+ * -->
+ *
+ * \brief Kernel configuration parameters
+ *
+ * \version $Id$
+ * \author Bernie Innocenti <bernie@codewiz.org>
+ */
+
+#ifndef CFG_PROC_H
+#define CFG_PROC_H
+
+/**
+ * Enable the multithreading kernel.
+ *
+ * $WIZ$ type = "autoenabled"
+ */
+#define CONFIG_KERN 1
+
+/**
+ * Kernel interrupt supervisor.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_IRQ 0
+
+/**
+ * Dynamic memory allocation for processes.
+ *
+ * $WIZ$ type = "boolean"
+ * $WIZ$ supports = "False"
+ */
+#define CONFIG_KERN_HEAP 0
+
+/**
+ * Preemptive process scheduling. WARNING: Experimental, still incomplete!
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_PREEMPT 0
+
+/**
+ * Priority-based scheduling policy.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_PRI 0
+
+/**
+ * Time sharing quantum (a prime number prevents interference effects) [ms].
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = "0"
+ */
+#define CONFIG_KERN_QUANTUM 47
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define KERN_LOG_LEVEL LOG_LVL_ERR
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define KERN_LOG_FORMAT LOG_FMT_VERBOSE
+
+#endif /*  CFG_PROC_H */
diff --git a/examples/at91sam7/cfg/cfg_sem.h b/examples/at91sam7/cfg/cfg_sem.h
new file mode 100644 (file)
index 0000000..86ed110
--- /dev/null
@@ -0,0 +1,48 @@
+/**
+ * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
+ * -->
+ *
+ * \brief Kernel semaphores configuration parameters.
+ *
+ * \version $Id$
+ * \author Bernie Innocenti <bernie@codewiz.org>
+ */
+
+#ifndef CFG_SEM_H
+#define CFG_SEM_H
+
+/**
+ * Re-entrant mutual exclusion primitives.
+ * $WIZ$ type = "autoenabled"
+ */
+#define CONFIG_KERN_SEMAPHORES  1
+
+#endif /*  CFG_SEM_H */
diff --git a/examples/at91sam7/cfg/cfg_ser.h b/examples/at91sam7/cfg/cfg_ser.h
new file mode 100644 (file)
index 0000000..27b14c3
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * \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 2008 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for serial module.
+ *
+ * \version $Id$
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_SER_H
+#define CFG_SER_H
+
+/**
+ * Example of setting for serial port and
+ * spi port.
+ * Edit these define for your project.
+ */
+
+/// [bytes] Size of the outbound FIFO buffer for port 0.
+#define CONFIG_UART0_TXBUFSIZE  32
+
+/// [bytes] Size of the inbound FIFO buffer for port 0.
+#define CONFIG_UART0_RXBUFSIZE  32
+
+/// [bytes] Size of the outbound FIFO buffer for port 1.
+#define CONFIG_UART1_TXBUFSIZE  32
+
+/// [bytes] Size of the inbound FIFO buffer for port 1.
+#define CONFIG_UART1_RXBUFSIZE  32
+
+
+/// [bytes] Size of the outbound FIFO buffer for SPI port (AVR only)
+#define CONFIG_SPI_TXBUFSIZE    32
+
+/// [bytes] Size of the inbound FIFO buffer for SPI port (AVR only)
+#define CONFIG_SPI_RXBUFSIZE    32
+
+/// [bytes] Size of the outbound FIFO buffer for SPI port 0.
+#define CONFIG_SPI0_TXBUFSIZE  32
+
+/// [bytes] Size of the inbound FIFO buffer for SPI port 0.
+#define CONFIG_SPI0_RXBUFSIZE  32
+
+/// [bytes] Size of the outbound FIFO buffer for SPI port 1.
+#define CONFIG_SPI1_TXBUFSIZE  32
+
+/// [bytes] Size of the inbound FIFO buffer for SPI port 1.
+#define CONFIG_SPI1_RXBUFSIZE  32
+
+/// SPI data order (AVR only).
+#define CONFIG_SPI_DATA_ORDER  SER_MSB_FIRST
+
+/// SPI clock division factor (AVR only).
+#define CONFIG_SPI_CLOCK_DIV   16
+
+/// SPI clock polarity: 0 = normal low, 1 = normal high (AVR only).
+#define CONFIG_SPI_CLOCK_POL   0
+
+/// SPI clock phase: 0 = sample on first edge, 1 = sample on second clock edge (AVR only).
+#define CONFIG_SPI_CLOCK_PHASE 0
+
+/// Default transmit timeout (ms). Set to -1 to disable timeout support.
+#define CONFIG_SER_TXTIMEOUT    -1
+
+/// Default receive timeout (ms). Set to -1 to disable timeout support.
+#define CONFIG_SER_RXTIMEOUT    -1
+
+/// Use RTS/CTS handshake
+#define CONFIG_SER_HWHANDSHAKE   0
+
+/// Default baud rate (set to 0 to disable).
+#define CONFIG_SER_DEFBAUDRATE   0
+
+/// For serial debug.
+#define CONFIG_SER_STROBE        0
+
+#endif /* CFG_SER_H */
diff --git a/examples/at91sam7/cfg/cfg_signal.h b/examples/at91sam7/cfg/cfg_signal.h
new file mode 100644 (file)
index 0000000..ed85119
--- /dev/null
@@ -0,0 +1,48 @@
+/**
+ * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
+ * -->
+ *
+ * \brief Kernel signals configuration parameters
+ *
+ * \version $Id$
+ * \author Bernie Innocenti <bernie@codewiz.org>
+ */
+
+#ifndef CFG_SIGNAL_H
+#define CFG_SIGNAL_H
+
+/**
+ * Inter-process signals.
+ * $WIZ$ type = "autoenabled"
+ */
+#define CONFIG_KERN_SIGNALS 1
+
+#endif /*  CFG_SIGNAL_H */
diff --git a/examples/at91sam7/cfg/cfg_timer.h b/examples/at91sam7/cfg/cfg_timer.h
new file mode 100644 (file)
index 0000000..9d8357e
--- /dev/null
@@ -0,0 +1,55 @@
+/**
+ * \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 2008 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for timer module.
+ *
+ * \version $Id$
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_TIMER_H
+#define CFG_TIMER_H
+
+/// Hardware timer selection for drv/timer.c
+#define CONFIG_TIMER TIMER_DEFAULT
+
+/// Debug timer interrupt using a strobe pin.
+#define CONFIG_TIMER_STROBE  0
+
+/// Enable asynchronous timers
+#define CONFIG_TIMER_EVENTS  1
+
+/// Support hi-res timer_usleep()
+#define CONFIG_TIMER_UDELAY  1
+
+#endif /* CFG_TIMER_H */
diff --git a/examples/at91sam7/hw/hw_ser.h b/examples/at91sam7/hw/hw_ser.h
new file mode 100644 (file)
index 0000000..7b98f22
--- /dev/null
@@ -0,0 +1,40 @@
+/**
+ * \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 2006 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Serial hardware-specific definitions
+ *
+ * \version $Id$
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+
diff --git a/examples/at91sam7/verstag.h b/examples/at91sam7/verstag.h
new file mode 100644 (file)
index 0000000..e616390
--- /dev/null
@@ -0,0 +1,94 @@
+/**
+ * \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 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2001, 2002, 2003 by Bernie Innocenti <bernie@codewiz.org>
+ *
+ * -->
+ *
+ * \version $Id$
+ *
+ * \author Bernie Innocenti <bernie@codewiz.org>
+ *
+ * \brief Declare application version strings
+ */
+#ifndef DEVLIB_VERSTAG_H
+#define DEVLIB_VERSTAG_H
+
+#ifndef ARCH_CONFIG_H
+       #include "cfg/arch_config.h"
+#endif
+
+#define APP_NAME "AT91SAM7S-EK porting test"
+#define APP_DESCRIPTION "AT91SAM7S-EK porting test"
+#define APP_AUTHOR "Develer"
+#define APP_COPYRIGHT "Copyright 2007 Develer (http://www.develer.com/)"
+
+#define VERS_MAJOR 0
+#define VERS_MINOR 1
+#define VERS_REV   0
+#define VERS_LETTER ""
+
+/**
+ * If _SNAPSHOT is defined, \c VERS_TAG contains the build date
+ * date instead of a numeric version string.
+ */
+//#define _SNAPSHOT
+
+#ifdef _DEBUG
+       #define VERS_DBG "D"
+#else
+       #define VERS_DBG ""
+#endif
+
+#define __STRINGIZE(x) #x
+#define _STRINGIZE(x) __STRINGIZE(x)
+
+/** Build application version string (i.e.: "1.7.0") */
+#define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG
+#ifdef _SNAPSHOT
+       #define VERS_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
+#else
+       #define VERS_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
+#endif
+
+/** Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */
+#define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld)
+#define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
+
+/** The revision string (contains VERS_TAG) */
+extern const char vers_tag[];
+
+/** Sequential build number (contains VERS_BUILD) */
+extern const int vers_build_nr;
+//extern const char vers_build_str[];
+
+/** Hostname of the machine used to build this binary (contains VERS_HOST) */
+extern const char vers_host[];
+
+#endif /* DEVLIB_VERSTAG_H */
diff --git a/examples/at91sam7s/at91sam7s.c b/examples/at91sam7s/at91sam7s.c
deleted file mode 100644 (file)
index 04ee19f..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * \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 2009 Develer S.r.l. (http://www.develer.com/)
- *
- * -->
- *
- * \version $Id$
- *
- * \author Francesco Sacchi <batt@develer.com>
- * \author Daniele Basile <asterix@develer.com>
- *
- * \brief Simple BeRTOS test on AT91SAM7X-EK evaluation board.
- *
- * This short program shows you a simple demo of some BeRTOS feature:
- *
- * - Debug system
- * - Timer interrupt
- * - Serial
- * - Cooperative BeRTOS Kernel
- *
- */
-
-#include "cfg/cfg_ser.h"
-#include <cfg/macros.h>
-
-#include <kern/proc.h>
-
-#include <cpu/detect.h>
-
-#include <drv/timer.h>
-#include <drv/sysirq_at91.h>
-#include <drv/ser.h>
-
-#include <io/arm.h>
-
-Timer leds_timer;
-Serial ser_fd;
-
-enum
-{
-       FORWARD,
-       BACKWARD,
-};
-
-int direction = FORWARD;
-
-static void leds_init(void)
-{
-       #if CPU_ARM_AT91SAM7X256
-               /* Set PB19..22 connected to PIOB */
-               PIOB_PER  = 0x780000;
-               /* Set PB19..22 as output */
-               PIOB_OER  = 0x780000;
-
-               /* Set PB19..22 to 1 to turn off leds */
-               PIOB_SODR  = 0x780000;
-
-               /* turn first led on (PB19) */
-               PIOB_CODR  = 0x80000;
-       #elif CPU_ARM_AT91SAM7S256
-               /* Set PA0..3 connected to PIOA */
-               PIOA_PER  = 0x0000001f;
-               /* Set PA0..3 as output */
-               PIOA_OER  = 0x0000001f;
-
-               /* Set PA0..3 to 1 to turn off leds */
-               PIOA_SODR  = 0x0000000f;
-               /* turn first led on (PA0) */
-               PIOA_CODR  = 0x00000001;
-       #endif
-}
-
-#if CPU_ARM_AT91SAM7X256
-       #define GET_PIO_STATUS()  (~PIOB_ODSR & 0x780000)
-       #define LAST_LED                        0x200000
-       #define FIRST_LED                       0x100000
-       #define SET_PIO_BITS                    PIOB_SODR
-       #define CLEAR_PIO_BITS                  PIOB_CODR
-       #define AT91SAM7_MSG      "BeRTOS is run on AT91SAM7X256..\n"
-#elif CPU_ARM_AT91SAM7S256
-       #define GET_PIO_STATUS()  (~PIOA_ODSR & 0x0000000f)
-       #define LAST_LED                        0x00000004
-       #define FIRST_LED                       0x00000002
-       #define SET_PIO_BITS                    PIOA_SODR
-       #define CLEAR_PIO_BITS                  PIOA_CODR
-       #define AT91SAM7_MSG      "BeRTOS is run on AT91SAM7S256..\n"
-#endif
-
-/*
- * Knight Rider leds effect..
- */
-static void leds_toggle(void)
-{
-       uint32_t led_status = GET_PIO_STATUS();
-
-       // Turn on led in forward direction
-       if (direction == FORWARD)
-       {
-               if(led_status == LAST_LED)
-                       direction = BACKWARD;
-
-               SET_PIO_BITS = led_status;
-               CLEAR_PIO_BITS = led_status << 1;
-       }
-       // Turn on led in backward direction
-       else if (direction == BACKWARD)
-       {
-               if(led_status == FIRST_LED)
-                       direction = FORWARD;
-
-               SET_PIO_BITS = led_status;
-               CLEAR_PIO_BITS = led_status >> 1;
-       }
-
-       /* Wait for interval time */
-       timer_setDelay(&leds_timer, ms_to_ticks(100));
-       timer_add(&leds_timer);
-}
-
-int main(void)
-{      char msg[]="BeRTOS, be fast be beatiful be realtime";
-
-
-       kdbg_init();
-       timer_init();
-       proc_init();
-       leds_init();
-
-       ASSERT(!IRQ_ENABLED());
-
-       /* Open the main communication port */
-       ser_init(&ser_fd, 0);
-       ser_setbaudrate(&ser_fd, 115200);
-       ser_setparity(&ser_fd, SER_PARITY_NONE);
-
-       IRQ_ENABLE;
-       ASSERT(IRQ_ENABLED());
-
-       /*
-        * Register timer and arm timer interupt.
-        */
-       timer_setSoftint(&leds_timer, (Hook)leds_toggle, 0);
-       timer_setDelay(&leds_timer, ms_to_ticks(100));
-       timer_add(&leds_timer);
-
-       /*
-        * Run process test.
-        */
-       if(!proc_testRun())
-               kfile_printf(&ser_fd.fd, "ProcTest..ok!\n");
-       else
-               kfile_printf(&ser_fd.fd, "ProcTest..FAIL!\n");
-
-
-       kputs(AT91SAM7_MSG);
-
-       // Main loop
-       for(;;)
-       {
-               kfile_printf(&ser_fd.fd, "From serial 0: %s\r\n", msg);
-       }
-       return 0;
-}
diff --git a/examples/at91sam7s/at91sam7s.mk b/examples/at91sam7s/at91sam7s.mk
deleted file mode 100644 (file)
index d4585d2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# $Id: at91sam7s.mk 18234 2007-10-08 13:39:48Z rasky $
-# Copyright 2006 Develer S.r.l. (http://www.develer.com/)
-# All rights reserved.
-#
-# Makefile fragment for DevLib at91sam7s application.
-#
-# Author: Bernie Innocenti <bernie@codewiz.org>
-#
-#
-
-# Set to 1 for debug builds
-at91sam7s_DEBUG = 1
-
-# Our target application
-TRG += at91sam7s
-
-at91sam7s_CSRC = \
-       examples/at91sam7s/at91sam7s.c \
-       bertos/drv/timer.c \
-       bertos/drv/ser.c \
-       bertos/cpu/arm/drv/sysirq_at91.c \
-       bertos/cpu/arm/drv/ser_at91.c \
-       bertos/cpu/arm/drv/timer_at91.c \
-       bertos/mware/event.c \
-       bertos/mware/formatwr.c \
-       bertos/mware/hex.c \
-       bertos/kern/kfile.c \
-       bertos/kern/proc.c \
-       bertos/kern/coop.c \
-       bertos/kern/proc_test.c \
-       bertos/kern/monitor.c \
-       bertos/kern/signal.c \
-       #
-
-at91sam7s_CPPASRC = \
-       bertos/cpu/arm/hw/crtat91sam7_rom.S \
-       bertos/cpu/arm/hw/switch_ctx_arm.S \
-       #
-
-at91sam7s_PREFIX = arm-none-eabi-
-
-at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug
-at91sam7s_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_AT91SAM7S256__ -D'CPU_FREQ=(48023000UL)' -D'WIZ_AUTOGEN' -g3 -gdwarf-2 -fverbose-asm -Iexamples/at91sam7s -Ibertos/cpu/arm
-at91sam7s_LDFLAGS = -nostartfiles -T bertos/cpu/arm/scripts/at91sam7_256_rom.ld -Wl,--no-warn-mismatch
-
-at91sam7s_CPU = arm7tdmi
-
diff --git a/examples/at91sam7s/cfg/cfg_monitor.h b/examples/at91sam7s/cfg/cfg_monitor.h
deleted file mode 100644 (file)
index 6391b40..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Kernel monitor configuration parameters
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- */
-
-#ifndef CFG_MONITOR_H
-#define CFG_MONITOR_H
-
-/**
- * Process monitor.
- * $WIZ$ type = "autoenabled"
- */
-#define CONFIG_KERN_MONITOR 1
-
-#endif /*  CFG_MONITOR_H */
diff --git a/examples/at91sam7s/cfg/cfg_proc.h b/examples/at91sam7s/cfg/cfg_proc.h
deleted file mode 100644 (file)
index 9f5f3a2..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Kernel configuration parameters
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- */
-
-#ifndef CFG_PROC_H
-#define CFG_PROC_H
-
-/**
- * Enable the multithreading kernel.
- *
- * $WIZ$ type = "autoenabled"
- */
-#define CONFIG_KERN 1
-
-/**
- * Kernel interrupt supervisor.
- * $WIZ$ type = "boolean"
- */
-#define CONFIG_KERN_IRQ 0
-
-/**
- * Dynamic memory allocation for processes.
- *
- * $WIZ$ type = "boolean"
- * $WIZ$ supports = "False"
- */
-#define CONFIG_KERN_HEAP 0
-
-/**
- * Preemptive process scheduling. WARNING: Experimental, still incomplete!
- *
- * $WIZ$ type = "boolean"
- */
-#define CONFIG_KERN_PREEMPT 0
-
-/**
- * Priority-based scheduling policy.
- * $WIZ$ type = "boolean"
- */
-#define CONFIG_KERN_PRI 0
-
-/**
- * Time sharing quantum (a prime number prevents interference effects) [ms].
- *
- * $WIZ$ type = "int"
- * $WIZ$ min = "0"
- */
-#define CONFIG_KERN_QUANTUM 47
-
-/**
- * Module logging level.
- *
- * $WIZ$ type = "enum"
- * $WIZ$ value_list = "log_level"
- */
-#define KERN_LOG_LEVEL LOG_LVL_ERR
-
-/**
- * Module logging format.
- *
- * $WIZ$ type = "enum"
- * $WIZ$ value_list = "log_format"
- */
-#define KERN_LOG_FORMAT LOG_FMT_VERBOSE
-
-#endif /*  CFG_PROC_H */
diff --git a/examples/at91sam7s/cfg/cfg_sem.h b/examples/at91sam7s/cfg/cfg_sem.h
deleted file mode 100644 (file)
index 86ed110..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Kernel semaphores configuration parameters.
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- */
-
-#ifndef CFG_SEM_H
-#define CFG_SEM_H
-
-/**
- * Re-entrant mutual exclusion primitives.
- * $WIZ$ type = "autoenabled"
- */
-#define CONFIG_KERN_SEMAPHORES  1
-
-#endif /*  CFG_SEM_H */
diff --git a/examples/at91sam7s/cfg/cfg_ser.h b/examples/at91sam7s/cfg/cfg_ser.h
deleted file mode 100644 (file)
index 27b14c3..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * \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 2008 Develer S.r.l. (http://www.develer.com/)
- * All Rights Reserved.
- * -->
- *
- * \brief Configuration file for serial module.
- *
- * \version $Id$
- *
- * \author Daniele Basile <asterix@develer.com>
- */
-
-#ifndef CFG_SER_H
-#define CFG_SER_H
-
-/**
- * Example of setting for serial port and
- * spi port.
- * Edit these define for your project.
- */
-
-/// [bytes] Size of the outbound FIFO buffer for port 0.
-#define CONFIG_UART0_TXBUFSIZE  32
-
-/// [bytes] Size of the inbound FIFO buffer for port 0.
-#define CONFIG_UART0_RXBUFSIZE  32
-
-/// [bytes] Size of the outbound FIFO buffer for port 1.
-#define CONFIG_UART1_TXBUFSIZE  32
-
-/// [bytes] Size of the inbound FIFO buffer for port 1.
-#define CONFIG_UART1_RXBUFSIZE  32
-
-
-/// [bytes] Size of the outbound FIFO buffer for SPI port (AVR only)
-#define CONFIG_SPI_TXBUFSIZE    32
-
-/// [bytes] Size of the inbound FIFO buffer for SPI port (AVR only)
-#define CONFIG_SPI_RXBUFSIZE    32
-
-/// [bytes] Size of the outbound FIFO buffer for SPI port 0.
-#define CONFIG_SPI0_TXBUFSIZE  32
-
-/// [bytes] Size of the inbound FIFO buffer for SPI port 0.
-#define CONFIG_SPI0_RXBUFSIZE  32
-
-/// [bytes] Size of the outbound FIFO buffer for SPI port 1.
-#define CONFIG_SPI1_TXBUFSIZE  32
-
-/// [bytes] Size of the inbound FIFO buffer for SPI port 1.
-#define CONFIG_SPI1_RXBUFSIZE  32
-
-/// SPI data order (AVR only).
-#define CONFIG_SPI_DATA_ORDER  SER_MSB_FIRST
-
-/// SPI clock division factor (AVR only).
-#define CONFIG_SPI_CLOCK_DIV   16
-
-/// SPI clock polarity: 0 = normal low, 1 = normal high (AVR only).
-#define CONFIG_SPI_CLOCK_POL   0
-
-/// SPI clock phase: 0 = sample on first edge, 1 = sample on second clock edge (AVR only).
-#define CONFIG_SPI_CLOCK_PHASE 0
-
-/// Default transmit timeout (ms). Set to -1 to disable timeout support.
-#define CONFIG_SER_TXTIMEOUT    -1
-
-/// Default receive timeout (ms). Set to -1 to disable timeout support.
-#define CONFIG_SER_RXTIMEOUT    -1
-
-/// Use RTS/CTS handshake
-#define CONFIG_SER_HWHANDSHAKE   0
-
-/// Default baud rate (set to 0 to disable).
-#define CONFIG_SER_DEFBAUDRATE   0
-
-/// For serial debug.
-#define CONFIG_SER_STROBE        0
-
-#endif /* CFG_SER_H */
diff --git a/examples/at91sam7s/cfg/cfg_signal.h b/examples/at91sam7s/cfg/cfg_signal.h
deleted file mode 100644 (file)
index ed85119..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * \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 2001, 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
- * -->
- *
- * \brief Kernel signals configuration parameters
- *
- * \version $Id$
- * \author Bernie Innocenti <bernie@codewiz.org>
- */
-
-#ifndef CFG_SIGNAL_H
-#define CFG_SIGNAL_H
-
-/**
- * Inter-process signals.
- * $WIZ$ type = "autoenabled"
- */
-#define CONFIG_KERN_SIGNALS 1
-
-#endif /*  CFG_SIGNAL_H */
diff --git a/examples/at91sam7s/cfg/cfg_timer.h b/examples/at91sam7s/cfg/cfg_timer.h
deleted file mode 100644 (file)
index 9d8357e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * \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 2008 Develer S.r.l. (http://www.develer.com/)
- * All Rights Reserved.
- * -->
- *
- * \brief Configuration file for timer module.
- *
- * \version $Id$
- *
- * \author Daniele Basile <asterix@develer.com>
- */
-
-#ifndef CFG_TIMER_H
-#define CFG_TIMER_H
-
-/// Hardware timer selection for drv/timer.c
-#define CONFIG_TIMER TIMER_DEFAULT
-
-/// Debug timer interrupt using a strobe pin.
-#define CONFIG_TIMER_STROBE  0
-
-/// Enable asynchronous timers
-#define CONFIG_TIMER_EVENTS  1
-
-/// Support hi-res timer_usleep()
-#define CONFIG_TIMER_UDELAY  1
-
-#endif /* CFG_TIMER_H */
diff --git a/examples/at91sam7s/hw/hw_ser.h b/examples/at91sam7s/hw/hw_ser.h
deleted file mode 100644 (file)
index 7b98f22..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * \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 2006 Develer S.r.l. (http://www.develer.com/)
- * All Rights Reserved.
- * -->
- *
- * \brief Serial hardware-specific definitions
- *
- * \version $Id$
- *
- * \author Daniele Basile <asterix@develer.com>
- */
-
-
diff --git a/examples/at91sam7s/verstag.h b/examples/at91sam7s/verstag.h
deleted file mode 100644 (file)
index e616390..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * \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 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2001, 2002, 2003 by Bernie Innocenti <bernie@codewiz.org>
- *
- * -->
- *
- * \version $Id$
- *
- * \author Bernie Innocenti <bernie@codewiz.org>
- *
- * \brief Declare application version strings
- */
-#ifndef DEVLIB_VERSTAG_H
-#define DEVLIB_VERSTAG_H
-
-#ifndef ARCH_CONFIG_H
-       #include "cfg/arch_config.h"
-#endif
-
-#define APP_NAME "AT91SAM7S-EK porting test"
-#define APP_DESCRIPTION "AT91SAM7S-EK porting test"
-#define APP_AUTHOR "Develer"
-#define APP_COPYRIGHT "Copyright 2007 Develer (http://www.develer.com/)"
-
-#define VERS_MAJOR 0
-#define VERS_MINOR 1
-#define VERS_REV   0
-#define VERS_LETTER ""
-
-/**
- * If _SNAPSHOT is defined, \c VERS_TAG contains the build date
- * date instead of a numeric version string.
- */
-//#define _SNAPSHOT
-
-#ifdef _DEBUG
-       #define VERS_DBG "D"
-#else
-       #define VERS_DBG ""
-#endif
-
-#define __STRINGIZE(x) #x
-#define _STRINGIZE(x) __STRINGIZE(x)
-
-/** Build application version string (i.e.: "1.7.0") */
-#define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG
-#ifdef _SNAPSHOT
-       #define VERS_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
-#else
-       #define VERS_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
-#endif
-
-/** Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */
-#define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld)
-#define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
-
-/** The revision string (contains VERS_TAG) */
-extern const char vers_tag[];
-
-/** Sequential build number (contains VERS_BUILD) */
-extern const int vers_build_nr;
-//extern const char vers_build_str[];
-
-/** Hostname of the machine used to build this binary (contains VERS_HOST) */
-extern const char vers_host[];
-
-#endif /* DEVLIB_VERSTAG_H */