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.

No source available when debugging

Other Parts Discussed in Thread: MSP430F5310, MSP-FET, MSP430F5529

Windows 7 64-bit, Service Pack 1
CCS 6.1.3.00033
MSP430F5310
MSP-FET debugger

Using compiler GNU v5.3.0.105

When I set flag -ffunction-sections I am unable to step through source code or place breakpoints in the source. 

Instead of displaying the source file when I launch the debugger it displays:

No source available for "main() at C:/Users\user_name\workspace_v6_1_3\project_name\Debug\project_name.out:{3} 0x819c{4}" 

As I am using mspware my code is too large to build without  using -ffunction-sections and --gc-sections.

I was previously using the 5529 launchpad and it worked fine with -ffunctions, but since we have moved to the 5310 it no longer works.

Is there a solution to this or is it a bug?

  • Hi,

    I couldn't see this in my setup here; I am running code on a F5529 Launchpad using GCC release 5.3.0 just like you.

    However, I don't have a large codeset to play with the various functions. If you are able to provide a small (or smaller) project that shows the error, would you mind sending it our way so we could try to figure out what may be happening?

    In the meantime I will also try to build upon one of the example MSPWare projects and see if I get this.

    Regards,
    Rafael
  • Hi Rafael,

    The issue only occurs when using the msp430f5310. Even a new project with just a main file will not work properly when you turn on -ffunction-sections, you don't need to use mspware. When I use the msp430f5529 it works fine with -ffunction-sections.

    I have included an example project for the msp430f5310.

    Thanks for looking into it.

    5672.test.zip

  • I have managed to solve the problem.

    Line 553 in the linker script is msp430f5310.ld is:

    .debug_line     0 : { *(.debug_line) }

    Changing this to:

    .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end ) }

    The debugger now works as normal. I think this should be added to the default linker for this chip.

  • Hi,

    Thank you for providing this information. I checked the existing MSP430 include directory (ccsv6/ccs_base/msp430/include_gcc) and the correct line above is present on the <msp430f5310ld> file as well.

    These files are installed by the MSP430 component version 6.3.4.2, therefore it is a bug already fixed. If you update your copy of CCS that should solve the issue for you.

    Hope this helps,

    Rafael