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.
Tool/software: Code Composer Studio
Hi all,
Why am I getting this error message from the CCS debugger:
Can't find a source file at "/home/keith/src/mingw/gcc-build/gcc-6.3.0-mingw32-cross-native/mingw32/libgcc/../../../src/gcc-6.3.0/libgcc/config/i386/cygwin.S" Locate the file or edit the source lookup path to include its location.
How do I edit the source lookup path?
I'm runing CCSv7 debugger as Local C/C++ with the GDB:
It seems to be getting the path confused. I'm using MinGW tool chain and I also have Cygwin installed, so I'm guessing the CCS is looking at my PATH var to find a library?
I do not see anything in my Windows10 ENV Path to point it to cygwin.
thank you,
Scott
It looks like this is may be a gdb issue. I ran gdb standalone (inside cygwin) and got a similar error:
29 float buffer[b]; //input buffer or shift register (gdb) s ___chkstk_ms () at /usr/src/debug/gcc-6.4.0-4/libgcc/config/i386/cygwin.S:137 137 /usr/src/debug/gcc-6.4.0-4/libgcc/config/i386/cygwin.S: No such file or directory.
Apparently gdb doesn't like the buffer being pushed onto the stack. So I changed it to a dynamically allocated array:
float* buffer; buffer = (float *)malloc(sizeof(float)*b); // allocate b floats
and now gdb works.
I see, thank you. So I think that means this has nothing to do with CCS (sorry for posting it here!).
Just fyi for anyone else who comes across something like this, I think the root cause of this problem was that I was trying to declare a local "automatic" array variable with a non-constant array size. For example:
void array_function(int* arr, int size) { int buffer[size]; //works...sometimes! int i; for (i = 0; i<size; i++) buffer[i] = arr[i]; } int main(void) { const int n = 5; int a[] = { 1, 2, 3, 4, 5 }; array_function(a, n); return 0; }
Interestingly, g++ does not complain about it and it runs as expected:
g++ -std=c++11 -Wall test.c
But Visual Studio catches the error:
thank you,
Scott