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.

Debug fail " Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_zero_init.c"

Other Parts Discussed in Thread: MSP430F5522

Hello Everyone,

My team and I are currently evaluating CCS5 and we have an unreasolved problem.

We were working on a program that was compiling and debuging with succes. We are using Code Composer Studio Version: 5.3.0.00090 with a MSP430F5522. After added some more code, the program is compiling with no errors, but the debug mode fails. When entering debug mode, we have one of the two following messages:

"Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_zero_init.c"

"Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_decompress_rle.c"

There is a global variable in our code initialized like this:

PRIVATE T_UBYTE incomingBuffer[520];

We noticed that if we reduce the incomingBuffer size to a lower value (400 for example) the debug mode is working.

We checked that this is not a RAM problem, because there is more free space available.

I hope you can help us with this mystery

Thanks in advance,

Antoine

  • Antoine Palaysi said:
    After added some more code,

    And some more variables?

    Antoine Palaysi said:
    "Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_zero_init.c"

    copy_zero_init and copy_decompress_rle are startup code functions that initialize your variables at startup. Sicne they are form the runtime library, there is no source code installed on your computer to debug them. That's what the compiler complains about.

    So why are you stopping there? Most likely because initializing your variables takes so much time that the watchdog expires, resetting the MSP, before it reaches main. Over and over again.

    Using compressed init data was a nice idea to reduce the flash footprint of the init values, but it significantly raised the time required for initializing the variables. So at the bottom line, where it woudl bring most benefit (many variables to initialized) it causes the biggest harm. So on the bottom line it wasn't a good idea and should be either removed again or changed so it 'feeds the dog' while decompressing.

    How you can disable the watchdog can be found in other threads (I'd like to copy the solution here, but I had to look it up myself by a forum search, and I'm about to leave the office - and I'm lazy :) )

  • Hello everybody,

    I am using the new CCS 5.3v to program an MSP430f552x, i have the same problem as Antoine. when i run my program in debug mode i get the same messages:

    "Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_zero_init.c"

    "Can't find a source file at "/tmp/TI_MKLIBaXqLbT/SRC/copy_decompress_rle.c"

    as you mentioned in your answer Mr Jens-Michael,disable the watchdog timer before variable initialization, but how we can do that?

    thanks for your help.

  • Schweiny said:
    as you mentioned in your answer Mr Jens-Michael,disable the watchdog timer before variable initialization, but how we can do that?

    You use the box in the upper right corner of this page that says "Search Community".

  • Hello everyone

    Thank you Mr Gross it was indeed a watchdog problem.

    The solution is here:

    "The issue could be due to the device being reset by watch dog. The C boot routine initializes global and static variables and copies their values from .cinit in program space to the address of the variable in the .bss section. Depending on how much initialization needs to be done, it could take a long time and cause the watchdog to fire and reset the device before main() is called, and then the process repeats itself.

    This theory can be tested by disabling the watchdog prior to the call to the auto_init routine.

    For MSP430 devices, this can be done by adding code to disable the watchdog within the routine system_pre_init() in file pre_init.c. This routine is called prior to the auto init hence the watchdog will be disabled prior to the C initialization process. This file can be found in the directory 'your_CSS_instalation_directory' \tools\compiler\msp430\lib after unzipping the file rtssrc.zip. Add this file to your project and edit it to add the statement to disable to watchdog. Rebuild your project and test."

  • Antoine Palaysi said:
    within the routine system_pre_init() in file pre_init.c

    There is nothing that requires the system_pre_init() be in it's own source file. You could put it in the same file as your main() source code. The linker will use the local definition if it exists. If not, you get the library versions.

    Also, for IAR, the function is __low_level_init()

  • Hello Antoine,

    I tried your solution and it works great, now i can put any size buffer.

    Thanks for your help.

    Schweiny.

  • Brian Boorman said:
    Also, for IAR, the function is __low_level_init()

    And IIRC it must return 1, or the startup code will skip the initialization of the variables.

**Attention** This is a public forum