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.

Migrating F28335 project from CCS3.3 to CCS5.1

I'm trying to migrate an F28335 project from CCS3.3 to CCS5.1 (OS is Win XP prof).

To import the CCS3.3 project I did:

Project->Import Legacy CCSv3.3 Project, selected the pjt file and left the other checkboxes in the "Import Legacy CCS Projects" dialog unchanged and pressed Next, Next, Finish.

The only warning in project.log was related to DspBiosBuilder which we don't use.

Now I started the Build with 'Project->Build All'. This worked (including the pre-build-step) up to linker invocation. There I got the following message (in which I have replaced the beginning of the absolute path by "project_root" for this posting):

"project_root/System/28335_Flash_lnk.cmd", line 218: remark #10270-D:
   bad LOAD_START() operator applied to un-initialized object "bskopie";
   object's RUN placement used to compute operator value
                         START(_bootsektorkopie_Anfang)

The corresponding part from the linker command file is:

   bskopie             : > FLASHD0  PAGE = 0
                         START(_bootsektorkopie_Anfang)
                         END(_bootsektorkopie_Ende)

Further messages are

"project_root/System/28335_Flash_lnk.cmd", line 212: error:
   cannot find file "Flash/safety.obj"
"project_root/System/28335_Flash_lnk.cmd", line 212: warning #10068-D:
   no matching section
   Safety_Code         : {Flash/safety.obj(.text) } > FLASHB
"project_root/System/28335_Flash_lnk.cmd", line 212: warning #10097:
   memory range not found: FLASHB on page 1
   Safety_Code         : {Flash/safety.obj(.text) } > FLASHB
"project_root/System/28335_Flash_lnk.cmd", line 212: error #10265:
   no valid memory range(NULL) available for placement of "Safety_Code"
   Safety_Code         : {Flash/safety.obj(.text) } > FLASHB
"project_root/System/28335_Flash_lnk.cmd", line 212: error #10099-D:
   run placement fails for object "Safety_Code", size 0x0 (page 1)
   Safety_Code         : {Flash/safety.obj(.text) } > FLASHB

Those messages are related to the following part of the linker command file:

   Safety_Code         : {Flash/safety.obj(.text) } > FLASHB
                         START(_Safety_Code_Start),
                         END(_Safety_Code_End)

The file "project_root/Flash/safety.obj" exists. It was generated by the compiler. Apparently, the linker doesn't find the file Flash/safety.obj that is referenced in the linker command file. I tried to use ${COMMON_ROOT}/Flash/safety.obj, which didn't work. The only thing that worked so far was to specify the full path to safety.obj, which I don't want because it breaks portability.

I'd appreciate any help in resolving those issues.

Thanks, Johannes

  • Johaness,

    If the .obj file is set to be created in the /Flash subdirectory, the linker will automatically look there to find it. Therefore, you do not need to specify "Flash/safety.obj (.text)" in the linker command file, but could instead just do "safety.obj (.text)".

    Please see this related thread:
    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/113303.aspx

    If this does not help resolve all the errors, would you be able to export your project and attach it here so we can reproduce the errors and help you resolve them?

  • Thank you, AartiG, for your response.

    If I specify the filename as safety.obj rather than Flash/safety.obj the linker invoked from CCSv5.1 accepts it but the linker invoked from CCSv3.3 doesn't find it anymore.

    Is there a way to specify the filename in the linker command file such that it works for both CCSv5.1 and CCSv3.3? Or do I have to have two versions of the linker command file?

    The other issues regarding remark #10270-D appear to be no problem. START(start) and END(end) define the symbols at the desired locations. Interestingly, the remark is issued even though the "Issue remarks" checkbox in the linker diagnostics dialog is unchecked. I got rid of the remarks by adding 10270 to the list of diagnostics to be suppressed.

    Regards, Johannes






  • Johannes L. said:

    If I specify the filename as safety.obj rather than Flash/safety.obj the linker invoked from CCSv5.1 accepts it but the linker invoked from CCSv3.3 doesn't find it anymore.



    Yes, the way the object files are processed is a bit different in CCSv4/5 than in CCS 3.3.

    Johannes L. said:

    Is there a way to specify the filename in the linker command file such that it works for both CCSv5.1 and CCSv3.3? Or do I have to have two versions of the linker command file?



    You can either keep two versions of the linker command file, or use preprocessing directives (such as #ifdef) in the linker command file to control directives based on predefined names. For example, something like the following in the linker command file:

    #ifdef CCS33

    Safety_Code         : {Flash/safety.obj(.text) } > FLASHB
                             START(_Safety_Code_Start),
                             END(_Safety_Code_End)

    #endif

    #ifdef CCS51

    Safety_Code         : {safety.obj(.text) } > FLASHB
                             START(_Safety_Code_Start),
                             END(_Safety_Code_End)

    #endif

    and then add the --define option to the linker based on whether the project is built for CCS3.3 or CCS5.

    More details on this option can be found in C28x Assembly Language Tools Users Guide, section 7.4.7, and in this wiki article:
    http://processors.wiki.ti.com/index.php/Using_Preprocessor_Support_in_Linker

    Hope this helps.

     

     

  • Thank you. Using preprocessor directives helps.

    BTW, during my experiments I have managed to convert an existing CCSv3.3 project into two different CCSv5.1 projects. One that requires safety.obj being specified in the linker command file without any path (as described above) and one that requires it to be specified as ../../Flash/safety.obj.

    What is the most efficient way to find out the relevant difference in the two CCSv5.1 projects?

    Looking at the (textual) differences of the two .cproject files is not very enlightening. I regard this as a big drawback compared to CCSv3 pjt files.

    Regards and many thanks, Johannes