AnsweredAssumed Answered

"no such file or directory linker" error work around

Question asked by KEVIN KRATZER on Nov 13, 2014
Latest reply on Nov 18, 2014 by Radek Sestak

It looks like I am experiencing an error that has come up in another forum. I need to know if I am experiencing the "Windows larger than 8192 characters" path problem or what? See the following discussion:  KDS Static Library Project - Another Bug Report - Need Fix   My Console log with the error is at the bottom of the post for view-ability.


If I do have the path length problem, a number of fixes were proposed.  Which is the best way that would allow for fairly straight forward "clean" and "build", and how specifically would I do it?


1. "reduce the number of files"  Specifically how would I reduce the number of files? Should I take the generated files and condense them into one file and then delete the others generated files?  Where do I change the code that is looking for the other files?

2. "bundling your input files into a single arguments file"  Where is the tool setting window that the contributor found and What needs to be put there?

3. "move the directory" to reduce folder locations.  When I tried to move the folder, KDS does not want to open the project because it is not set up with relative paths I assume.  Is there a work around?

4. Erich Styger proposed the following:

a) use relative paths in your project (the toolchain uses the (debug) output folder as current directory, so use ..\src instead of  c:\myprojects\otherdirectory\ProjectA\Sources or similar for compiler paths/etc

b) Build one or multiple libraries you can link to your main application.

I like the relative path idea, but I need a specific example of where to put the \src instead of the path. What file name and where in the file? What  conditions modify the file that I would have to re-do or replace it?

5. The reported quick work around that worked is complicated looking:

1. In Debug folder, created a file "ProjectName.args"

2. Copy object files paths into "ProjectName.args" ; for this, in Debug folder we looked into files and retreived the information under the  variable OBJS.

3. Inside "ProjectName.args", set an object file path per line, and be sure to put the name between " " (ex.  "./Sources/main.o" )

4. In Project "Properties"/"C/C++ Build"/"Settings" ->  "Tool Settings Tab" -> "Cross ARM C++ Linker":

  - We had to modify the command line pattern: changed the argument ${INPUTS} to -> @"ProjectName.args"

Problems: make: *** [24-228 KDS.elf] Error 1


Console Log:

15:27:19 **** Incremental Build of configuration Debug for project 24-228 KDS ****

make all

'Building file: ../Sources/mqx_tasks.c'

'Invoking: Cross ARM C Compiler'

arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -I"C:\Freescale\KDS_1.1.1\eclipse\ProcessorExpert/lib/Kinetis/pdd/inc" -I"C:\Freescale\KDS_1.1.1\eclipse\ProcessorExpert/lib/Kinetis/iofiles" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Sources" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Generated_Code" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/include" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/config" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/kernel" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m/core/M0" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m/compiler/cwgcc" -std=c99 -MMD -MP -MF"Sources/mqx_tasks.d" -MT"Sources/mqx_tasks.o" -c -o "Sources/mqx_tasks.o" "../Sources/mqx_tasks.c"

'Finished building: ../Sources/mqx_tasks.c'

' '

'Building target: 24-228 KDS.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Project_Settings/Linker_Files" -Wl,-Map,"24-228" -nanolibc -o "24-228 KDS.elf"  ./Sources/Events.o ./Sources/main.o ./Sources/mqx_tasks\ bak.o ./Sources/mqx_tasks.o  ./Project_Settings/Startup_Code/startup.o  ./MQXLITE/psp/cortex_m/core/M0/boot.o ./MQXLITE/psp/cortex_m/core/M0/dispatch.o  ./MQXLITE/psp/cortex_m/cortex.o ./MQXLITE/psp/cortex_m/int_gkis.o ./MQXLITE/psp/cortex_m/int_inst.o ./MQXLITE/psp/cortex_m/int_kisr.o ./MQXLITE/psp/cortex_m/int_pvta.o ./MQXLITE/psp/cortex_m/int_unx.o ./MQXLITE/psp/cortex_m/int_vtab.o ./MQXLITE/psp/cortex_m/int_xcpt.o ./MQXLITE/psp/cortex_m/mem_zero.o ./MQXLITE/psp/cortex_m/psp_iinit.o ./MQXLITE/psp/cortex_m/psp_supp.o ./MQXLITE/psp/cortex_m/psp_tiad.o ./MQXLITE/psp/cortex_m/psp_tinm.o ./MQXLITE/psp/cortex_m/psp_tipr.o ./MQXLITE/psp/cortex_m/psp_tisu.o ./MQXLITE/psp/cortex_m/sc_irdyq.o ./MQXLITE/psp/cortex_m/stack_bu.o ./MQXLITE/psp/cortex_m/stack_de.o ./MQXLITE/psp/cortex_m/stack_st.o  ./MQXLITE/kernel/idletask.o ./MQXLITE/kernel/int.o ./MQXLITE/kernel/klog.o ./MQXLITE/kernel/lwevent.o ./MQXLITE/kernel/lwlog.o ./MQXLITE/kernel/lwmem.o ./MQXLITE/kernel/lwmsgq.o ./MQXLITE/kernel/lwsem.o ./MQXLITE/kernel/lwtimer.o ./MQXLITE/kernel/mqx_utils.o ./MQXLITE/kernel/mqxlite.o ./MQXLITE/kernel/mutex.o ./MQXLITE/kernel/qu_test.o ./MQXLITE/kernel/sched.o ./MQXLITE/kernel/task.o ./MQXLITE/kernel/time_ticks.o  ./MQXLITE/config/task_template_list.o  ./Generated_Code/AD1.o ./Generated_Code/BowlOut.o ./Generated_Code/Cpu.o ./Generated_Code/HopperIn.o ./Generated_Code/HopperOut.o ./Generated_Code/MQX1.o ./Generated_Code/PE_LDD.o ./Generated_Code/PORT.o ./Generated_Code/RunIn.o ./Generated_Code/SW1.o ./Generated_Code/SW10.o ./Generated_Code/SW2.o ./Generated_Code/SW3.o ./Generated_Code/SW4.o ./Generated_Code/SW5.o ./Generated_Code/SW6.o ./Generated_Code/SW7.o ./Generated_Code/SW8.o ./Generated_Code/SW9.o ./Generated_Code/Sens1.o ./Generated_Code/Sens2.o ./Generated_Code/Sens3.o ./Generated_Code/Sens4.o ./Generated_Code/SystemTimer1.o ./Generated_Code/Valve1.o ./Generated_Code/Valve2.o ./Generated_Code/Valve3.o ./Generated_Code/Valve4.o ./Generated_Code/Vectors.o ./Generated_Code/WDog1.o  ./.metadata/.plugins/org.eclipse.cdt.make.core/specs.o  

arm-none-eabi-g++: error: ./Sources/mqx_tasks\: No such file or directory

arm-none-eabi-g++: error: bak.o: No such file or directory

make: *** [24-228 KDS.elf] Error 1



15:27:33 Build Finished (took 14s.225ms)