1 # ====================================================================
5 # Synthetic target architectural configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
44 # Original data: jskov
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_SYNTH {
53 display "Linux Synthetic target"
54 parent CYGPKG_HAL_I386
55 define_header hal_synth.h
57 requires !CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
60 The Linux Synthetic Target HAL package provides the
61 support needed to run eCos binaries on top of a
64 implements CYGINT_HAL_TESTS_NO_CACHES
67 <PREFIX>/lib/target.ld: <PACKAGE>/src/synth.ld
68 $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
69 @echo $@ ": \\" > $(notdir $@).deps
70 @tail -n +2 target.tmp >> $(notdir $@).deps
71 @echo >> $(notdir $@).deps
74 compile synth_entry.c synth_diag.c synth_intr.c synth_syscalls.c
77 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_synth.h>"
80 # Real-time clock/counter specifics
81 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
82 display "Real-time clock constants."
84 In the synthetic target the system clock is implemented using
85 Linux setitimer() and a SIGALRM signal. The PERIOD value is the
86 number of microseconds between signals, the usec field of an
87 itimerval structure. It should be a multiple of 10000 because
88 Linux will not generate signals at a finer grain than that.
89 The NUMERATOR and DENOMINATOR are derived from the period."
92 cdl_option CYGNUM_HAL_RTC_PERIOD {
93 display "Real-time clock period"
96 requires { 0 == (CYGNUM_HAL_RTC_PERIOD % 10000) }
98 This option corresponds to the number of microseconds between
101 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
102 display "Real-time clock numerator"
104 calculated CYGNUM_HAL_RTC_DENOMINATOR * 1000 * CYGNUM_HAL_RTC_PERIOD
106 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
107 display "Real-time clock denominator"
112 # What to do when idling
113 cdl_option CYGIMP_HAL_IDLE_THREAD_SPIN {
114 display "Spin when idle"
115 default_value CYGIMP_IDLE_THREAD_YIELD
117 By default, whenever the eCos application enters the idle thread
118 the synthetic target HAL will make a select() system call. Effectively
119 this causes the application to block until an interrupt occurs,
120 without consuming any cpu resources, as if the hardware supported
121 some sort of IDLE instruction. Usually this behaviour is desirable.
122 However it interferes with the emulation of some hardware. For
123 example the synthetic watchdog timer device can use consumed cpu time
124 rather than wallclock time to determine whether or not the watchdog
125 has triggered, and if the process is spending nearly all its time
126 blocked in select() then the watchdog will not trigger when it should.
127 There are also some kernel configurations which require that the idle
128 thread does not block."
130 requires { CYGIMP_IDLE_THREAD_YIELD implies CYGIMP_HAL_IDLE_THREAD_SPIN }
132 cdl_option CYGBLD_LINKER_SCRIPT {
133 display "Linker script"
136 calculated { "src/synth.ld" }
139 cdl_option CYGSEM_HAL_SYNTH_TESTS {
140 display "Build the Synth HAL tests"
143 The only test at the moment is disabled by default
144 because it has to be run manually. It should be run both within
145 eCos and natively on Linux and the results compared"
148 cdl_component CYGPKG_HAL_SYNTH_TESTS {
149 display "Synth HAL tests"
150 active_if CYGSEM_HAL_SYNTH_TESTS
153 calculated { "tests/ftok.c" }
156 <PREFIX>/tests/ftok: <PACKAGE>/tests/ftok.c
157 @mkdir -p "$(dir $@)"
158 @$(HOST_CC) -DHOST -g -O2 -o $@ $< || cc -DHOST -g -O2 -o $@ $< || -DHOST gcc -g -O2 -o $@ $<