Link time problem: "error: ./{truncated directory name}: No such file or directory"

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

Posts: 1
Joined: Wed Feb 13, 2019 9:13 am

Link time problem: "error: ./{truncated directory name}: No such file or directory"

Postby apu092017 » Wed Feb 13, 2019 9:41 am


I am in the process of migrating a project from IAR Embedded Studio to Atollic TrueSTUDIO for STM32 (Version 9.1.0, Build id: 20181011-1241) (the code has previously compiled and linked with no problem using the IAR toolchain).

I have imported all of my source code into a fresh project targeted at the correct MCU (STM32F407) and configured the source and include paths and the C/C++ symbols required. I'm using the "Atollic ARM Tools" toolchain with the "GNU Make Builder". All the source builds OK but I get an unusual error right at the link stage:

Let's say the root directory for my source code is called "mycode" (it's 6 characters long).
The error I get is (truncated for clarity and with proprietary names obfuscated but maintaining the essence of what is happening):

arm-atollic-eabi-g++ -c "../mycode/build/my_file.cpp" -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++14 -DSTM32F4XX -DSTM32F40XX -DUSE_STDPERIPH_DRIVER -D__FPU_PRESENT -DARM_MATH_CM4 -DENABLE_DEBUG_PRINTF -DHAS_STDINT_H -DHSE_VALUE=8000000 -DSTM32F407_DISCOVERY -D__ICCARM__ -I../src -I"C:\Project\my_firmware\mycode" -I"C:\Project\my_firmware\mycode\3rd-party\ST\STM32F4xx_DSP_StdPeriph_Lib_V1.4.0\Libraries\CMSIS\Device\ST\STM32F4xx\Include" {more includes here etc etc ...} -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g -fstack-usage -Wall -fno-threadsafe-statics -MMD -MP -MF"mycode/build/my_file.d" -MT"mycode/build/my_file.o" -o "mycode/build/my_file.o"

arm-atollic-eabi-g++ -o "my_firmware.elf" ./mycode/source/framework/scheduler/Scheduler.o ./mycode/source/drivers/system/system_stm32f4xx.o ./mycode/3rd-party/CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q7.o ./mycode/3rd-party/CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_f32.o {more *.o files here etc etc ...} -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T"../stm32f4_flash.ld" -specs=nosys.specs -static -Wl,-cref,-u,Reset_Handler "-Wl," -Wl,--gc-sections -Wl,--defsym=malloc_getpagesize_P=0x1000 -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group

arm-atollic-eabi-g++.exe: error: ./mycod: No such file or directory

make: *** [makefile:78: my_firmware.elf] Error 1

Clearly I don't expect "mycod" to be found since this is non-existent. My question is why Atollic is attempting to look for something with this name in the first place. I have tried the following:

- Opened the .project file in a text editor and searched for "mycod" and "mycode" - the same number of instances of each is found, so "mycod" is not referenced there. Every path starts with "./mycode" as intended.
- Copied and pasted the linker command into a text editor and done a similar search - again "mycod" is not found.
- Cleaned the project, deleted the build directory and rebuilt it (so the Makefiles were regenerated) - same result.
- Moved the project to the root of my hard drive in case long paths were a problem - same result.

A search around has not thrown up any other instances of this error. I can only assume that a path or command somewhere is getting truncated. I would be very grateful for any ideas of what could be happening.

Thanks for any help in advance.

Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest