1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
##==========================================================================
##
## hal_cortexm_vybrid.cdl
##
## Cortex-M Freescale Vybrid variant HAL configuration data
##
##==========================================================================
## ####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
##
## eCos 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 or (at your option) any later
## version.
##
## eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## As a special exception, if other files instantiate templates or use
## macros or inline functions from this file, or you compile this file
## and link it with other works to produce a work based on this file,
## this file does not by itself cause the resulting work to be covered by
## the GNU General Public License. However the source code for this file
## must still be made available in accordance with section (3) of the GNU
## General Public License v2.
##
## This exception does not invalidate any other reasons why a work based
## on this file might be covered by the GNU General Public License.
## -------------------------------------------
## ####ECOSGPLCOPYRIGHTEND####
##==========================================================================
#######DESCRIPTIONBEGIN####
##
## Author(s): Antmicro Ltd <contact@antmicro.com>
## Date: 2014-03-28
## Based on respective definitions from /hal/cortexm/kinetis/var/current/cdl/hal_cortexm_kinetis.cdl
##
##
######DESCRIPTIONEND####
##
##==========================================================================
######MODIFICATION#####
##
## CYG_HAL_STARTUP_VAR legal_values added "RAM"
## CYGHWR_MEMORY_LAYOUT addded new compute value (RAM)
##==========================================================================
cdl_package CYGPKG_HAL_CORTEXM_VYBRID {
display "Freescale Vybrid Cortex-M4 Variant"
parent CYGPKG_HAL_CORTEXM
doc ref/hal-cortexm-vybrid-var.html
hardware
include_dir cyg/hal
define_header hal_cortexm_vybrid.h
description "
This package provides generic support for the Freescale Cortex-M4
based Vybrid microcontroller family.
It is also necessary to select a variant and platform HAL package."
compile hal_diag.c vybrid_misc.c vybrid_clocking.c
#implements CYGINT_HAL_DEBUG_GDB_STUBS
#implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
implements CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
requires { CYGHWR_HAL_CORTEXM == "M4" }
define_proc {
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_cortexm.h>"
puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_cortexm_vybrid.h>"
}
cdl_option CYGNUM_HAL_CORTEXM_PRIORITY_LEVEL_BITS {
display "CPU exception priority level bits"
flavor data
default_value 4
description "
This option defines the number of bits used to encode the
exception priority levels that this variant of the Cortex-M
CPU implements."
}
cdl_option CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY {
display "Clock interrupt ISR priority"
flavor data
calculated CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY_SP
description "Set clock ISR priority. Default setting is lowest priority."
}
cdl_component CYGNUM_HAL_RTC_CONSTANTS {
display "Real-time clock constants"
flavor none
no_define
cdl_option CYGNUM_HAL_RTC_NUMERATOR {
display "Real-time clock numerator"
flavor data
default_value 1000000000
}
cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
display "Real-time clock denominator"
flavor data
default_value 1000
}
cdl_option CYGNUM_HAL_RTC_PERIOD {
display "Real-time clock period"
flavor data
default_value 1000000 / CYGNUM_HAL_RTC_DENOMINATOR
description "
The period defined here is something of a fake, it is
expressed in terms of a notional 1MHz clock. The value
actually installed in the hardware is calculated from
the current settings of the clock generation hardware."
}
}
cdl_option CYG_HAL_STARTUP_VAR {
display "By variant"
flavor data
parent CYG_HAL_STARTUP_ENV
default_value { "OCRAM" }
legal_values { "TCML" "OCRAM" }
active_if ((!CYG_HAL_STARTUP_PLF) || (CYG_HAL_STARTUP_PLF=="ByVariant"))
description "
'OCRAM' startup builds a stand-alone application hich will be placed into OnChipRAM.
This type of memory is intended to be written via bootloaders such like uBoot or
from Linux system running on the Cortex A5 core of Vybrid processor.
Note: Variant Startup Type can be overriden/overloaded by
Platform Startup Type."
}
cdl_component CYG_HAL_STARTUP {
display "Startup type calculator"
flavor data
parent CYG_HAL_STARTUP_ENV
calculated { (CYG_HAL_STARTUP_PLF && (CYG_HAL_STARTUP_PLF!="ByVariant")) ?
CYG_HAL_STARTUP_PLF : CYG_HAL_STARTUP_VAR}
define -file system.h CYG_HAL_STARTUP
description "
Startup type defines what type of application shall be built.
Startup type can be defined by variant (CYG_HAL_STARTUP_VAR)
or platform (CYG_HAL_STARTUP_PLF). If CYG_HAL_STARTUP_PLF
is defined and not equal to 'ByVariant' then it shall
override CYG_HAL_STARTUP_VAR."
}
cdl_component CYGHWR_MEMORY_LAYOUT {
display "Memory layout"
flavor data
no_define
parent CYG_HAL_STARTUP_ENV
calculated {
(CYGHWR_MEMORY_LAYOUT_PLF) ? CYGHWR_MEMORY_LAYOUT_PLF :
(CYG_HAL_STARTUP == "TCML") ? "vybrid_tcml" :
(CYG_HAL_STARTUP == "OCRAM") ? "vybrid_ocram" :
"undefined" }
description "
Combination of 'Startup type' and 'Vybrid part'
produces the memory layout."
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
display "Memory layout linker script fragment"
flavor data
no_define
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
calculated { "<pkgconf/mlt_" . CYGHWR_MEMORY_LAYOUT . ".ldi>" }
}
cdl_option CYGHWR_MEMORY_LAYOUT_H {
display "Memory layout header file"
flavor data
no_define
define -file system.h CYGHWR_MEMORY_LAYOUT_H
calculated { "<pkgconf/mlt_" . CYGHWR_MEMORY_LAYOUT . ".h>" }
}
}
cdl_component CYGHWR_HAL_VYBRID_MEMORY_RESOURCES {
display "On chip memory resources"
flavor none
no_define
description "
View and manage on-chip memory resources.
Output is used for naming of 'mlt' files."
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_OCRAM_KIB {
display "Vybrid on chip SysRAM0 size \[KiB\]"
flavor data
calculated { 256 }
}
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_OCRAM {
display "Vybrid on chip SysRAM0 size"
flavor data
calculated { CYGHWR_HAL_CORTEXM_VYBRID_OCRAM_KIB * 0x400}
}
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_TCMU_KIB {
display "Vybrid on chip TCMU (data) size \[KiB\]"
flavor data
calculated { 32 }
}
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_TCMU {
display "Vybrid on chip TCMU (data) size"
flavor data
calculated { CYGHWR_HAL_CORTEXM_VYBRID_TCMU_KIB * 0x400 }
}
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_TCML_KIB {
display "Vybrid on chip TCML (data) size \[KiB\]"
flavor data
calculated { 32 }
}
cdl_option CYGHWR_HAL_CORTEXM_VYBRID_TCML {
display "Vybrid on chip TCML (data) size"
flavor data
calculated { CYGHWR_HAL_CORTEXM_VYBRID_TCML_KIB * 0x400 }
}
}
cdl_interface CYGINT_HAL_CACHE {
display "Platform has cache"
flavor bool
}
cdl_interface CYGINT_HAL_HAS_NONCACHED {
display "Platform has non-cached regions"
flavor bool
}
cdl_component CYGPKG_HAL_VYBRID_CACHE {
display "Cache memory"
flavor bool
default_value false
active_if (CYGINT_HAL_CACHE)
}
cdl_interface CYGINT_HAL_CORTEXM_VYBRID_DDRAM {
display "Platform uses DDRAM"
flavor bool
description "
This interface will be implemented if the specific
controller being used provides DDRAM and if DDRAM is
used on target hardware"
}
for { set ::channel 0 } { $::channel < 6 } { incr ::channel } {
cdl_interface CYGINT_HAL_FREESCALE_UART[set ::channel] {
display "Platform provides UART [set ::channel] HAL"
flavor bool
description "
This interface will be implemented if the specific
controller being used has on-chip UART [set ::channel],
and if that UART is accessible on the target hardware."
}
cdl_interface CYGINT_HAL_FREESCALE_UART[set ::channel]_RTSCTS {
display "Platform provides HAL for UART[set ::channel] hardware flow control."
flavor bool
description "
This interface will be implemented if the specific
on-chip UART [set ::channel] has RTS/CTS flow control
that is accessible on the target hardware."
}
}
cdl_interface CYGINT_HAL_DMA {
display "Platform uses DMA"
flavor bool
description "
This interface will be implemented if the specific
controller being used provides DMA and if DMA is
used on target hardware"
}
cdl_component CYGHWR_HAL_DEVS_IRQ_PRIO_SCHEME_VAR {
display "Variant IRQ priority defaults"
no_define
flavor none
parent CYGHWR_HAL_DEVS_IRQ_PRIO_SCHEME
description "
Interrupt priorities defined by Vybrid variant"
script vybrid_irq_scheme.cdl
}
cdl_component CYGPKG_HAL_CORTEXM_VYBRID_OPTIONS {
display "Build options"
flavor none
no_define
description "
Package specific build options including control over
compiler flags used only in building this package."
cdl_option CYGPKG_HAL_CORTEXM_VYBRID_CFLAGS_ADD {
display "Additional compiler flags"
flavor data
no_define
default_value { "" }
description "
This option modifies the set of compiler flags for
building the Vybrid variant HAL package. These flags
are used in addition to the set of global flags."
}
cdl_option CYGPKG_HAL_CORTEXM_VYBRID_CFLAGS_REMOVE {
display "Suppressed compiler flags"
flavor data
no_define
default_value { "" }
description "
This option modifies the set of compiler flags for
building the Vybrid variant HAL package. These flags
are removed from the set of global flags if present."
}
}
}
# EOF hal_cortexm_vybrid.cdl
|