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.
Tool/software: Code Composer Studio
CCS 7.0.Version: 7.0.0.00043 in Win10
I have imported code from an older IAR (V5.x) and I am migrating to CCS7. The problem I cannot seem to get past has to do with converting the #pragma statements for placing user variables in the various INFO sections. The IAR directives look like:
#pragma location = "INFOB"
__no_init TypDefName VarName
converting this to:
#pragma DATA_SECTION(VarName, "'infoB")
subsequent lines read:
#pragma DATA SECTION(VarName2, "infoC")
#pragma DATA_SECTION(VarName3, ".infoC")
All compiles without error until the line with VarName3 is introduced which the compiler then warns of:
Description Resource Path Location Type
#824-D pragma DATA_SECTION can only be applied to a file level symbol definition, not "Varname" (declared at line 32 of "..\foo.h") foo.c line 22 C/C++ Problem
If I move the declaration from the .h file to the .c file, it throws the same error but now points to the line in the .c file where the variable is typed.
So I switched to try using #pragma dataseg = INFOC and the compiler does not recognize the dataseg declaration.
I am really pretty frustrated with the lack of good documentation and/or good code examples to properly handle placing variables in INFO memory.
I am also frustrated understanding why it would compile without error until the third instance of a declaration is made which does not have anything to do with the second use of infoC as I did try changing that to .infoD and got the same result.
Examples using structures would also be a plus if something extra needs to be done. Note the structures I am using are externally defined in another file. Another wrinkle.
Any Help?
Does The NOINIT and PERSISTENT Pragmas answer your question?Greg Greenwood said:The only question that remains to be answered is how to handle the __no_init that IAR had in there that CCS7 does not recognize.