[FAQ] F29x Compiler: Frequently Asked Questions

Part Number: F29H859TU-Q1

Tool/software:

Where can I find answers to frequently asked questions related to using F29x compiler?

  • For reference, please see F29x General FAQ for other IP/peripherals

    F29x Compiler Frequently Asked Questions

    Why are there differences in my generated .out files from 2 CPUs even though program code is the same between the two cores?

    • Some differences that can be expected between 2 builds of the same project are the time stamp and possibly text strings containing path information for files used by the compiler. It is recommended to use a tool called objdiff from our CG_XML package to do this comparison. This compares only the relevant parts of the .out files that are actually loaded to the device.

    What level of optimization is performed when using the fast optimization? What is the default optimization level?

    • Usage of '-O0' is NOT recommended as it generates inefficient code and does not improve debuggability. '-O1' should be used instead.
    • '-O3' option enables software pipelining.
    • The default optimization level is '-O1'.
    • From the compiler user guide: "-Ofast: Enables all optimizations available at -O3 plus additional aggressive optimizations that have the potential for additional performance gains, but are not guaranteed to be in strict compliance with language standards."

    How do I generate a hex file at build time in my F29 project? 

    • Hex files can be created using the c29objcopy utility. This can be added as a post-build step in CCS project properties. Documentation on this specific topic can be found here

    If I leave the “Select assumed C language standard” blank in the compiler settings, what will the standard behavior be? 

    • If no -std option is specified on the c29clang command line, then -std=gnu17 is assumed for C source files and -std=gnu++17 is assumed for C++ source files. Documentation on this specific topic can be found here

    Is it possible to run a program on Flash much faster with "optimization" and "no optimization"? Is it similar to SIMD or pipeline?

    • '-00' is “off” meaning no optimization. The code will be slow and large. The compiler won’t even keep variables in registers when they are reused just a few instructions later. Instead it will store and then reload.
    • '-01' is recommended as a minimum level. This level is good for initial development and debug. '-01' does not include generation of parallel instructions.
    • '-02' adds parallel instructions.
    • How much faster flash-based code is with -01 compared to -02 will depend on the code itself.

    What is the compiler qualification kit?

    • The Compiler qualification kit covers the toolchain, which includes compiler, linker, and hex utility. It does not cover CCS IDE. A brief over is described in the TI Compiler Qualification Kit app note

    If the main loop is interrupted while writing a floating value, will the float variable read in the ISR be corrupted? Does the F29 have any optimizations for this scenario, or is there a way to optimize the floating-point write operation into a single instruction?