Update triface empty and kernel templates and enable them in nightly test.
authorlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 27 May 2011 10:27:23 +0000 (10:27 +0000)
committerlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 27 May 2011 10:27:23 +0000 (10:27 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4934 38d2e660-2303-0410-9eaa-f027e97ec537

27 files changed:
Makefile.test
boards/triface/templates/triface_empty/cfg/cfg_adc.h
boards/triface/templates/triface_empty/cfg/cfg_dac.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_eeprom.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_led_7seg.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_lwip.h
boards/triface/templates/triface_empty/cfg/cfg_nand.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_proc.h
boards/triface/templates/triface_empty/cfg/cfg_pwm.h
boards/triface/templates/triface_empty/cfg/cfg_random.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_tftp.h [new file with mode: 0644]
boards/triface/templates/triface_empty/cfg/cfg_usb.h
boards/triface/templates/triface_empty/project.bertos
boards/triface/templates/triface_empty/triface_empty.mk
boards/triface/templates/triface_kernel/cfg/cfg_adc.h
boards/triface/templates/triface_kernel/cfg/cfg_dac.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_eeprom.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_led_7seg.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_lwip.h
boards/triface/templates/triface_kernel/cfg/cfg_nand.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_proc.h
boards/triface/templates/triface_kernel/cfg/cfg_pwm.h
boards/triface/templates/triface_kernel/cfg/cfg_random.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_tftp.h [new file with mode: 0644]
boards/triface/templates/triface_kernel/cfg/cfg_usb.h
boards/triface/templates/triface_kernel/project.bertos
boards/triface/templates/triface_kernel/triface_kernel.mk

index 584b359fd186db10c88b4aec53fc55a1cca72388..29a5847e7641995f75d6e5bc45e19ed3a235e46c 100644 (file)
@@ -25,8 +25,8 @@ include ./boards/arduino/templates/arduino_empty/arduino_empty.mk
 include ./boards/triface/examples/triface/triface.mk
 #include ./boards/triface/benchmark/triface_context_switch/triface_context_switch.mk
 #include ./boards/triface/benchmark/triface_kernel_footprint/triface_kernel_footprint.mk
-#include ./boards/triface/templates/triface_empty/triface_empty.mk
-#include ./boards/triface/templates/triface_kernel/triface_kernel.mk
+include ./boards/triface/templates/triface_empty/triface_empty.mk
+include ./boards/triface/templates/triface_kernel/triface_kernel.mk
 
 include ./boards/at91sam7s-ek/templates/at91sam7s-ek_empty/at91sam7s-ek_empty.mk
 include ./boards/at91sam7s-ek/templates/at91sam7s-ek_kernel/at91sam7s-ek_kernel.mk
index df2587be517232fd86b9192faa5c39172c793330..62ee6ed73f34bc223e71e3c0d47003c48fc3b704 100644 (file)
  */
 #define CONFIG_ADC_STROBE  0
 
+
+/**
+ * Start up timer[s] = startup value / ADCClock [Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_sut"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_SUT         ADC_SUT512
+
+/**
+ * Analog Settling Time[s] = settling value / ADCClock[Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_stt"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_STTLING     ADC_AST17
+
+/**
+ * Tracking Time[s] = (TRACKTIM + 1) / ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRACKTIM    0
+
+/**
+ * Transfer Period[s] = (TRANSFER * 2 + 3) ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRANSFER    1
+
 #endif /* CFG_ADC_H */
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_dac.h b/boards/triface/templates/triface_empty/cfg/cfg_dac.h
new file mode 100644 (file)
index 0000000..1ae1e98
--- /dev/null
@@ -0,0 +1,88 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for DAC module.
+ *
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_DAC_H
+#define CFG_DAC_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define DAC_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define DAC_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * DAC Refresh Period = 1024*REFRESH/DACC Clock
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 65536
+ */
+#define CONFIG_DAC_REFRESH            16
+
+/**
+ * DAC Startup Time Selection.
+ * see datasheet table.
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 63
+ */
+#define CONFIG_DAC_STARTUP             0
+
+/**
+ * DAC Trigger Selection.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3x_dac_tc"
+ * $WIZ$ supports = "sam3x"
+ */
+#define CONFIG_DAC_TIMER  DACC_TRGSEL_TIO_CH0
+
+#endif /* CFG_DAC_H */
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_eeprom.h b/boards/triface/templates/triface_empty/cfg/cfg_eeprom.h
new file mode 100644 (file)
index 0000000..b56c1f9
--- /dev/null
@@ -0,0 +1,64 @@
+/**
+ * \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 Configuration file for the Eeprom module.
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_EEPROM_H
+#define CFG_EEPROM_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define EEPROM_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define EEPROM_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * Check this to disable Eeprom deprecated API support.
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_EEPROM_DISABLE_OLD_API  0
+
+#endif /* CFG_EEPROM_H */
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_led_7seg.h b/boards/triface/templates/triface_empty/cfg/cfg_led_7seg.h
new file mode 100644 (file)
index 0000000..d854b11
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * \file cfg_led_7seg.h
+ * <!--
+ * 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 Configuration file for led 7 segment display.
+ *
+ * \author Fabio Bizzi <fbizzi@bizzi.org>
+ *
+ * \addtogroup SevenSegDisplay 7 Segments LED Displays Driver
+ * \{
+ *
+ */
+
+#ifndef CFG_LED_7SEG_H
+#define CFG_LED_7SEG_H
+
+/**
+ * Use a Common Cathode display.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_LED_7SEG_CCAT       0
+
+/**
+ * Number of digit present in the LED display.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 1
+ * $WIZ$ max = 8
+ */
+#define CONFIG_LED_7SEG_DIGIT      4
+
+/**
+ * Max lenght of the string to be displayed.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 16
+ * $WIZ$ max = 255
+ */
+#define CONFIG_LED_7SEG_STRLEN     255
+
+/**
+ * Default scrolling speed (ms * CONFIG_LED_7SEG_RTIME).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_SSPEED      10
+
+/**
+ * Default refresh time (ms).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_RTIME      5
+
+#endif /* CFG_LED_7SEG_H */
+ /** \} */ //defgroup drivers
+
index b6b55f65269d3df5bcc07c6073240abbb54a1d7c..73acb913534f4b4c33be90e72e0a8d99ea43e2db 100644 (file)
  * $WIZ$ type = "boolean"
  */
 #define LWIP_SOCKET                     1
+#if LWIP_SOCKET
+       /*
+        * The sockets.c file requires this macro to be defined to really
+        * set errno on errors.
+        */
+       #define ERRNO
+#endif
 
 /**
  * Enable BSD-style sockets functions names.
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_nand.h b/boards/triface/templates/triface_empty/cfg/cfg_nand.h
new file mode 100644 (file)
index 0000000..bd3b262
--- /dev/null
@@ -0,0 +1,111 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ * -->
+ *
+ * \author Stefano Fedrigo <aleph@develer.com>
+ *
+ * \brief Configuration file for NAND driver module.
+ */
+
+#ifndef CFG_NAND_H
+#define CFG_NAND_H
+
+/**
+ * Page data size
+ *
+ * Size of the data section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_DATA_SIZE         2048
+
+/**
+ * Page spare area size
+ *
+ * Size of the spare section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_SPARE_SIZE        64
+
+/**
+ * Pages per block
+ *
+ * Number of pages in a erase block.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_PAGES_PER_BLOCK   64
+
+/**
+ * Number of blocks
+ *
+ * Total number of erase blocks in one NAND chip.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_BLOCK        2048
+
+/**
+ * Number of reserved blocks
+ *
+ * Blocks reserved for remapping defective NAND blocks.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_REMAP_BLOCKS  128
+
+/**
+ * NAND operations timeout
+ *
+ * How many milliseconds the cpu waits for
+ * completion of NAND operations.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_TMOUT      100
+
+/**
+ * Module logging level
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define CONFIG_NAND_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define CONFIG_NAND_LOG_FORMAT     LOG_FMT_TERSE
+
+#endif /* CFG_NAND_H */
index 52b4e414a8a53ad1ef61a024a218e27fd3ea8e1f..19aa198f2d52ff94fe5c4a106af506923eda2132 100644 (file)
  */
 #define CONFIG_KERN_PRI 1
 
+/**
+ * Priority-inheritance protocol.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_PRI_INHERIT 0
+
 /**
  * Dynamic memory allocation for processes.
  * $WIZ$ type = "boolean"
index 595189e64433402dfc0c33c2879385dee3f45351..68d62837c8ee73db35a3bf91e60acc068f465558 100644 (file)
  */
 #define PWM_LOG_FORMAT     LOG_FMT_VERBOSE
 
+/**
+ * Enable the OLD pwm API.
+ * Not recommended for new projects.
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CFG_PWM_ENABLE_OLD_API 1
+
 #endif /* CFG_PWM_H */
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_random.h b/boards/triface/templates/triface_empty/cfg/cfg_random.h
new file mode 100644 (file)
index 0000000..5e3afdf
--- /dev/null
@@ -0,0 +1,65 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \author Andrea Righi <arighi@develer.com>
+ *
+ * \brief Configuration file for the "random" module
+ */
+
+#ifndef CFG_RANDOM_H
+#define CFG_RANDOM_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define RANDOM_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define RANDOM_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * Random security level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "random_level"
+ */
+#define RANDOM_SECURITY_LEVEL          RANDOM_SECURITY_MINIMUM
+
+#endif /* CFG_RANDOM_H */
diff --git a/boards/triface/templates/triface_empty/cfg/cfg_tftp.h b/boards/triface/templates/triface_empty/cfg/cfg_tftp.h
new file mode 100644 (file)
index 0000000..36cc622
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef CFG_TFTP_H
+#define CFG_TFTP_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define TFTP_LOG_LEVEL    LOG_LVL_WARN
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define TFTP_LOG_FORMAT   LOG_FMT_VERBOSE
+
+#endif /* CFG_TFTP_H */
index e5a282b158fbac6b52e083113783e179688a57d1..dbfd6fe1f13afc0a70e83e9dfd97f6521971d1a5 100644 (file)
  */
 #define CONFIG_USB_BUFSIZE  64
 
+/**
+ * Maximum number of USB device interfaces (default = 1).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 1
+ */
+#define CONFIG_USB_INTERFACE_MAX  1
+
+/**
+ * Maximum number of allocated endpoints (0 = auto).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ */
+#define CONFIG_USB_EP_MAX  0
+
+/**
+ * Maximum packet size of the control endpoint 0 [bytes].
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 8
+ */
+#define CONFIG_EP0_MAX_SIZE 8
+
 #endif /* CFG_USB_H */
index e13acfa266099ff238b0bafcac39e33a5034d949..f0697e7088001b872e7e4ee1e4c65d36e44b1e1c 100644 (file)
@@ -19,26 +19,26 @@ p8
 (dp9
 S'path'
 p10
-V/usr/local/toolchain/avr/bin/avr-gcc
+V/usr/bin/avr-gcc
 p11
-ssS'PROJECT_SRC_PATH_FROM_MAKEFILE'
+ssS'PROJECT_HW_PATH_FROM_MAKEFILE'
 p12
-Vboards/triface/templates/triface_empty
+Vboards/triface
 p13
 sS'ENABLED_MODULES'
 p14
 (lp15
 S'debug'
 p16
-aS'ser'
+aS'formatwr'
 p17
-aS'kfile'
+aS'heap'
 p18
-aS'timer'
+aS'kfile'
 p19
-aS'formatwr'
+aS'ser'
 p20
-aS'heap'
+aS'timer'
 p21
 asS'CPU_NAME'
 p22
@@ -55,9 +55,9 @@ p27
 sS'PRESET'
 p28
 I01
-sS'PROJECT_HW_PATH_FROM_MAKEFILE'
+sS'PROJECT_SRC_PATH_FROM_MAKEFILE'
 p29
-Vboards/triface
+Vboards/triface/templates/triface_empty
 p30
 sS'OUTPUT'
 p31
index b04515f7ac0e9f744441ca881c505ee14d3d2472..a136ce957b1d3f6b6e1df267b0928de63c7e5c7f 100644 (file)
@@ -19,15 +19,17 @@ triface_empty_HW_PATH = boards/triface
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE triface_empty_USER_CSRC INSTEAD!
 triface_empty_WIZARD_CSRC = \
-       bertos/mware/event.c \
-       bertos/struct/heap.c \
-       bertos/io/kfile.c \
-       bertos/mware/formatwr.c \
-       bertos/drv/timer.c \
-       bertos/cpu/avr/drv/timer_avr.c \
        bertos/cpu/avr/drv/ser_avr.c \
+       bertos/cpu/avr/drv/ser_mega.c \
+       bertos/cpu/avr/drv/timer_avr.c \
+       bertos/cpu/avr/drv/timer_mega.c \
        bertos/drv/ser.c \
+       bertos/drv/timer.c \
+       bertos/io/kfile.c \
+       bertos/mware/event.c \
+       bertos/mware/formatwr.c \
        bertos/mware/hex.c \
+       bertos/struct/heap.c \
        #
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE triface_empty_USER_PCSRC INSTEAD!
index df2587be517232fd86b9192faa5c39172c793330..62ee6ed73f34bc223e71e3c0d47003c48fc3b704 100644 (file)
  */
 #define CONFIG_ADC_STROBE  0
 
+
+/**
+ * Start up timer[s] = startup value / ADCClock [Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_sut"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_SUT         ADC_SUT512
+
+/**
+ * Analog Settling Time[s] = settling value / ADCClock[Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_stt"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_STTLING     ADC_AST17
+
+/**
+ * Tracking Time[s] = (TRACKTIM + 1) / ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRACKTIM    0
+
+/**
+ * Transfer Period[s] = (TRANSFER * 2 + 3) ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRANSFER    1
+
 #endif /* CFG_ADC_H */
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_dac.h b/boards/triface/templates/triface_kernel/cfg/cfg_dac.h
new file mode 100644 (file)
index 0000000..1ae1e98
--- /dev/null
@@ -0,0 +1,88 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for DAC module.
+ *
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_DAC_H
+#define CFG_DAC_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define DAC_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define DAC_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * DAC Refresh Period = 1024*REFRESH/DACC Clock
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 65536
+ */
+#define CONFIG_DAC_REFRESH            16
+
+/**
+ * DAC Startup Time Selection.
+ * see datasheet table.
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 63
+ */
+#define CONFIG_DAC_STARTUP             0
+
+/**
+ * DAC Trigger Selection.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3x_dac_tc"
+ * $WIZ$ supports = "sam3x"
+ */
+#define CONFIG_DAC_TIMER  DACC_TRGSEL_TIO_CH0
+
+#endif /* CFG_DAC_H */
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_eeprom.h b/boards/triface/templates/triface_kernel/cfg/cfg_eeprom.h
new file mode 100644 (file)
index 0000000..b56c1f9
--- /dev/null
@@ -0,0 +1,64 @@
+/**
+ * \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 Configuration file for the Eeprom module.
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_EEPROM_H
+#define CFG_EEPROM_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define EEPROM_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define EEPROM_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * Check this to disable Eeprom deprecated API support.
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_EEPROM_DISABLE_OLD_API  0
+
+#endif /* CFG_EEPROM_H */
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_led_7seg.h b/boards/triface/templates/triface_kernel/cfg/cfg_led_7seg.h
new file mode 100644 (file)
index 0000000..d854b11
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * \file cfg_led_7seg.h
+ * <!--
+ * 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 Configuration file for led 7 segment display.
+ *
+ * \author Fabio Bizzi <fbizzi@bizzi.org>
+ *
+ * \addtogroup SevenSegDisplay 7 Segments LED Displays Driver
+ * \{
+ *
+ */
+
+#ifndef CFG_LED_7SEG_H
+#define CFG_LED_7SEG_H
+
+/**
+ * Use a Common Cathode display.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_LED_7SEG_CCAT       0
+
+/**
+ * Number of digit present in the LED display.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 1
+ * $WIZ$ max = 8
+ */
+#define CONFIG_LED_7SEG_DIGIT      4
+
+/**
+ * Max lenght of the string to be displayed.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 16
+ * $WIZ$ max = 255
+ */
+#define CONFIG_LED_7SEG_STRLEN     255
+
+/**
+ * Default scrolling speed (ms * CONFIG_LED_7SEG_RTIME).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_SSPEED      10
+
+/**
+ * Default refresh time (ms).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_RTIME      5
+
+#endif /* CFG_LED_7SEG_H */
+ /** \} */ //defgroup drivers
+
index b6b55f65269d3df5bcc07c6073240abbb54a1d7c..73acb913534f4b4c33be90e72e0a8d99ea43e2db 100644 (file)
  * $WIZ$ type = "boolean"
  */
 #define LWIP_SOCKET                     1
+#if LWIP_SOCKET
+       /*
+        * The sockets.c file requires this macro to be defined to really
+        * set errno on errors.
+        */
+       #define ERRNO
+#endif
 
 /**
  * Enable BSD-style sockets functions names.
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_nand.h b/boards/triface/templates/triface_kernel/cfg/cfg_nand.h
new file mode 100644 (file)
index 0000000..bd3b262
--- /dev/null
@@ -0,0 +1,111 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ * -->
+ *
+ * \author Stefano Fedrigo <aleph@develer.com>
+ *
+ * \brief Configuration file for NAND driver module.
+ */
+
+#ifndef CFG_NAND_H
+#define CFG_NAND_H
+
+/**
+ * Page data size
+ *
+ * Size of the data section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_DATA_SIZE         2048
+
+/**
+ * Page spare area size
+ *
+ * Size of the spare section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_SPARE_SIZE        64
+
+/**
+ * Pages per block
+ *
+ * Number of pages in a erase block.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_PAGES_PER_BLOCK   64
+
+/**
+ * Number of blocks
+ *
+ * Total number of erase blocks in one NAND chip.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_BLOCK        2048
+
+/**
+ * Number of reserved blocks
+ *
+ * Blocks reserved for remapping defective NAND blocks.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_REMAP_BLOCKS  128
+
+/**
+ * NAND operations timeout
+ *
+ * How many milliseconds the cpu waits for
+ * completion of NAND operations.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_TMOUT      100
+
+/**
+ * Module logging level
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define CONFIG_NAND_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define CONFIG_NAND_LOG_FORMAT     LOG_FMT_TERSE
+
+#endif /* CFG_NAND_H */
index 7e64c498702a9c255a0b23ba9daa0c661ae03aef..fa9bcc9b0b5e6d69655c7393b1e916465db337d4 100644 (file)
  */
 #define CONFIG_KERN_PRI 1
 
+/**
+ * Priority-inheritance protocol.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_PRI_INHERIT 0
+
 /**
  * Dynamic memory allocation for processes.
  * $WIZ$ type = "boolean"
index 595189e64433402dfc0c33c2879385dee3f45351..68d62837c8ee73db35a3bf91e60acc068f465558 100644 (file)
  */
 #define PWM_LOG_FORMAT     LOG_FMT_VERBOSE
 
+/**
+ * Enable the OLD pwm API.
+ * Not recommended for new projects.
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CFG_PWM_ENABLE_OLD_API 1
+
 #endif /* CFG_PWM_H */
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_random.h b/boards/triface/templates/triface_kernel/cfg/cfg_random.h
new file mode 100644 (file)
index 0000000..5e3afdf
--- /dev/null
@@ -0,0 +1,65 @@
+/**
+ * \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 2011 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \author Andrea Righi <arighi@develer.com>
+ *
+ * \brief Configuration file for the "random" module
+ */
+
+#ifndef CFG_RANDOM_H
+#define CFG_RANDOM_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define RANDOM_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define RANDOM_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * Random security level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "random_level"
+ */
+#define RANDOM_SECURITY_LEVEL          RANDOM_SECURITY_MINIMUM
+
+#endif /* CFG_RANDOM_H */
diff --git a/boards/triface/templates/triface_kernel/cfg/cfg_tftp.h b/boards/triface/templates/triface_kernel/cfg/cfg_tftp.h
new file mode 100644 (file)
index 0000000..36cc622
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef CFG_TFTP_H
+#define CFG_TFTP_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define TFTP_LOG_LEVEL    LOG_LVL_WARN
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define TFTP_LOG_FORMAT   LOG_FMT_VERBOSE
+
+#endif /* CFG_TFTP_H */
index e5a282b158fbac6b52e083113783e179688a57d1..dbfd6fe1f13afc0a70e83e9dfd97f6521971d1a5 100644 (file)
  */
 #define CONFIG_USB_BUFSIZE  64
 
+/**
+ * Maximum number of USB device interfaces (default = 1).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 1
+ */
+#define CONFIG_USB_INTERFACE_MAX  1
+
+/**
+ * Maximum number of allocated endpoints (0 = auto).
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ */
+#define CONFIG_USB_EP_MAX  0
+
+/**
+ * Maximum packet size of the control endpoint 0 [bytes].
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 8
+ */
+#define CONFIG_EP0_MAX_SIZE 8
+
 #endif /* CFG_USB_H */
index 8b9ddda8d0ddc44586de78db0dfd7c179ac90e00..901fd21026b1876a8defd462ad172d34f565c348 100644 (file)
@@ -19,34 +19,34 @@ p8
 (dp9
 S'path'
 p10
-V/usr/local/toolchain/avr/bin/avr-gcc
+V/usr/bin/avr-gcc
 p11
-ssS'PROJECT_SRC_PATH_FROM_MAKEFILE'
+ssS'PROJECT_HW_PATH_FROM_MAKEFILE'
 p12
-Vboards/triface/templates/triface_kernel
+Vboards/triface
 p13
 sS'ENABLED_MODULES'
 p14
 (lp15
-S'monitor'
+S'debug'
 p16
-aS'signal'
+aS'formatwr'
 p17
-aS'debug'
+aS'heap'
 p18
 aS'kernel'
 p19
-aS'ser'
-p20
 aS'kfile'
+p20
+aS'monitor'
 p21
-aS'timer'
+aS'semaphores'
 p22
-aS'formatwr'
+aS'ser'
 p23
-aS'semaphores'
+aS'signal'
 p24
-aS'heap'
+aS'timer'
 p25
 asS'CPU_NAME'
 p26
@@ -63,9 +63,9 @@ p31
 sS'PRESET'
 p32
 I01
-sS'PROJECT_HW_PATH_FROM_MAKEFILE'
+sS'PROJECT_SRC_PATH_FROM_MAKEFILE'
 p33
-Vboards/triface
+Vboards/triface/templates/triface_kernel
 p34
 sS'OUTPUT'
 p35
index 7f8db7c63d7c76278d276141beeee79dcad2d7c8..c671612182f097716ae521d8d2d177e6f44b7ec3 100644 (file)
@@ -9,7 +9,7 @@ triface_kernel_DEBUG = 1
 # Our target application
 TRG += triface_kernel
 
-triface_kernel_PREFIX = "avr-"
+triface_kernel_PREFIX = "/usr/bin/avr-"
 
 triface_kernel_SUFFIX = ""
 
@@ -20,18 +20,20 @@ triface_kernel_HW_PATH = boards/triface
 # Files automatically generated by the wizard. DO NOT EDIT, USE triface_kernel_USER_CSRC INSTEAD!
 triface_kernel_WIZARD_CSRC = \
        bertos/cpu/avr/drv/ser_avr.c \
-       bertos/kern/signal.c \
-       bertos/kern/sem.c \
-       bertos/struct/heap.c \
-       bertos/io/kfile.c \
-       bertos/mware/hex.c \
+       bertos/cpu/avr/drv/ser_mega.c \
        bertos/cpu/avr/drv/timer_avr.c \
+       bertos/cpu/avr/drv/timer_mega.c \
+       bertos/drv/ser.c \
        bertos/drv/timer.c \
-       bertos/mware/event.c \
+       bertos/io/kfile.c \
+       bertos/kern/monitor.c \
        bertos/kern/proc.c \
+       bertos/kern/sem.c \
+       bertos/kern/signal.c \
+       bertos/mware/event.c \
        bertos/mware/formatwr.c \
-       bertos/drv/ser.c \
-       bertos/kern/monitor.c \
+       bertos/mware/hex.c \
+       bertos/struct/heap.c \
        #
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE triface_kernel_USER_PCSRC INSTEAD!