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.

CCS/TM4C123GH6PM: CCS "Permission Denied" when attempting to compile/build a project

Part Number: TM4C123GH6PM


Tool/software: Code Composer Studio

While I can open/compile/run examples found under C:\ti\tivaware_c_series_2_1_4_178, when I create a new CSS project in a more preferable directory and copy example code into said directory, I cannot compile. Of course, the error is related to the compiler and linker not knowing where to find the libraries.

Of course one solution is to copy all the library files over, but that is not an ideal solution. I can also import them through Eclipse/CCS, but right-clicking the project tab and choosing 'Add Files' requires me to select all of the files individually.

I also tried adding PATH environment variable, TIVA_C (set equal to C:\ti\tivaware_c_series_2_1_4_178) under Project->Properties->Build->GNU Compiler->Directories in the Include Paths field, as well as under Project->Properties->Build->GNU Linker->Libraries in both the Include Paths in both the Libraries and Library search path.

Now, the console error message I get is a bit more perplexing...

**** Build of configuration Debug for project LilPharmaOnTM4C ****
"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O

Building target: "LilPharmaOnTM4C.out"
Invoking: GNU Linker
"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -DPART_TM4C123GH6PM -Og -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,-Map,"LilPharmaOnTM4C.map" -L"C:/ti/tivaware_c_series_2_1_4_178" -o"LilPharmaOnTM4C.out" "./main.o" "./tm4c123gh6pm_startup_ccs_gcc.o" "C:/ti/tivaware_c_series_2_1_4_178/driverlib/ccs/Debug/driverlib.lib" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group "C:/ti/tivaware_c_series_2_1_4_178" -Wl,--end-group
makefile:145: recipe for target 'LilPharmaOnTM4C.out' failed
c:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find C:/ti/tivaware_c_series_2_1_4_178: Permission denied
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [LilPharmaOnTM4C.out] Error 1
makefile:141: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

So I suppose the files are marked as read-only. It does not appear I can change the permissions, either. Not that I want to, given that they were probably made read-only to prevent accidentally modifying the examples. So I'm out of ideas. Any idea what is going on and how to fix this? (note: I had a simalar issue with the TI compiler.)

  • max poe said:
    Invoking: GNU Linker
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -DPART_TM4C123GH6PM -Og -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,-Map,"LilPharmaOnTM4C.map" -L"C:/ti/tivaware_c_series_2_1_4_178" -o"LilPharmaOnTM4C.out" "./main.o" "./tm4c123gh6pm_startup_ccs_gcc.o" "C:/ti/tivaware_c_series_2_1_4_178/driverlib/ccs/Debug/driverlib.lib" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group "C:/ti/tivaware_c_series_2_1_4_178" -Wl,--end-group

    I see a couple of issues with this command that may be causing the errors.

    Make sure the -L option contains the path to the GCC version of the driverlib library, not the TI/ccs version. Also the input to -l (--library) option should be "driver" (which is the gcc version of the library), not driverlib.lib (which is the TI compiler version). As an example, here are the settings for an example project that I was able to build without errors.

    Hope this helps!