1 /*
2 * Copyright (c) 2008 Texas Instruments and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Texas Instruments - initial implementation
10 *
11 * */
12 /*
13 * ======== Program.xdc ========
14 */
15 package xdc.cfg;
16
17 /*!
18 * ======== Program ========
19 * The Program object for the configuration object model.
20 *
21 * This module defines the "root" of the configuration object model; all
22 * configuration settings are for the executable represented by this
23 * object. Program configuration scripts reference this module via the
24 * global variable `Program`; i.e., `Program` implicitly initialized as
25 * follows:
26 * @p(code) 27 * var Program = xdc.useModule('xdc.cfg.Program');
28 * @p 29 *
30 * After a configuration script completes successfully, the XDC runtime
31 * generates the following files:
32 * @p(nlist) 33 * - package/cfg/<exe_name>.c
34 * - package/cfg/<exe_name>.xdl
35 * @p 36 * where `<exe_name>` is the name of the executable with the final '.'
37 * character replaced with an '_'.
38 *
39 * The generated C file contains code and data from each module used by the
40 * program and must be compiled and linked with the other sources to
41 * produce the final executable.
42 *
43 * The generated linker command file must also be used during this final
44 * link step. This linker command file is produced by expanding a template
45 * specified by `{@link xdc.cfg.Program#linkTemplate}`.
46 * Each template is responsible for expanding templates specified by each
47 * imported package's `getSects` method (see `{@link xdc.IPackage#getSects}`).
48 * This allows each package participating in the configuration of an
49 * executable to contribute a portion of the executable's linker command file.
50 */
51
52 @Template("./Program.xdt")
53
54 metaonlymodule Program {
55
56 /*!
57 * ======== GenerationOptions ========
58 * Options that control the files generated as part of program
59 * configuration.
60 *
61 * @field(debuggerFiles) If set to `true` in a configuration script,
62 * debugger project files will be generated as part of the
63 * configuration step. If set to `false`, these files will not
64 * be generated.
65 *
66 * If it is not set (or set to undefined) and the environment
67 * variable `environment["xdc.cfg.gen.debuggerFiles"]` is
68 * non-`null`, then the default value of this parameter is taken
69 * to be the value of the following expression:
70 * @p(code) 71 * environment["xdc.cfg.gen.debuggerFiles"] == "true"
72 * @p 73 * This makes it is possible to enable the generation of
74 * debugger project files from build scripts by passing
75 * the option `-Dxdc.cfg.gen.debuggerFiles=true` to the
76 * configuration tool (see
77 * `{@link xdc.bld.Executable#Attrs.xsopts}` or
78 * `{@link xdc.bld.PackageContents#Attrs.xsopts}`).
79 *
80 * Finally, if `debuggerFiles` is not set (or set to `undefined`)
81 * and the environment variable above is not defined,
82 * the generation of debugger project files occurs only if
83 * `{@link xdc.cfg.Program#build.profile}` contains
84 * the string `"debug"`. So, unless otherwise specified, debug
85 * profiles result in debugger project files being generated.
86 */
87 struct GenerationOptions {
88 Bool debuggerFiles; /*! if `true`, generate debugger "project" files */
89 };
90
91 /*!
92 * ======== SectionSpec ========
93 * Map that instructs the linker where to place output sections.
94 *
95 * This structure contains some fields that are specific to TI targets.
96 * On non-TI targets, such fields are ignored.
97 *
98 * @field(runSegment) Defines the memory segment where the section is
99 * to be run.
100 *
101 * @field(loadSegment) Defines the memory segment where the section is
102 * to be loaded. If 'runSegment' or 'loadSegment' is defined,
103 * but not both, the linker is instructed to use the defined
104 * field as the load and run allocation for the section.
105 *
106 * @field(runAddress) Defines the memory address where the section is
107 * to be run. It is an error if both 'runSegment' and 'runAddress'
108 * are specified.
109 *
110 * @field(loadAddress) Defines the memory address where the section is
111 * to be loaded. It is an error if both 'loadSegment' and
112 * 'loadAddress' are specified. If 'runAddress' or 'loadAddress'
113 * is defined, but not both, the linker is instructed to use the
114 * defined field as the load and run address for the section.
115 *
116 * @field(runAlign) If runSegment is specified, runAlign determines the
117 * alignment. It is an error if both 'runAlign' and 'runAddress'
118 * are specified.
119 *
120 * @field(loadAlign) If runSegment is specified, runAlign determins the
121 * alignment. It is an error if both 'loadAlign' and 'loadAddress'
122 * are specified.
123 *
124 * @field(type) Defines flags for special section types (COPY, DSECT,
125 * NOLOAD).
126 *
127 * @field(fill) Defines the value to initialize an uninitialized
128 * section.
129 */
130 struct SectionSpec {
131 String runSegment; /*! segment where section contents are run */
132 String loadSegment; /*! segment where section contents are loaded */
133 UInt runAddress; /*! start address of section when run */
134 UInt loadAddress; /*! start address of section when loaded */
135 UInt runAlign; /*! alignment of section within runSegment */
136 UInt loadAlign; /*! alignment of section within loadSegment */
137 String type; /*! target-specific flags */
138 UInt fill; /*! fill value */
139 };
140
141 /*!
142 * ======== gen ========
143 * Generation options for this executable
144 *
145 * This configuration parameter allows the program configuration script
146 * to control (to some extent) what files are generated as part of the
147 * configuration process.
148 */
149 config GenerationOptions gen;
150
151 /*!
152 * ======== globalSection ========
153 * UNDER CONSTRUCTION
154 * @_nodoc 155 *
156 * Section where `{@link #globals}` are placed.
157 *
158 * All globals specified in the application configuration file
159 * are placed into this section.
160 *
161 * The default is `null`, which means the `{@link #dataSection}` is used.
162 */
163 config String globalSection = null;
164
165 /*!
166 * ======== sysStack ========
167 * The size of the executable's initial system stack
168 *
169 * On platforms that support a separate "system stack", this
170 * parameter sets its initial size (in units of chars).
171 */
172 config UInt sysStack = 0x1000;
173
174 /*!
175 * ======== stack ========
176 * The size of the executable's initial stack
177 *
178 * On platforms that enable control of the initial stack size (the
179 * stack that exists immediately after reset), this parameter specifies
180 * its initial size (in units of chars).
181 */
182 config UInt stack = 0x1000;
183
184 /*!
185 * ======== heap ========
186 * The size of the executable's initial heap
187 *
188 * On platforms that enable control of the size of the heap managed by
189 * the run-time support function malloc(), this parameter specifies
190 * its initial size (in units of chars).
191 */
192 config UInt heap = 0x1000;
193
194 /*!
195 * ======== argSize ========
196 * The size allocated for command line args to the executable
197 *
198 * On platforms that require static allocation of space to hold
199 * command line arguments, this parameter specifies its maximum size
200 * (in units of chars).
201 */
202 config UInt argSize = 0x200;
203
204 /*!
205 * ======== execCmd ========
206 * The command used to run this executable
207 *
208 * If it is not set by the configuration script, it is set by the
209 * program's platform package (during program configuration).
210 *
211 * This command is run as follows:
212 * @p(code) 213 * execCmd <prog> <args>
214 * @p 215 * where, `<prog>` is the name of the executable
216 *
217 * @a(Note) 218 * This parameter is ignored if the exec command is specified as part
219 * of the test; see `{@link xdc.bld.Test#Attrs}`.
220 * and `<args>` are the arguments specified in the test (if any).
221 */
222 config String execCmd;
223
224 /*!
225 * ======== linkTemplate ========
226 * The template for the Program's linker command file
227 *
228 * A template is used to create the linker command file for each
229 * program. It can be optionally specified by setting this
230 * configuration parameter in the program's configuration script. If
231 * `linkTemplate` it is not set or set to `null`, the template is
232 * obtained from the platform associated with this program (i.e., the
233 * platform named by the `{@link #platform}` config in this module).
234 * See `{@link xdc.platform.IPlatform#getLinkTemplate IPlatform.getLinkTemplate}`.
235 *
236 * The `linkTemplate` string names a package path relative path; e.g.,
237 * if the linker template you want to specify is
238 * `"templates/big_n_hairy.xdt"` in the package `myCompany.myPackage`,
239 * `linkTemplate` should be set to:
240 * @p(code) 241 * "myCompany/myPackage/templates/big_n_hairy.xdt"
242 * @p 243 * If `linkTemplate` begins with the string `"./"`, the file is NOT
244 * searched for along the package path; instead the file name is taken
245 * to specify a file relative to the current working directory.
246 *
247 * In any case, if `linkTemplate` is non-`null`, the file must exist;
248 * otherwise, the configuration step will fail.
249 */
250 config String linkTemplate = null;
251
252 /*!
253 * ======== main ========
254 * The main entry point for the program
255 *
256 * This parameter is optionally set by the user's program
257 * configuration script. If it is not set, then a "legacy" `main()`
258 * function is assumed to be linked into the program; otherwise,
259 * the value of `main` is used as the "main" entry point to the
260 * program.
261 */
262 config Int (*main)(Int, Char*[]);
263
264 /*!
265 * ======== sectMap ========
266 * A section name to SectionSpec mapping
267 *
268 * This is a program specific mapping of output section names to
269 * {@link #SectionSpec} objects. The map supports mapping of section
270 * names to memory names; see {@link xdc.platform.IPlatform#sectMap}.
271 *
272 * This parameter enables program configurations to place named
273 * sections in platform specific memory regions. During generation of
274 * the linker command file, sections are mapped to named memories by
275 * first consulting this table; if the table does not contain a mapping,
276 * the target classifies each section as either "code", "data" or
277 * "stack" {@link xdc.bld.ITarget#sectMap} and the platform defines a
278 * memory region for each of these section types
279 * ({@link xdc.platform.IPlatform#codeMemory}/
280 * {@link xdc.platform.IPlatform#dataMemory}). If
281 * this does not produce a result, an error is generated.
282 * It is important to note that `sectMap` does not contain the complete
283 * section allocation for the program. It only contains the entries
284 * explicitly added to `sectMap`. To get the complete section
285 * allocation, a user should call {@link #getSectMap}.
286 *
287 * Suppose for example that the platform defines a memory segment
288 * named "DDR2". The following configuration statement places
289 * everything from the ".text" section into the "DDR2" segment.
290 *
291 * @p(code) 292 * Program.sectMap[".text"] = new Program.SectionSpec();
293 * Program.sectMap[".text"].loadSegment = "DDR2";
294 * @p 295 *
296 * @a(Note) 297 * If BIOS 5 configuration script (Tconf script) is executed, the
298 * section allocations configured in the Tconf script take precedence
299 * over any settings for the same sections in this parameter.
300 *
301 * @see #SectionSpec
302 * @see xdc.platform.IPlatform#sectMap
303 * @see xdc.bld.ITarget#sectMap
304 */
305 config Any sectMap[string]; /* section name => SectionSpec */
306
307 /*!
308 * ======== sectionsExclude ========
309 * Sections to exclude from linker command file generation
310 *
311 * The `sectionsExclude` string is a JavaScript regular expression
312 * that is used to identify names of section that should NOT be
313 * be handled by the normal linker command file generation process.
314 *
315 * Sections whose name matches `sectionsExclude` must be handled
316 * using a custom linker command file or by specifying a custom template
317 * (see `{@link #sectionsTemplate}` or `{@link #linkTemplate}`).
318 * @a(Examples) 319 * To completely override the placement of all output sections you can
320 * define `sectionsExclude` to match any string.
321 * @p(code) 322 * // Note: the '.' below represents _any_ character, not just "."
323 * Program.sectionsExclude = ".*";
324 * @p 325 * To override output sections that begin with '.' you must specify
326 * the literal character '.' and use the '^' character to match the
327 * beginning of the string.
328 * @p(code) 329 * // the sequence '^\.' matches just "." at the start of the name
330 * Program.sectionsExclude = "^\.";
331 * @p 332 * To override a specific sections you should be careful to supply a
333 * regular expression that matches the entire section name. You can
334 * use '$' to match the end of the name.
335 * @p(code) 336 * // match only ".const" or ".text"
337 * Program.sectionsExclude = "^\.const$|^\.text$";
338 * @p 339 */
340 config String sectionsExclude = null;
341
342 /*!
343 * ======== sectionsTemplate ========
344 * Replace the sections portion of the generated linker command file
345 *
346 * The `sectionsTemplate` string names a template that is used to replace
347 * the "`SECTIONS`" content to the generated linker command file. This
348 * is useful especially when excluding specific sections via
349 * `{@link #sectionsExclude}` or when taking full control of the linker
350 * command file via `{@link #linkTemplate}` is unnecessary. The original
351 * "`SECTIONS`" content is computed and passed as an argument to this
352 * template, which makes it relatively simple to perform small changes to
353 * the "`SECTIONS`" content without having to explicitly handle every
354 * section required by the compiler toolchain.
355 *
356 * The `sectionsTemplate` string names a package path relative path; e.g.,
357 * if the linker template you want to specify is
358 * `"templates/mySections.xdt"` in the package `myCompany.myPackage`,
359 * `sectionsTemplate` should be set to:
360 * @p(code) 361 * "myCompany/myPackage/templates/mySections.xdt"
362 * @p 363 * If `sectionsTemplate` begins with the string `"./"`, the file is NOT
364 * searched for along the package path; instead the file name is taken
365 * to specify a file relative to the current working directory.
366 *
367 * In any case, if `sectionsTemplate` is non-`null`, the file must exist;
368 * otherwise, the configuration step will fail.
369 *
370 * During expansion of this template, there are three "parameters"
371 * that can be referenced to generate new content.
372 * @p(dlist) 373 * - `this`
374 * reference to the `{@link Program}` object
375 * - `$args[0]`
376 * is the complete section map derived from
377 * `{@link Program#sectMap}`; some special sections relavent to
378 * XDCtools are added to the map defined by `Program.sectMap`.
379 * - `$args[1]`
380 * is a string that contains the content that would have been
381 * placed in the `SECTIONS` portion of the generated linker
382 * command file. This allows templates to easily modify this
383 * content or simply add statements before or after it.
384 * @p 385 * @a(Example) 386 * The following template, specific to TI compiler tools, adds start
387 * and size symbols for the `.stack` section and ensures that the stack
388 * is the first section to be allocated in its designated memory segment.
389 * @p(code) 390 * %// first output allocation for the .stack section
391 * %var sectMap = $args[0];
392 * %var stack = sectMap[".stack"];
393 * .stack: >`stack.loadSegment` START(_stack_start) SIZE(_stack_size)
394 * %
395 * %// now append the normally generated content
396 * `$args[1]`
397 * @p 398 * Note: this example requires that the `.stack` section be excluded
399 * from the normal generation via `{@link sectionsExclude}`; otherwise
400 * this section will be specified twice by the template shown above.
401 * @p(code) 402 * Program.sectionsExclude = "^\.stack$";
403 * @p 404 */
405 config String sectionsTemplate = null;
406
407 /*!
408 * ======== system ========
409 * @_nodoc 410 * A facade for the {@link xdc.runtime.System#SupportProxy} parameter
411 *
412 * The program configuration script may select an implementation of
413 * the `xdc.runtime.ISystemSupport` interface and "bind" it by setting
414 * this parameter. If the module assigned to this parameter does not
415 * inherit from `xdc.runtime.ISystemSupport`, the configuration will fail.
416 *
417 * If this parameter is not set (or set to `undefined`), then a default
418 * implementation is used: `xdc.runtime.SysStd` or, if
419 * `Program.build.target.os` is `null`, `xdc.runtime.SysMin`. Recall that
420 * `Program.build.target.os` is specified in the Build Object Model;
421 * `Program.build.target` is the target specified when the executable was
422 * added to the package.
423 *
424 * If this parameter is set to `null`, then the `System` module is not
425 * linked into the application (unless 'Memory' is used); any references
426 * to `System`'s methods will result in a linker error. By setting this
427 * parameter to `null`, one is asserting that `System`'s methods will not
428 * be used.
429 */
430 config Any system;
431
432 /*!
433 * ======== name ========
434 * The name of the executable file
435 *
436 * This is the full file name (relative to the package's base) of the
437 * executable that results from this configuration.
438 *
439 * @a(readonly) 440 * This parameter is set by the generated program configuration script
441 * and must not be modified.
442 */
443 config String name;
444
445 /*!
446 * ======== buildPackage ========
447 * The name of the executable's package
448 *
449 * This is the full package name (relative to the package's repository)
450 * of the package that contains the executable being configured.
451 *
452 * @a(readonly) 453 * This parameter is set by the generated program configuration script
454 * and must not be modified.
455 */
456 config String buildPackage;
457
458 /*!
459 * ======== endian ========
460 * The endianess of the executable
461 *
462 * This parameter is an alias for `build.target.model.dataModel` and is
463 * set to one of the following values: `"big"`, `"little"`, or `null`.
464 *
465 * @a(readonly) 466 * This parameter is set by the generated program configuration script
467 * and must not be modified.
468 */
469 config String endian = null;
470
471 /*!
472 * ======== codeModel ========
473 * The memory model for code
474 *
475 * This parameter is an alias for `build.target.model.codeModel` and is
476 * set to one of the following target-specific values: `"near"`, `"far"`,
477 * `"large"`, or `null`.
478 *
479 * @a(readonly) 480 * This parameter is set by the generated program configuration script
481 * and must not be modified.
482 */
483 config String codeModel = null;
484
485 /*!
486 * ======== dataModel ========
487 * The memory model for data
488 *
489 * This parameter is an alias for `build.target.model.dataModel` and is
490 * set to one of the following target-specific values: `"near"`, `"far"`,
491 * `"large"`, or `null`.
492 *
493 * @a(readonly) 494 * This parameter is set by the generated program configuration script
495 * and must not be modified.
496 */
497 config String dataModel = null;
498
499 /*!
500 * ======== build ========
501 * This program's build attributes
502 *
503 * This parameter allows arbitrary build attributes to be carried
504 * forward from the Build Object Model (BOM) into the configuration
505 * model for program configuration scripts to read.
506 *
507 * Conceptually, this config parameter should be declared as follows:
508 * @p(code) 509 * struct BuildAttrs inherits xdc.bld.Executable.Attrs {
510 * config xdc.bld.ITarget.Module target;
511 * };
512 * @p 513 * All parameters of the target associated with the executable being
514 * configured are available through '`Program.build.target`'. Any config
515 * parameter set in the BOM's `{@link xdc.bld.Executable#attrs}` is also
516 * available through `{@link #build}`. For example, the name of the
517 * target is `Program.build.target.name` and the name of the
518 * executable's configuration script is `Program.build.cfgScript`.
519 *
520 * @a(readonly) 521 * This parameter is set by the generated program configuration script
522 * and must not be modified.
523 */
524 config Any build; /* BuildAttrs */
525
526 /*!
527 * ======== cpu ========
528 * The execution context "seen" by the executable.
529 *
530 * Since the execution context is largely determined by the CPU that
531 * runs the executable, this configuration parameter allows scripts with
532 * access to the program object to conditionally configure based on CPU
533 * characteristics (e.g., ISA or revision of a chip).
534 *
535 * @a(readonly) 536 * This parameter is set by the platform's implementation of
537 * `xdc.IPackage` (i.e., `package.xs`).
538 */
539 config xdc.platform.IExeContext.Instance cpu;
540
541 /*!
542 * ======== platformName ========
543 * The name of the executable's platform
544 *
545 * This field is the name of the platform instance used to create the
546 * executable; e.g., `"ti.platforms.sim55xx"`, or
547 * `"ti.platforms.sim6xxx:TMS320C6416"`.
548 *
549 * Platform instance names have the form:
550 * @p(code) 551 * <platform_pkg>:<instance_id>
552 * @p 553 * where `<platform_pkg>` is the name of the platform package
554 * responsible for creating the platform instance and the optional
555 * "`:<instance_id>`" is a suffix that uniquely identifies the creation
556 * parameters for this instance.
557 *
558 * The creation parameters are the values specified by the map
559 * `{@link xdc.bld.BuildEnvironment#platformTable}`;
560 * if this map does not contain the platform instance name, the
561 * instance is created with default values that are specific to the
562 * platform.
563 *
564 * @a(readonly) 565 * This parameter is set by the generated program configuration script
566 * and must not be modified.
567 */
568 config String platformName;
569
570 /*!
571 * ======== platform ========
572 * The executable's platform instance object
573 *
574 * The platform instance that provided an execution context for the
575 * executable being configured.
576 *
577 * @a(readonly) 578 * This parameter is set by the generated program configuration script
579 * and must not be modified.
580 */
581 config xdc.platform.IPlatform.Instance platform;
582
583 /*!
584 * ======== global ========
585 * Global variable declarations
586 *
587 * Assignments to this hash table become global symbols that can be
588 * used to directly reference objects. These objects are declared
589 * in a generated header that is indirectly included by the header
590 * `xdc/cfg/global.h`.
591 *
592 * Configuration scripts define symbols by adding new properties to
593 * `global`.
594 * @p(code) 595 * Program.global.myInstance = Mod.create();
596 * Program.global.myString = "hello world";
597 * @p 598 *
599 * Programs can reference the symbols defined in `global` by including
600 * the C/C++ header `xdc/cfg/global.h` as follows:
601 * @p(code) 602 * #include <pkg/Mod.h>
603 * #include <xdc/cfg/global.h>
604 * :
605 * Mod_fxn(myInstance, ...);
606 * printf("greetings: %s\n", myString);
607 * @p 608 *
609 * To compile sources that include `xdc/cfg/global.h`, one symbol must be
610 * defined before including this header:
611 * @p(dlist) 612 * - `xdc_cfg__header__`
613 * the package qualified name of the executable-specific C/C++
614 * header generated by the program configuration tool; e.g.,
615 * `local/examples/package/cfg/mycfg_x62.h`.
616 * @p 617 * For example, to compile sources that reference the values declared in
618 * `{@link #global}` for a TI C6x target with a generated
619 * configuration header named `package/cfg/mycfg_x62.h` in a package
620 * named `local.examples` the following command line is sufficient:
621 * @p(code) 622 * cl6x -Dxdc_cfg__header__=local/examples/package/cfg/mycfg_x62.h ...
623 * @p 624 *
625 * The `xdc_cfg__header__` symbol is automatically defined when you use
626 * the the XDC Build Engine (`{@link xdc.bld}`) to create executables; see
627 * `{@link xdc.bld.Executable#addObjects}`
628 *
629 * @see xdc.bld.Executable#addObjects
630 */
631 config Any global[string];
632
633 /*!
634 * ======== symbol ========
635 * Global symbol specifications
636 *
637 * UNDER CONSTRUCTION
638 * @_nodoc 639 *
640 * This map contains symbol definitions that are used to define alises
641 * or constants. Symbol names are the C symbol names; i.e., compiler name
642 * mangling, such as the addition of a leading "_", is performed
643 * automatically.
644 *
645 * @a(Examples) 646 * To define a symbolic constant:
647 * @p(code) 648 * Program.symbol["ONE"] = 1;
649 * @p 650 * The line above causes the symbol "ONE" to be defined in the linker
651 * command file to be equal to 1. Note this in contrast to defining a
652 * variable whose value is 1; symbols do not occupy space, they are just
653 * symbolic constants defined in the symbol table of the executable.
654 *
655 * This is currently used by xdc.runtime.Startup to define symbols
656 * optionally referenced by boot files that support early startup
657 * "reset" functions.
658 *
659 * The only other use of this map is to define symbolic names for
660 * statically created instances as part of the support for legacy
661 * BIOS 5 instance names.
662 */
663 config Any symbol[string];
664
665 /*!
666 * ======== fixedCodeAddr ========
667 * UNDER CONSTRUCTION
668 * @_nodoc 669 *
670 * fixed location of code for ROM assemblies
671 */
672 config UInt fixedCodeAddr = 0;
673
674 /*!
675 * ======== fixedDataAddr ========
676 * UNDER CONSTRUCTION
677 * @_nodoc 678 *
679 * fixed location of data for ROM assemblies
680 */
681 config UInt fixedDataAddr = 0;
682
683 /*!
684 * ======== loadFixedDataAddr ========
685 * UNDER CONSTRUCTION
686 * @_nodoc 687 *
688 * Load location of fixed data accessed from ROM assemblies
689 *
690 * If an application that imports ROM assemblies cannot load data
691 * accessed from ROM to a runtime address, this address specifies the
692 * load address. The load address is specified when the application is
693 * configured. The runtime address for the data is specified at the
694 * time a ROM assembly is built, using `fixedDataAddr`.
695 */
696 config UInt loadFixedDataAddr;
697
698 /*!
699 * ======== loadRom ========
700 * UNDER CONSTRUCTION
701 * @_nodoc 702 *
703 * Control generation of 'type = DSECT' for ROM assemblies.
704 *
705 * When there is no actual ROM on the target, for debugging purposes,
706 * we may need to load ROM sections to the target. If this parameter is
707 * set to `true`, the linker command file will allocate ROM sections in
708 * the same way as other sections.
709 */
710 config Bool loadRom = false;
711
712 /*!
713 * ======== exportModule ========
714 * Force all the symbols of a module to be part of a configuration
715 *
716 * Although a call xdc.useModule() will force some of a module's methods
717 * to be part of a configuration, the linker is still free to omit any
718 * symbols that are not referenced. Use of exportModule will force all
719 * methods of the specified module to be available.
720 */
721 Void exportModule(String modName);
722
723 /*!
724 * ======== freezeRomConfig ========
725 * UNDER CONSTRUCTION
726 * @_nodoc 727 */
728 Void freezeRomConfig(String modName, String cfgName);
729
730 /*!
731 * ======== freezeRomConfig2 ========
732 * UNDER CONSTRUCTION
733 * @_nodoc 734 */
735 function freezeRomConfig2(mod, cfgName);
736
737 /*!
738 * ======== freezeRomParams ========
739 * UNDER CONSTRUCTION
740 * @_nodoc 741 */
742 function freezeRomParams(mod);
743
744 /*!
745 * ======== frozenRomConfig ========
746 * UNDER CONSTRUCTION
747 * @_nodoc 748 */
749 Bool frozenRomConfig(String modName, String cfgName );
750
751 /*!
752 * ======== frozenRomConfig2 ========
753 * UNDER CONSTRUCTION
754 * @_nodoc 755 */
756 function frozenRomConfig2(mod, cfgName);
757
758 /*!
759 * ======== getSectMap ========
760 * Return the complete mapping of section names to `{@link #SectionSpec}`
761 * entries
762 *
763 * The returned map is assembled from `{@link xdc.bld.ITarget#sectMap}`,
764 * `{@link xdc.platform.IPlatform#sectMap}`,
765 * `{@link xdc.platform.IPlatform#codeMemory}`,
766 * `{@link xdc.platform.IPlatform#dataMemory}`,
767 * `{@link xdc.platform.IPlatform#stackMemory}` and `{@link #sectMap}`.
768 * The function can be called at any time during configuration, but if
769 * it is called before all packages had a chance to change `sectMap`,
770 * the returned map may not correspond to the actual section
771 * allocation as configured in the linker command file.
772 *
773 * @a(returns) 774 * `getSectMap` returns a map with section names as keys and
775 * `{@link #SectionSpec}` entries as values.
776 *
777 * @a(Note) 778 * If BIOS 5 configuration script (Tconf script) is executed, the
779 * section allocations configured in the Tconf script are also being
780 * returned.
781 */
782 function getSectMap();
783
784 /*!
785 * ======== importAssembly ========
786 * UNDER CONSTRUCTION
787 * @_nodoc 788 */
789 Void importAssembly(String asmName);
790
791 /*!
792 * ======== importRomAssembly ========
793 * UNDER CONSTRUCTION
794 * @_nodoc 795 */
796 Void importRomAssembly(String romAsmName);
797
798 /*!
799 * ======== patchRomFxn ========
800 * UNDER CONSTRUCTION
801 * @_nodoc 802 */
803 Void patchRomFxn(String modName, String fxnName, String patchSym);
804
805 /*!
806 * ======== targetModules ========
807 * UNDER CONSTRUCTION
808 * @_nodoc 809 *
810 * This function returns a list of target modules. The list is completed
811 * only after all packages are closed, and runtime.finalized() is closed,
812 * so the only time when this function can be safely called is from
813 * within module$static$init and instance$static$init functions, package
814 * validate() functions, and templates.
815 */
816 function targetModules();
817
818 }
819 /*
820 * @(#) xdc.cfg; 1, 0, 2, 0,296; 11-16-2010 11:20:05; /db/ztree/library/trees/xdc/xdc-v53x/src/packages/
821 */
822