From: lottaviano Date: Tue, 24 May 2011 13:41:23 +0000 (+0000) Subject: Update arduino kernel footprint benchmark, make it compile X-Git-Tag: 2.7.0~42 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=a1fab827f2b4a29ada911048785f2727066d2fad;p=bertos.git Update arduino kernel footprint benchmark, make it compile git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4924 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/arduino_kernel_footprint.mk b/boards/arduino/benchmark/arduino_kernel_footprint/arduino_kernel_footprint.mk index 0c4f7fb7..b3c685b6 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/arduino_kernel_footprint.mk +++ b/boards/arduino/benchmark/arduino_kernel_footprint/arduino_kernel_footprint.mk @@ -19,17 +19,18 @@ arduino_kernel_footprint_HW_PATH = boards/arduino # Files automatically generated by the wizard. DO NOT EDIT, USE arduino_kernel_footprint_USER_CSRC INSTEAD! arduino_kernel_footprint_WIZARD_CSRC = \ - bertos/mware/event.c \ - bertos/kern/sem.c \ - bertos/struct/heap.c \ - bertos/io/kfile.c \ - bertos/mware/formatwr.c \ + bertos/benchmark/kernel_footprint.c \ bertos/cpu/avr/drv/timer_avr.c \ + bertos/cpu/avr/drv/timer_mega.c \ bertos/drv/timer.c \ - bertos/kern/signal.c \ + bertos/io/kfile.c \ bertos/kern/proc.c \ - bertos/benchmark/kernel_footprint.c \ + bertos/kern/sem.c \ + bertos/kern/signal.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 arduino_kernel_footprint_USER_PCSRC INSTEAD! diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_adc.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_adc.h index df2587be..62ee6ed7 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_adc.h +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_adc.h @@ -109,4 +109,41 @@ */ #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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_dac.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_dac.h new file mode 100644 index 00000000..1ae1e984 --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_dac.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for DAC module. + * + * + * \author Daniele Basile + */ + +#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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_eeprom.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_eeprom.h new file mode 100644 index 00000000..b56c1f9c --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_eeprom.h @@ -0,0 +1,64 @@ +/** + * \file + * + * + * \brief Configuration file for the Eeprom module. + * + * \author Daniele Basile + */ + +#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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_led_7seg.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_led_7seg.h new file mode 100644 index 00000000..d854b11d --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_led_7seg.h @@ -0,0 +1,80 @@ +/** + * \file cfg_led_7seg.h + * + * + * \brief Configuration file for led 7 segment display. + * + * \author Fabio Bizzi + * + * \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 + diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_lwip.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_lwip.h index b6b55f65..73acb913 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_lwip.h +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_lwip.h @@ -1206,6 +1206,13 @@ * $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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_nand.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_nand.h new file mode 100644 index 00000000..bd3b2623 --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_nand.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \author Stefano Fedrigo + * + * \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 */ diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_proc.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_proc.h index ab1a4680..92c95a69 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_proc.h +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_proc.h @@ -74,6 +74,12 @@ */ #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" diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_pwm.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_pwm.h index 595189e6..68d62837 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_pwm.h +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_pwm.h @@ -53,4 +53,12 @@ */ #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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_random.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_random.h new file mode 100644 index 00000000..5e3afdff --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_random.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \author Andrea Righi + * + * \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/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_tftp.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_tftp.h new file mode 100644 index 00000000..36cc622c --- /dev/null +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_tftp.h @@ -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 */ diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_usb.h b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_usb.h index e5a282b1..dbfd6fe1 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_usb.h +++ b/boards/arduino/benchmark/arduino_kernel_footprint/cfg/cfg_usb.h @@ -61,4 +61,25 @@ */ #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 */ diff --git a/boards/arduino/benchmark/arduino_kernel_footprint/project.bertos b/boards/arduino/benchmark/arduino_kernel_footprint/project.bertos index 3c5447ab..a11518b6 100644 --- a/boards/arduino/benchmark/arduino_kernel_footprint/project.bertos +++ b/boards/arduino/benchmark/arduino_kernel_footprint/project.bertos @@ -19,32 +19,32 @@ p8 (dp9 S'path' p10 -V/usr/local/toolchain/avr/bin/avr-gcc +V/home/lottaviano/avr-toolchain-4.3//bin/avr-gcc p11 -ssS'PROJECT_SRC_PATH_FROM_MAKEFILE' +ssS'PROJECT_HW_PATH_FROM_MAKEFILE' p12 -Vboards/arduino/benchmark/arduino_kernel_footprint +Vboards/arduino p13 sS'ENABLED_MODULES' p14 (lp15 -S'signal' +S'formatwr' p16 -aS'kernel' +aS'heap' p17 -aS'kfile' +aS'kernel' p18 -aS'timer' +aS'kernel_footprint' p19 -aS'formatwr' +aS'kfile' p20 aS'msg' p21 aS'semaphores' p22 -aS'kernel_footprint' +aS'signal' p23 -aS'heap' +aS'timer' p24 asS'CPU_NAME' p25 @@ -61,9 +61,9 @@ p30 sS'PRESET' p31 I01 -sS'PROJECT_HW_PATH_FROM_MAKEFILE' +sS'PROJECT_SRC_PATH_FROM_MAKEFILE' p32 -Vboards/arduino +Vboards/arduino/benchmark/arduino_kernel_footprint p33 sS'OUTPUT' p34