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.

invalid instruction schedule generated

Just upgraded to CCS Version: 5.1.0.09000 and re-built an existing project.
The target processor is C6713.  In the console log I got the following errors:
 

warning: automatic library build: using library "C:/ti/ccsv5/tools/compiler/c6000/lib/rts6700_elf.lib" for the first time,
so it must be built. This may take a few minutes.
error: function sin in file sin.c : invalid instruction schedule generated; try reducing speed optimization levels
"sqrtf_i.h", line 40: warning: variable "f" was set but never used
"sqrtf_i.h", line 40: warning: variable "f" was set but never used
error: function tanh in file tanh.c : invalid instruction schedule generated; try reducing speed optimization levels
According to this thread
(http://e2e.ti.com/support/development_tools/compiler/f/343/t/109799.aspx#389197)
this is a bug that produces erroneous code. 
  1. Is the newly build library rts6700_elf.lib bad?
  2. If so what is the fix?
  3. When will this very critical bug be fixed?
  • If you never call the functions sin or tanh, then you can ignore those error messages.  Those are the only functions with any problem.  If you do call sin or tanh, then let us know here.  We'll work something out.

    Thanks and regards,

    -George

  • Unfortunately sin() is called - a lot.  tanh is not used directly as far as I can tell.

  • Well, I can think of several ways to go about this.  I think this one is the most straightforward.

    The \lib directory of the compiler distribution (in a directory similar to ccsv5 install root\tools\compiler\c6000\lib) contains a zip file named rtssrc.zip which contains the source code to the entire RTS library.  Extract the file sin.c and make it part of your project.  If you still get the error message when building it, then use file specific build options to lower the --opt_level and/or --opt_for_speed options until the error message goes away.  When I tried, I found that --opt_level=3 --opt_for_speed=3 avoids the error.

    The disadvantage to this simple approach ... When you upgrade to a compiler release which has this bug fixed, it would be ideal to, at the same time, once again use the sin.obj code from the RTS library.  But that will not happen automatically.  I can think of ways to avoid this issue, but it makes the solution a bit more difficult.

    Thanks and regards,

    -George

  • Thanks! I will try this. Any ETA on a compiler patch/fix? This issue occurs on some other code we wrote and I couldn't find any optimization settings that would work.  I had to re-write the code a different way to get it to compile with no "invalid instruction schedule generated" issues. That work around is fine, but this bug is subtle and the errors don't always appear in the Eclipse problem view.  trigger a report in eclipse.  I have to explicitly look in the console log.  In fact, I would like to report that behavior (the "invalid instruction schedule generated" error not showing up in the problems view) as a bug.

     

  • This is still around in v7.3.5, in v7.3.2 it ignored it and so could I because I did not need the functions, in v7.3.5 it will not output a lib so it goes around and around.

    Chris

  • Chris,

    We are working on cause of the error message.

    In the meantime, this error should be a non-fatal error message and the rts6700.lib library should build, which should let the build complete successfully.  I just tested with CCS 5.1.0.09000 and C6x Compiler Tools 7.3.5 and the rts library rts6700.lib built ok after manually deleting it from the 7.3.5 directory.  I did see the error messages, but my project still built.  Are you saying that CCS is not successful with your build (the .lib and .out --or whatever you are building-- don't show up)?

    The error message is confusing.  In the case of the rts build, the error message can be safely ignored.

  • George,

         We use the sin() function very frequently in the ENEE 428 Communications Design Lab, a Senior elective at the University of Maryland.  We are using the c6713 DSK and are transitioning to CCS v5.1.  We got the scheduling error when the rts6700 library was built.  However, the sin() function seems to work.  Can teh error message be ignored.  Is there a new library source filte that doesn't generate error messages?

         Thanks for you help.

    Sincerely,

    Steve Tretter,  Associate Professor of Electrical and Computer Engineering

  • I can confirm that for sin() and tanh(), the error message can be safely ignored -- I have examined the object code that the compiler produces in these two cases.

  • Also, you can successfully compile these two files with lowered optimization level (-O1), which does not issue a warning.  That is what I did when I built the C6700 RTS library for my own use.

  • Douglas,

         Where are the .asm source files for sin() and tanh()?  How do I modify the .h files I find .in the src archive for them and then compile them?  The RTS6700 .lib was automatically built by CCS the first time I built a project and I got the error messages. However, it seems the functions work and we can ignore the error messages.

         Thanks for your help.

    Sincerely,

    Steve Tretter

     

  • General information on how RTS libraries are automatically built, and how you can build them yourself, is in this wiki article.

    Thanks and regards,

    -George

  • Assuming the functions link and execute properly, you don't need to worry further about them.

    The sources for sin and tanh are coded in C, not assembly language, and can be found in the Run-Time Support library source archive, which on my system is D:\ti\ccsv5\tools\compiler\c6000_7.3.5\lib\rtssrc.zip.gz but will probably have a slightly different pathname on your system.  You can extract the source archive into an empty folder using WinZip or equivalent.  The original TI intent was that invoking "mklib --pattern=rts6700.lib". while the current working directory is the "lib" folder containing the source archive, would extract the sources (into a folder in your Temp directory) and then use "gmake" with various arguments to build the object library.  If the built library is missing sin and tanh or has broken versions of them, you can manually extract their sources, compile them with reduced (-O1) optimization, and insert the resulting .obj files into the object library (using ..\bin\ar6x.exe; use the command "ar6x --help" to get instructions on using ar6x.