From: arighi Date: Tue, 30 Mar 2010 10:58:44 +0000 (+0000) Subject: lm3s1968: add configuration files to the example. X-Git-Tag: 2.5.0~583 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=770e91a532da193469702a7f3e1f09302f860234;p=bertos.git lm3s1968: add configuration files to the example. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3325 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c b/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c index 321a87e3..e9061d36 100644 --- a/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c @@ -132,5 +132,5 @@ INLINE void kdbg_hw_init(void) HWREG(GPIO_PORTA_BASE + GPIO_O_AMSEL) &= ~(BV(0) | BV(1)); /* 115.200, 8-bit word, no parity, one stop bit */ - uart_config(UART0_BASE, 115200, UART_LCRH_WLEN_8); + uart_config(UART0_BASE, CONFIG_KDEBUG_BAUDRATE, UART_LCRH_WLEN_8); } diff --git a/examples/lm3s1968/cfg/cfg_debug.h b/examples/lm3s1968/cfg/cfg_debug.h new file mode 100644 index 00000000..ef7c4a75 --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_debug.h @@ -0,0 +1,53 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/examples/lm3s1968/cfg/cfg_heap.h b/examples/lm3s1968/cfg/cfg_heap.h new file mode 100644 index 00000000..7d080012 --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_heap.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/examples/lm3s1968/cfg/cfg_monitor.h b/examples/lm3s1968/cfg/cfg_monitor.h new file mode 100644 index 00000000..78f222bf --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_monitor.h @@ -0,0 +1,47 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 0 + +#endif /* CFG_MONITOR_H */ diff --git a/examples/lm3s1968/cfg/cfg_proc.h b/examples/lm3s1968/cfg/cfg_proc.h new file mode 100644 index 00000000..3c9439fb --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 0 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 0 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 0 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 0 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 2048L + +/** + * 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/lm3s1968/cfg/cfg_sem.h b/examples/lm3s1968/cfg/cfg_sem.h new file mode 100644 index 00000000..51811da4 --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_sem.h @@ -0,0 +1,47 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 0 + +#endif /* CFG_SEM_H */ diff --git a/examples/lm3s1968/cfg/cfg_signal.h b/examples/lm3s1968/cfg/cfg_signal.h new file mode 100644 index 00000000..e48d86a6 --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_signal.h @@ -0,0 +1,47 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 0 + +#endif /* CFG_SIGNAL_H */ diff --git a/examples/lm3s1968/cfg/cfg_timer.h b/examples/lm3s1968/cfg/cfg_timer.h new file mode 100644 index 00000000..ae1a60b9 --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_timer.h @@ -0,0 +1,66 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */