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.

Library Linking fails due to Memory Model

Other Parts Discussed in Thread: MSP430F5438A

Hi,

I have a library that I cannot recompile and I'm trying to add it to my MSP430F5438A project.  When I build I get:

error #16019-D: file "mlibrary.obj>"
   specifies restricted large data memory model, which is not compatible with
   large data memory model specified in a previous file or on the command line

This is for all the objects in the library. I went and adjusted the project settings to use the restricted large data memory model, but the errors still persist. You can see below the command line showing the memory model settings:

-vmspx --abi=coffabi --code_model=large --data_model=restricted --near_data=globals -O0 --opt_for_speed=0 -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --

Is there a file by file setting? Could something be cached (the project previously used the default memory model).

I have compared my project to another project which successfully compiled the library for the same processor and there are no differences between them that I can see in the compiler/linker settings tabs.

Regards,
Gustavo

  • Hi Gustavo,

    is this your own library?  What version of CCS are you using?  Have you double checked all settings?  (ELF vs COFF, compiler version, etc)  I think it is a good idea to see what is different in the two cases if in the one you can successfully use the library.   Is one a RTSC project?  Ie could there be two conflicting configurations/configuration files somehow attached to the project?

    Some further information would help.

    Best Regards,
    Lisa

  • Hi Lisa,

    No, it's provided by a vendor. I am already discussing with them but since they compiled with CCS as well.
    I have checked all the settings in the project both compiler and linker. There are some differences since the projects were different, but I've made them as similar as possible. Main difference are a few different pre defines and include folders, which I don't expect would have an effect.

    I've tried to clean the project, go back to old settings and again. in fact, with the working project, I put the wrong settings and it gave me the same errors, but when I restored the restricted large memory model, the errors went away and linking was successful.

    It sounds as if I have few options but to either take the working project and adapt it or start from a new project.

    Regards,
    Gustavo

  • Hi Gustavo,

    I am trying to think of other ideas here.  Would you be able to send/post the console output in the working and not work cases?  We would like to look at the console output (not that from the problems view).

    Best Regards,
    Lisa

  • Lisa,

    Apparently the library was compiled for an F5528 device and I was using it in an F5438A. It is possible that this caused it to not work in cases where it had to be placed in the higher memory locations. The library is being recompiled to see if that will resolve the issue.

    Thanks you very much for all your support.

    Regards,

    Gustavo

  • Hi Gustavo,

    ok, glad to hear you figured it out and all the best with development.  Thanks for the update.

    Best Regards,

    Lisa