1 2 3 4 5 6 7 8 9 10 11
12 13 14
15 import xdc.runtime.Types;
16
17 /*!
18 * ======== SysBuf ========
19 * Minimal implementation of ISystemSupport
20 *
21 * This module provides a simple but 100% portable implementation of the
22 * `{@link ISystemSupport}` interface.
23 */
24 module SysBuf inherits xdc.runtime.ISystemSupport {
25
26 /*!
27 * ======== bufSize ========
28 * Size (in MAUs) of the output.
29 *
30 * An internal buffer of this size is allocated. All output is stored
31 * in this internal buffer.
32 *
33 * If 0 is specified for the size, no buffer is created and all output
34 * is simply dropped.
35 */
36 config SizeT bufSize = 1024;
37
38 /*!
39 * ======== bufName ========
40 * Global variable name containing pointer to output buffer
41 *
42 * This variable will be created so that it is easy to view the
43 * contents of the output buffer within a debugger. If `bufName` is
44 * set to `null` or `undefined`, the variable will not be created.
45 */
46 metaonly config String bufName = "SYSBUF";
47
48 /*!
49 * ======== sectionName ========
50 * Section where the internal buffer managed by `SysBuf` is placed.
51 *
52 * The default is to have no explicit placement.
53 */
54 metaonly config String sectionName = null;
55
56 internal:
57
58 struct Module_State {
59 Char outbuf[];
60 UInt outidx;
61 }
62 }