Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 228459

Forum Post: RE: CCS: Log custom messages and read them in code direcly

$
0
0
Hi Daniel, You can add this (and remove LoggingSetup if you have it). BIOS.logsEnabled = true; var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var Defaults = xdc.useModule('xdc.runtime.Defaults'); var loggerBufParams = new LoggerBuf.Params(); loggerBufParams.bufType = LoggerBuf.BufType_CIRCULAR; // most recent state loggerBufParams.numEntries = 2048; var logger0 = LoggerBuf.create(loggerBufParams); Defaults.common$.logger = logger0; Task.common$.diags_USER1 = xdc.module("xdc.runtime.Diags").ALWAYS_ON; Task.common$.diags_USER2 = xdc.module("xdc.runtime.Diags").ALWAYS_ON; //other modules as needed. This makes one logger instance that all modules use. You can look in the cdoc for a module to see what diags mask needs to be enabled. For example, here is the Task context switch Note: LoggerBuf is not supported by LoggingSetup. When you use LoggerBuf, you have to manually do all the things that LoggingSetup was doing for you (e.g. creating logger instances, enabling module's diag mask, etc. Note: you can use multiple logger instances and assign then specifically to certain modules. That's what LoggingSetup does (xdc.runtime.Main gets one, BIOS's Load module gets one and the rest of the BIOS modules get one). This is controlled by the .common$.logger field. If it is not explicitly set, it inherits from xdc.runtime.Defaults. Note: the runtime code does not change. It still uses Log_XYZ. Todd

Viewing all articles
Browse latest Browse all 228459

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>