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.

restrict is not allowed

Other Parts Discussed in Thread: DM3730

Hello everyone.

I am now working on a project about video processing on DM3730.

My own algorithm runs on the DSP, and I want to optimize it because of its bad performance.

So I followed the "C64/C64+ Compiler Optimization Trick" found on TI website.

I tried  adding restrict qualifiers. 

But when I compile my DSP code.

It showed this error message : restrict is not allowed.

Could anyone solve it?

By the way, what does the compile option "-mo" means?

Thanks in advance.

  • Jay Yeh said:

    I tried  adding restrict qualifiers. 

    But when I compile my DSP code.

    It showed this error message : restrict is not allowed.

    You almost certainly put the restrict keyword in the wrong place.  Make sure your code uses restrict in the same manner as the examples.  If you are still having problems, build with --verbose_diagnostics, then copy the exact error message into your next post. 

    Jay Yeh said:
    By the way, what does the compile option "-mo" means?

    You can read up on all the compiler options in the C6000 compiler book.  Or, if you are working from the command line, use this command to get help on a particular option:

    % cl6x -h option

    Thanks and regards,

    -George

  • Hi,

    I've check problem about restrict qualifiers, and indeed, I put it in wrong place. THX!

    Another question.

    In C64p_cgt_optimization.pdf, I would need *.asm file to check some build information.

    How could I get .asm file?

    I check on the Internet, and tried several ways, but it just didn't show up.

    Content of my config.bld is as following. And I use DVSDK_4_02 with cgt6x_6_1_14

    var Build = xdc.useModule("xdc.bld.BuildEnvironment");
    var Pkg = xdc.useModule("xdc.bld.PackageContents");
    var C64P_rootdir;

    /* initialize local vars with those set in rules.mak (via XDCARGS) */
    for (x = 0; x < arguments.length; x++) {
    if (arguments[x].match(/^CGTOOLS_C64P=/)) {
    C64P_rootdir = arguments[x].split("=")[1];
    }
    }

    /* should test here that cgRootDir is set! */
    var targ = xdc.useModule("ti.targets.C64P");
    targ.rootDir = C64P_rootdir;
    targ.extensions[".asm"] = {
    suf: ".asm", typ: "asm:-fa"
    }
    targ.ccOpts.suffix = "-o -mv64+ -s -mw -pdv";
    Build.targets.$add(targ);



    /* We remove a few profiles, just to cut down on build time */
    delete targ.profiles["coverage"];
    delete targ.profiles["profile"];
    delete targ.profiles["whole_program"];
    delete targ.profiles["whole_program_debug"];


    /* Create a .zip file for redistribution. Remove this line if you prefer .tar */
    Pkg.attrs.archiver = 'zip';
  • Jay Yeh said:
    How could I get .asm file?

    The compiler always generates an assembly file with the extension .asm.  By default, this file is deleted after it is assembled to an object file with extension .obj.  But you are using -mw, and that causes the .asm file to remain, and not be deleted.  My guess you aren't looking for it in the right place.  I notice you build with XDC (also called RTSC).  I don't know much about that.  But you should still be able to find the .asm files.  If you are running a Unix-like shell, use the find command.  If you are on Windows, use the Search built in to Windows Explorer.

    Thanks and regards,

    -George

  • Sadly, I searched the whole directory.

    Just couldn't find *.asm files.

    I use Linux by the way.

  • Sorry, but I just remembered that XDC tools have their own convention for naming assembly files.  I think they use the extension .s64.  It is definitely .s followed by two digits.  Try to search for that instead.

    Thanks and regards,

    -George