cancel
Showing results for 
Search instead for 
Did you mean: 

Linking error when project resides on UNC path

MSonn.1
Associate

OS: Windows 10

IDE Version: 1.4.0

My project resides one a network storage folder, accessable by //BALA/my_project.

The network storage is further linked to a virtual storage device, namely B:

When trying to compile the project, the linking process returns the following error:

...ld.exe could not open /BALA/my_project/STM32F078CBTX_FLASH.ld : File not found

The problem is due to the notation of the absolute path of the linker script inside the Makefile.

arm-none-eabi-gcc -o "MicPcb_Code.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m0 -T"\\BALA\my_project\STM32F078CBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="MicPcb_Code.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

The double backslash at the beginning of the path is interpret as escaped backslash during the execution of ld and hence, leads to an path starting with a single backslash and hence is invalid.

The solution is, however, quite simple! In the Makefile either use -T"\\\\BALA\my_project\STM32F078CBTX_FLASH.ld", which results into the proper path after interpretation of escaping, or use single quotation marks, namely -T'\\\\BALA\my_project\STM32F078CBTX_FLASH.ld'

Probably similar error messages can occur when using header locations on networks storages with paths given in UNC format.

Could you include the fix to the Makefile generation?

Best regards,

Morian Sonnet

0 REPLIES 0