Guest User

Untitled

a guest
Mar 30th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. var Defaults = xdc.useModule('xdc.runtime.Defaults');
  2. var Diags = xdc.useModule('xdc.runtime.Diags');
  3. var Error = xdc.useModule('xdc.runtime.Error');
  4. var Log = xdc.useModule('xdc.runtime.Log');
  5. var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
  6. var Main = xdc.useModule('xdc.runtime.Main');
  7. var SysMin = xdc.useModule('xdc.runtime.SysMin');
  8. var System = xdc.useModule('xdc.runtime.System');
  9. var Text = xdc.useModule('xdc.runtime.Text');
  10.  
  11. var BIOS = xdc.useModule('ti.sysbios.BIOS');
  12. var Task = xdc.useModule('ti.sysbios.knl.Task');
  13.  
  14. var Hwi = xdc.useModule('ti.sysbios.family.c28.Hwi');
  15. var Boot = xdc.useModule('ti.catalog.c2800.initF2837x.Boot');
  16. var Idle = xdc.useModule('ti.sysbios.knl.Idle');
  17.  
  18. /*
  19. * Uncomment this line to globally disable Asserts.
  20. * All modules inherit the default from the 'Defaults' module. You
  21. * can override these defaults on a per-module basis using Module.common$.
  22. * Disabling Asserts will save code space and improve runtime performance.
  23. Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
  24. */
  25.  
  26. /*
  27. * Uncomment this line to keep module names from being loaded on the target.
  28. * The module name strings are placed in the .const section. Setting this
  29. * parameter to false will save space in the .const section. Error and
  30. * Assert messages will contain an "unknown module" prefix instead
  31. * of the actual module name.
  32. */
  33. Defaults.common$.namedModule = false;
  34.  
  35. /*
  36. * Minimize exit handler array in System. The System module includes
  37. * an array of functions that are registered with System_atexit() to be
  38. * called by System_exit().
  39. */
  40. System.maxAtexitHandlers = 4;
  41.  
  42. /*
  43. * Uncomment this line to disable the Error print function.
  44. * We lose error information when this is disabled since the errors are
  45. * not printed. Disabling the raiseHook will save some code space if
  46. * your app is not using System_printf() since the Error_print() function
  47. * calls System_printf().
  48. Error.raiseHook = null;
  49. */
  50.  
  51. /*
  52. * Uncomment this line to keep Error, Assert, and Log strings from being
  53. * loaded on the target. These strings are placed in the .const section.
  54. * Setting this parameter to false will save space in the .const section.
  55. * Error, Assert and Log message will print raw ids and args instead of
  56. * a formatted message.
  57. */
  58. Text.isLoaded = false;
  59.  
  60. /*
  61. * Uncomment this line to disable the output of characters by SysMin
  62. * when the program exits. SysMin writes characters to a circular buffer.
  63. * This buffer can be viewed using the SysMin Output view in ROV.
  64. */
  65. SysMin.flushAtExit = false;
  66.  
  67. /*
  68. * The BIOS module will create the default heap for the system.
  69. * Specify the size of this default heap.
  70. */
  71. BIOS.heapSize = 0x0;
  72.  
  73. /* System stack size (used by ISRs and Swis) */
  74. Program.stack = 0x100;
  75.  
  76. /* Circular buffer size for System_printf() */
  77. SysMin.bufSize = 128;
  78.  
  79. /*
  80. * Create and install logger for the whole system
  81. */
  82. var loggerBufParams = new LoggerBuf.Params();
  83. loggerBufParams.numEntries = 4;
  84. var logger0 = LoggerBuf.create(loggerBufParams);
  85. Defaults.common$.logger = logger0;
  86. Main.common$.diags_INFO = Diags.ALWAYS_ON;
  87. Boot.configureFlashWaitStates = true;
  88. Boot.enableFlashDataCache = true;
  89. Boot.configureClocks = true;
  90. Boot.SPLLIMULT = 40;
  91. Boot.OSCCLKSRCSEL = Boot.OscClk_INTOSC2;
  92. Boot.SYSCLKDIVSEL = 1;
  93.  
  94. System.SupportProxy = SysMin;
  95.  
  96. /*
  97. * Build a custom BIOS library. The custom library will be smaller than the
  98. * pre-built "instrumented" (default) and "non-instrumented" libraries.
  99. *
  100. * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
  101. * within BIOS for this custom build. These logs are used by the RTA and
  102. * UIA analysis tools.
  103. *
  104. * The BIOS.assertsEnabled parameter specifies whether BIOS code will
  105. * include Assert() checks. Setting this parameter to 'false' will generate
  106. * smaller and faster code, but having asserts enabled is recommended for
  107. * early development as the Assert() checks will catch lots of programming
  108. * errors (invalid parameters, etc.)
  109. */
  110. BIOS.libType = BIOS.LibType_Custom;
  111. BIOS.logsEnabled = false;
  112. BIOS.assertsEnabled = true;
  113. BIOS.cpuFreq.lo = 200000000;
  114.  
  115. /*
  116. * Create a task. The 'taskFxn' function can be found in main.c.
  117. */
  118. var task0Params = new Task.Params();
  119. task0Params.instance.name = "task0";
  120. task0Params.stackSize = 256;
  121. task0Params.priority = 2;
  122. Program.global.task0 = Task.create("&taskFxn1", task0Params);
  123.  
  124. var task1Params = new Task.Params();
  125. task1Params.instance.name = "task1";
  126. task1Params.stackSize = 256;
  127. task1Params.priority = 2;
  128. Program.global.task1 = Task.create("&taskFxn2", task1Params);
  129.  
  130. // Idle.addFunc("&myIdleFxn");
  131. Idle.idleFxns[0] = "&myIdleFxn";
  132.  
Advertisement
Add Comment
Please, Sign In to add comment