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.

Compile the output C code of configuro

Hi,

I plan to divide  the build process of configuration script(.cfg) into two steps in a non-CCS environment. Firstly, I invoke 'xs xdc.tools.configuro xxx --generationOnly xxx.cfg' to generate a output C code with a name like xxx_p64.c, then i want to know where i could find the detailed compiler options to compile the c file to a final xxx_p64.oe64 object file(of course when the --generationOnly option is disabled)? I need grantee that the compiler options on my side is all the same with the xdctools build process. Thanks. 

Allen

  • Allen,
    if you pass the option -v on the configuro command line (but without --generationOnly), you'll see the complete command line that compiles xxx_p64.c. Then, you can replicate that command line in your build.

  • Hi Sasha,

    Thanks for the reply.

    And I have another question, as the default generated objective file always named like 'xxx.o64' rather than 'xxx.o' or 'xxx.obj'. This is because of the '-eo.o64' option in compiler command line. Thus in the generated linker script "linker.cmd", the objective that will be linked is 'xxx.o64'. But when I use --generationOnly to force the xdctools only produce xxx.c rather than xxx.o64, and then invoke compiler to build the xxx.c to xxx.obj(I can't change the compiler option here since it's fixed in my tools). There will be error during linking, since linker.cmd want to link xxx.o64, but there is no file named xxx.o64, while only xxx.obj here...  I don't want to rename xxx.obj to xxx.o64 since it is not a general method. So do you have any idea on this problem? Thanks for any reply.

    Allen

  • Allen,
    there is no option that you could pass on the configuro command line to change the extension for the object file. The only option I know of is as much of a hack as these other options that you don't want to use, but I'll explain it anyway. You would have to create a file config.bld and then change the suffix for your target there:
    var C64 = xdc.module("ti.targets.C64");
    C64.suffix = "bj";

    Then, on the configuro command line you have to pass the option -b config.bld. I am assuming that your target is ti.targets.C64, if not adjust accordingly. Each object file extension always starts with ".o" and then you add the suffix and get ".obj".
    This is a very non standard thing to do and you can't do it in your case because you are not building a RTSC package that you will deliver to others. In any such case, changing the suffix would create many different problems.

  • Hi Sasha,

    Thanks for the detailed reply and I think i will try to solve it in other way.

    But I just feels that it's a little unreasonable to generate a objective file without the traditional suffix '.obj' or '.o', it will introduce potential issues when the build environment is not CCS or standard command line.

    Allen