error #5 on periph_setup.c. Win7 µVision V5.15 SDK_3.0.8

4 posts / 0 new
Last post
owen
Offline
Last seen:5 years 5 months ago
Joined:2015-05-26 18:12
error #5 on periph_setup.c. Win7 µVision V5.15 SDK_3.0.8

Hello all

I have a ' "no source": Error: #5: cannot open source input file' reported for periph_setup.c.
I have checked all the paths and file locations and they seem correct.
I also checked file permissions and set the whole file hierarchy to read/write access.
I tried deleting and re-adding the .c file to the project.
I looked at the compiler command issued for periph_setup.c and it is very big, more than 5kB on a single Win7 command line. Could that be the problem?
There is a feature called "via files" that permits shorter command lines by reading compiler arguments out of a file.
How can I set up MDK5 to use --via? Project properties has an Includes editor in the C/C++ tab and that seems to control the compiler command generation.

Specifically...

I am using µVision V5.15 with DA14580_581_SDK_3.0.8.0 and trying to compile my very first project.
Following "UM-B-003_DA14580_581 Software Development Guide_v1.6.pdf" to the end of section 4.4.
Running Win7x64.

*** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'template'
compiling arch_main.c...
..\..\..\src\plf\refip\src\arch\main\ble\arch_main.c(39): error: #5: cannot open source input file "periph_setup.h": No such file or directory
#include "periph_setup.h"
..\..\..\src\plf\refip\src\arch\main\ble\arch_main.c: 0 warnings, 1 error
compiling periph_setup.c...
"no source": Error: #5: cannot open source input file "..\..\..\src\modules\app\src\app_project\my_application\system\periph_setup.c": No such file or directory
. . \ \…\ src \ \ app \ src \ app_project \ my_applic模块ation\system\periph_setup.c: 0 warnings, 1 error

[...]

IDE-Version:
µVision V5.15
Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.

Tool Version Numbers:
Toolchain: MDK-Lite Version: 5.15.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.05 update 2 (build 169)
Assembler: Armasm.exe V5.05 update 2 (build 169)
Linker/Locator: ArmLink.exe V5.05 update 2 (build 169)
Library Manager: ArmAr.exe V5.05 update 2 (build 169)
Hex Converter: FromElf.exe V5.05 update 2 (build 169)
CPU DLL: SARMCM3.DLL V5.15.0
Dialog DLL: DARMCM1.DLL V1.12.0.0
Target DLL: Segger\JL2CM3.dll V2.99.15.0
Dialog DLL: TARMCM1.DLL V1.9.0.0

Regards,
Owen

Keywords:
Device:
owen
Offline
Last seen:5 years 5 months ago
Joined:2015-05-26 18:12
Shorter paths solved problem.

Shorter paths solved problem.

The compile succeeded when I moved the entire project folder tree higher in the file system. I do not know the specific cause, but likely something related to Win7x64 limitations of command line length, path lengths, or folder nesting.

Note: On first running MDK5 I was given a choice to Upgrade the project from MDK4 format or to install MDK4 legacy support in MDK5. I chose to upgrade the project.

For others to judge their own folder layouts, I describe c:\BAD_PATH\my_project.uvprojx and c:\GOOD_PATH\my_project.uvprojx .

Length(c:\BAD_PATH) = 193 characters including 18 "\"
Length(c:\GOOD_PATH) = 113 characters including 11 "\"

Regards,

Owen

JE_Dialog
Offline
Last seen:1 day 2 hours ago
Staff
Joined:2013-12-05 14:02
THanks for the feedback Owen.

THanks for the feedback Owen. BR JE_DIalog

klim9531
Offline
Last seen:4 years 3 months ago
Joined:2015-01-28 23:52
I had a similar problem when

I had a similar problem when I was first getting started. The culprit was the name of the download DA14580_581_SDK_3.0.8.0.zip, unzippng it and accepting the default path put it in a directory named 'DA14580_581_SDK_3.0.8.0' Win7 is apparently OK with having dots in the dir name, but Keil uV 5x it seems is not. Just copying the directory to the root and renaming it solved the problem, I was able to compile/run the sample appa after that. Hope this helps.

Topic locked