Other Parts Discussed in Thread: OMAPL138, SYSBIOS
I would like to display the log statements that are found in the PDK drivers. As just one of the many examples, in I2C_v0.c:
I2C_drv_log1("\n I2C: Object created 0x%x \n", hwAttrs->baseAddr);
I2C_drv_log.h contains the following:
#ifdef CIO_DRV_CONSOLE #define I2C_drv_log printf #define I2C_drv_log1 printf #define I2C_drv_log2 printf #define I2C_drv_log3 printf #else #define I2C_drv_log(x) #define I2C_drv_log1(x,y) #define I2C_drv_log2(x,y,z) #define I2C_drv_log3(x,y,z,l) #endif
Which can be configured to route these to "printf", and also something else. It looks to me like the second set of #define's is missing something? I would like to use the UIA instrumentation package, but I don't understand what to do at this point. I have tried to include the UIA Log_info0() function in this header, but I am then not sure how to (re)build the driver with the correct XDC paths. The following does NOT work as an edit to I2C_drv_log.h:
#include <xdc/runtime/Log.h> #include <xdc/runtime/Diags.h> … #define I2C_drv_log(x) Log_info0(x)
Note, that I am able to use the UIA Log_info0() and Log_print0() functions successfully in my custom code, otherwise. I am so far not able to get the instrumentation that exists in the PDK drivers working, however. For reference, my logging cfg:
/* Load the Unified Instrumentation Architecture */
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
var Diags = xdc.useModule('xdc.runtime.Diags');
var Load = xdc.useModule('ti.sysbios.utils.Load');
Task.common$.diags_USER1 = Diags.ALWAYS_OFF;
Task.common$.diags_USER2 = Diags.ALWAYS_OFF;
Main.common$.diags_USER1 = Diags.ALWAYS_ON;
Main.common$.diags_USER2 = Diags.ALWAYS_ON;
CCS Version: 9.2.0.00013
pdk_omapl138_1_0_10