This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Suggested parenthesis around expression on Log_info

Other Parts Discussed in Thread: SYSBIOS, TM4C129XNCZAD

I'm getting this weird compiler warning whenever I use one of the UIA loggers:

Suggested parenthesis around expression 'Log_info0 ( "this is my debug message" )'

In fact, for each line of log code, the compiler is generating 3 of such warnings.

Here is what my includes look like:

#include <xdc/std.h>
#include <xdc/cfg/global.h>

/* BIOS Header files */
#include <ti/sysbios/BIOS.h>
#include <xdc/runtime/Log.h>

/* TI-RTOS Header files */
#include <ti/drivers/GPIO.h>

#include <stdint.h>
#include <stdbool.h>

#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"

#include "Board.h"

  • Hi Paolo,

    What version of TI-RTOS are you using and what platform?  Could you also post your .cfg file?

    Thanks,

        Janet

  • Hi Janet,

    CCS 6.1
    TI-RTOS 2.12.01.33
    Tivaware 2.1.1.71

    Here is the .cfg:

    /* ================ General configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Main = xdc.useModule('xdc.runtime.Main');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');

    /* ================ System configuration ================ */
    var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    System.SupportProxy = SysCallback;
    System.maxAtexitHandlers = 0;

    /* Remove debug strings from the application */
    Text.isLoaded = false;

    /* Remove the raise hook from the application */
    Error.raiseHook = null;

    /*
    * Program.stack is ignored with IAR. Use the project options in
    * IAR Embedded Workbench to alter the system stack size.
    */
    if (!Program.build.target.$name.match(/iar/)) {
    /*
    * Reducing the system stack size (used by ISRs and Swis) to reduce
    * RAM usage.
    */
    Program.stack = 1024;
    }

    /* ================ Kernel configuration ================ */
    /* Use Custom library with no logging or asserts */
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;

    BIOS.heapSize = 1024;

    /* Do not allow dynamic creation of kernel objects */
    BIOS.runtimeCreatesEnabled = false;

    /* Do allow Swis in the system */
    BIOS.swiEnabled = false;

    /* Do not use Hwi_excHandlerMin */
    m3Hwi.excHandlerFunc = null;

    /* ================ Driver configuration ================ */
    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    TIRTOS.useGPIO = true;
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    LoggingSetup.sysbiosHwiLogging = true;
    LoggingSetup.sysbiosSwiLogging = true;
    var task0Params = new Task.Params();
    task0Params.instance.name = "main_task_background";
    Program.global.main_task_background = Task.create("&main_task_background_fxn", task0Params);
  • Hi Paolo,

    There was such a warning with UIA 2.00.01.34, but your version of TI-RTOS has UIA 2.00.01.39, with that particular warning fixed.  So you are either running into another warning that I can't reproduce yet, or your project settings are causing an older version of UIA to be used.  Can you tell me what version of the code gen tools you are using?  Also, can you check your project properties, unger General -> RTSC, and see what versions the "Products and Repositories" is showing?

    Thanks,

        Janet

  • Hi Janet,

    Here's what I see in the RTSC page:
    XDCtools version: 3.31.0.24_core
    check on TI_RTOS for TivaC, 2.12.1.33
    check on "Other Repositories - ${TARGET_CONTENT_BASE} [c:\ti\ccsv6\ccs_base]
    Target: ti.targets.arm.elf.M4F
    Platform: ti.platforms.tiva:TM4C129XNCZAD
    Build-profile: release

    How do I know which version of UIA I am using?

    Cheers
  • Hi Paolo,
    If you look in your TI-RTOS installation directory, there is a directory called 'products', where you should see uia_2_00_02_39. If you don't have any other products checked (in particular, an older uia) on the RTSC page, then you will be using the BIOS, UIA, etc, of the TI-RTOS installation. So it looks like you're using UIA 2.00.02.39. It's strange, though, that I'm not getting this warning.

    Do you see the same warning in the HelloWorld instrumentation example (you can find this with the Resource Explorer in CCS)? Is there any more information about where the warning occurs other than in Log_info0? My guess is that it's in some EventHdr macro.
    Best regards,
    Janet
  • I'll try the hello world, but I have a feeling this problem will not show up there.

    If that confirms true I'll compare the two projects. I was hoping there was a simple and known answer to this one.

    Cheers