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.

CCSv5 16KB free code size limited (MSP430)

Customer is using the 16KB free code size limited (MSP430) CCSv5 since their code is < 16K.  They installed CCSv5 and after some tweaks to their code got it running.  The problem is they cannot debug the C code.  They can debug assembly. The  error they get is No source available for "main() at 0xc43e".  Any idea on what is going on?

 Thanks,

  • Hi,

    - have they loaded the code?   Sometimes this type of error is because the code and symbols are not loaded.   In the debug perspective you can manually connect to the target go to Run-Load-Load Program and load.  Have they done this?

    - have they checked their heap and stack size?

    - do they have a main?

    Best Regards,

    Lisa

  • Hello,

    I just thought I would check whether there is any update here and whether the tips were helpful.

    Best Regards,
    Lisa

  • Apparently the problem was –g and –o0 were not set in the compiler.  For some reason CCSv5 does not think you would want to do symbolic debugging in debug mode.

  • Great, glad to hear things are sorted and thanks for the update.

    Best Regards,
    Lisa

  • Hallo MT7316,

    I am either blind or can not read!? I found the -g option. Where do I find -o0 and what does it control?

    Thank you

    Rudi.

  • Rudolph Mouton said:
    Where do I find -o0 and what does it control

    The -o option can be found under CCS Project Properties -> CCS Build -> MSP430 Compiler -> Optimization -> Optimization Level -> (--opt_level -O). It controls the amount of optimization performed by the compiler. Even when set to level zero (-O0) the MSP430 Compiler still includes register optimizations which can cause problems when debugging, since some variables may be stored in registers and the debugger can sometimes show apparent incorrect values for variables.

    To remove all optimizations, the option depends upon which compiler is in use:

    1) With the "latest" MSP430 compiler version 4.1.1 the Optimization Level has to be set to Off

    2) With an older compiler, such as MSP compiler version 4.0.0, you have to select CCS Project Properties ->  CCS Build -> MSP430 Compiler -> Advanced Options -> Advanced Optimizations -> Disable all high level optimization (--no_high_level_opt)