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.

DM365: UBL compilation warnings on CCS v 4

Hello TI staff and all,

I post today to understand a warning which makes me questioning about he system works. I am new to TI tools and I began working on CCS4 (eclipse framework).

When compiling for a a Davinci DM365 a UBL project I have imported from what looks like a CCS3.3 UBL project, I faced the following warnings on code I did not change:

-First Warning is:

"./flash_utils/flash_utils/Common/arch/arm926ejs/src/selfcopy.c", line 103: warning: this assembly directive potentially unsafe inside a function"

lines are :

 

   asm(" .word DRAMStart");
   asm(" .word boot");
   asm(" .word __selfcopysrc");
   asm(" .word __selfcopydest");
   asm(" .word __selfcopysrcend");

it looks like the ' asm (".word  ' directive is not welcome.

-Second Warning is :

"./flash_utils/flash_utils/Common/arch/arm926ejs/src/boot.c"

line 91: warning: this assembly directive potentially unsafe inside a function
"...\Temp\0146811", WARNING! at line 31:

[W0000]
         Deprecated use of PSR; flag bits not specified, "cf" assumed
     MSR  cpsr, r0

Are assembler and UBL codes not more compatible ?

Thank your for your help and ecplanations.

  • The compiler is just warning you that certain inline assembly statements within C code could potentially cause problems. More information on using inline assembly statements and things to watch out for is documented in the ARM Optimizing C/C++ Compiler Users Guide, section 6.5.4, http://www.ti.com/lit/spnu151

    If the UBL code has been tested and verified as written, it should be ok, but you may want to check if it was compiled and tested with a certain version of the compiler tools so you can use the same version with CCS4.

     

  • Hello Arti Thank you for your answer.

    My problem is that i do not like to get warning in my compilation. And when i cannot do another way, i try to understand the origin of these warnings. And since I have not written this code of UBL, i do not understand these messages.

     

    Now I use CCSv4, maybe the UBL was not compiled on this toolchain with the executables called by ccsv4. It could be nice if someone in TI can confirm this point concerning CCSv4 & UBL indeed.

    regards

     

  • I also like to have a clean build so I can examine each new warning to see if it is consequential. I used #pragma diag_suppress 1119 before the offending instructions and #pragma diag_default 1119 afterward. There was also warnings in my code concerning a start address other than main (boot for UBL) and I didn't know where to put a pragma for that since it's determined by the linker command file. So I globally shut off the warnings for that which I don't like. But since I'm not planning on changing the boot address it shouldn't be a big problem. In CCS in the diagnostic options of the project I added 10063 to the Suppress Diagnostic window.

  • Also for the MSR warning I used the new form of the instruction MSR cpsr_c,r0 which I found in the arm users guide I think.