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.

Forcing small memory model.. not...

Other Parts Discussed in Thread: MSP430FR5969, MSP430-GCC-OPENSOURCE

Newbie to CCS having an issue forcing the compiler into small memory model...

I have set the code and data models to small, but see no where to alter the actual 'memory model' .

As such, I get the small data/code switches to set, but the large memory switch stays in.. (see the compiler listing below)

This is from the example code supplied with the MSP430FR5969 Launch Pad and SHARP display..

I am using a 'free' install of the CCS and compiler --  any ideas what I need to do here ?

--------------------

**** Build of configuration Debug for project 430BOOST-SHARP96_ULP_FRAM_16KB ****

"C:\\TexasInstruments\\ccsv6\\utils\\bin\\gmake" all
'Building file: ../ActivePowerMeasure.c'
'Invoking: MSP430 Compiler'
"C:/TexasInstruments/ccsv6/tools/compiler/msp430_4.3.3/bin/cl430" -vmspx --abi=eabi --code_model=small --data_model=small --near_data=globals -O4 --opt_for_speed=0 --include_path="C:/TexasInstruments/ccsv6/ccs_base/msp430/include" --include_path="C:/TexasInstruments/ccsv6/tools/compiler/msp430_4.3.3/include" --include_path="C:/Projects/TexasInstruments/workspace_v6_0/430BOOST-SHARP96_ULP_FRAM_16KB" --include_path="C:/Projects/TexasInstruments/workspace_v6_0/430BOOST-SHARP96_ULP_FRAM_16KB/driverlib/MSP430FR5xx_6xx" --advice:hw_config="1" -g --gcc --define=__MSP430FR5969__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --large_memory_model --printf_support=minimal --preproc_with_compile --preproc_dependency="ActivePowerMeasure.pp"  "../ActivePowerMeasure.c"
>> WARNING: Small code model requires small data model as well.  Small data model is being used.
>> WARNING: --near_data is only applicable for large data models. Option ignored.

  • Hi,

    have you looked in Project-properties-build-msp 430 copmilers-advanced options-runtime model options?

    In the blink LED example, use of the large memory model seem off by default.  

    Best Regards,
    Lisa

  • Thanks Lisa.. looked at that page many times and never saw that little box buried in the middle of the page :)


    However, the linker is still complaining about the large model in the library?  The library is not rebuilt even after a clean, and I think this may be the issue now..  (perhaps I should make this a new post?)

    Here's the result from the latest run with the large memory model turned off:

    **** Build of configuration Debug for project 430BOOST-SHARP96_ULP_FRAM_16KB ****

    "C:\\TexasInstruments\\ccsv6\\utils\\bin\\gmake" all
    'Building target: 430BOOST-SHARP96_ULP_FRAM_16KB.out'
    'Invoking: MSP430 Linker'
    "C:/TexasInstruments/ccsv6/tools/compiler/msp430_4.3.3/bin/cl430" -vmspx --abi=eabi --code_model=small --data_model=small --near_data=none -O4 --opt_for_speed=0 --advice:hw_config="1" -g --gcc --define=__MSP430FR5969__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --printf_support=minimal -z -m"430BOOST-SHARP96_ULP_FRAM_16KB.map" --heap_size=160 --stack_size=160 --use_hw_mpy=F5 --cinit_hold_wdt=on -i"C:/TexasInstruments/ccsv6/ccs_base/msp430/include" -i"C:/TexasInstruments/ccsv6/tools/compiler/msp430_4.3.3/lib" -i"C:/TexasInstruments/ccsv6/tools/compiler/msp430_4.3.3/include" -i"C:/TexasInstruments/ccsv6/ccs_base/msp430/lib/5xx_6xx_FRxx" -i"C:/TexasInstruments/ccsv6/ccs_base/msp430/lib/FR59xx" --reread_libs --priority --warn_sections --display_error_number --diag_wrap=off --xml_link_info="430BOOST-SHARP96_ULP_FRAM_16KB_linkInfo.xml" --rom_model -o "430BOOST-SHARP96_ULP_FRAM_16KB.out"  "./ActivePowerMeasure.obj" "./ClockApp.obj" "./FR59xx_EXP.obj" "./FRAMSpeedApp.obj" "./Game.obj" "./ULPMeter.obj" "./msp430fr59xx_CHR.obj" "./myTimer.obj" "./grlib/Sharp96x96utils.obj" "./grlib/sharp96x96.obj" "../430BOOST-SHARP96_ULP_FRAM_Lib.lib" "../lnk_msp430fr5969.cmd" -l"libc.a" -l"libmath.a"
    <Linking>
    >> WARNING: --near_data is only applicable for large data models. Option ignored.
    error #16019-D: file "../430BOOST-SHARP96_ULP_FRAM_Lib.lib<adc12_b.obj>" specifies large code memory model, which is not compatible with small code memory model specified in a previous file or on the command line
    error #16019-D: file "../430BOOST-SHARP96_ULP_FRAM_Lib.lib<cs.obj>" specifies large code memory model, which is not compatible with small code memory model specified in a previous file or on the command line....

    26 total errors..

  • Hi,

    what exactly are you trying to do with the example settings?  If you are using the free compiler, some of the configurations are special to allow examples in the code size limited setting.   It is possible you have made a change that affects this or the library was precompiled with a different compiler version.  

    Did you take the example from the ccs version you use?   If I recall it is fine without modification?

    Best Regards,
    Lisa

  • I'm just trying to build the out of box examples for my own edification in learning the tools and getting familiar with the TI products for some future pending projects...

    I installed the example as provided, and didn't knowingly change anything.. other than trying to simply compile it and fighting this memory model size issue.. 

    I at first installed both version of this example and had intended to compile the other 'larger version' of it using the GCC compiler that does not have the TI size restrictions...

    Neither example would compile properly, and I decided to remove both of the projects from the workspace, and then reinstalled the 16K version only...

    At this point I'm still simply trying to compile a working version.. and go from there..  once the 16K version is done, I'll try the other one with the GCC tool chain..

  • Hi,

    something like this might be a better place to start:

    http://www.ti.com/tool/msp430-gcc-opensource

    Best Regards,

    Lisa

  • Hi Lisa...

    Just an FYI, the issue has been resolved with the help of a couple members in the MCu forum..

    Here's the post for you edification:

    -----

    Hi guys..

    Both of your suggestions helped and solved the issue...

    Setting the include file as Leo suggested cleared all the warnings about redefinition..

    Setting the data=small and the code=large solved the library incompatibility..:)

    And finally setting the --near_data to globals (seems it won't take the blank setting), made that warning go away..

    So, now its compiled, and I'll see if it loads and runs :)

    Thanks again Randy and Leo..

    (and yes Randy I agree with your rake on IDEs.. and will revisit  your details on this)