Atmel Studio 7 file and directory error

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

 

I am sorry if this is a repost from another thread, however I cannot find an answer that helps. I have the SAM4N Xplained Pro given to me for a class on microcontrollers. However, I cannot get Atmel Studio 7 to work on my computer. When I try to build a solution (regardless of whether its a custom built project or an ASF example project) I continue to get an error "<some file>: No such file or directory" and the .elf file will not build. I checked the paths to the "missing" files and they are included in their respective locations. The build path also does not exceed the total number of characters that the command line can handle, which was the closest solution that I could find in the Atmel Studio 7 documentation. I need this for a class and am lost on how to use this IDE, so I really do appreciate any help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tell us more about the actual path to the file(s).

 

Spaces in path?

National characters?

On a networked drive?

 

If the thing you are working on is not a government or business secret, you could perhaps post the build output here? After the failed build, switch over to the Output tab. Mark everything (ctrl-A) and copy (ctrl-C). Paste in a post here.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for getting back to me so quick Johan! I'm in a college class and for the most recent try used the example Getting Started build for the SAM4N16C, since I would assume that it should compile. However, here is the build for the file. The path has no spaces and is alphanumeric with only standard symbols and it is all on the a local drive.

 

------ Build started: Project: 1, Configuration: Debug ARM ------
Build started.
Project "1.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\Cole\Documents\Atmel Studio\7.0\GETTING-STARTED1\GETTING-STARTED1\1.cproj" (target "Build" depends on it):
    Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all 
        Building file: ../src/ASF/common/services/clock/sam4n/sysclk.c
        Invoking: ARM/GNU C Compiler : 4.9.3
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAM4N16C__ -DDEBUG -D__SAM4N16C__ -Dscanf=iscanf -DARM_MATH_CM4=true -Dprintf=iprintf -DBOARD=SAM4N_XPLAINED_PRO  -I"../sam/applications/getting-started/sam4n16c_sam4n_xplained_pro" -I"../src/ASF/common/utils" -I"../src/ASF/common/services/serial/sam_uart" -I"../src/ASF/sam/drivers/pmc" -I"../src/ASF/sam/boards" -I"../src/ASF/sam/drivers/pio" -I"../src/ASF/sam/boards/sam4n_xplained_pro" -I"../src/ASF/common/boards" -I"../src/ASF/sam/utils/header_files" -I"../src/ASF/sam/drivers/tc" -I"../src/ASF/sam/utils/cmsis/sam4n/source/templates" -I"../src/ASF/common/services/ioport" -I"../src/ASF/sam/utils/cmsis/sam4n/include" -I"../src/ASF/thirdparty/CMSIS/Include" -I"../src/config" -I"../src/ASF/thirdparty/CMSIS/Lib/GCC" -I"../src" -I"../src/ASF/common/services/clock" -I"../src/ASF/common/utils/stdio/stdio_serial" -I"../src/ASF/sam/utils" -I"../src/ASF/sam/utils/preprocessor" -I"../src/ASF/common/services/serial" -I"../src/ASF/sam/drivers/usart" -I"../src/ASF/sam/drivers/uart"  -O0 -fdata-sections -ffunction-sections -mlong-calls -Wall -mcpu=cortex-m4 -c -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return  -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -MD -MP -MF "src/ASF/common/services/clock/sam4n/sysclk.d" -MT"src/ASF/common/services/clock/sam4n/sysclk.d" -MT"src/ASF/common/services/clock/sam4n/sysclk.o"   -o "src/ASF/common/services/clock/sam4n/sysclk.o" "../src/ASF/common/services/clock/sam4n/sysclk.c" 
arm-none-eabi-gcc.exe(0,0): error: ../src/ASF/common/services/clock/sam4n/sysclk.c: No such file or directory
arm-none-eabi-gcc.exe(0,0): warning: '-x c' after last input file has no effect
arm-none-eabi-gcc.exe(0,0): error: no input files
        compilation terminated.
        make: *** [src/ASF/common/services/clock/sam4n/sysclk.o] Error 1
        The command exited with code 2.
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "1.cproj" -- FAILED.
Done building project "1.cproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't like the look of this:

Quote:
arm-none-eabi-gcc.exe(0,0): warning: '-x c' after last input file has no effect

Especially since that option occurs at thew very beginning of the compiler command parameters, right after the path to the compiler per se.

 

What happens if you copy the whole command and run it manually on a command line? (You will need to have the correct current directory - which one is not clear to me from the build output above, but it is likely the one where the makefile resides, probably the Debug directory.)

 

If that goes well, next test would be to execute the Make command manually.

 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sun. Jan 3, 2016 - 09:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Soggy Letdown wrote:
 I'm in a college class 

So have you asked your tutor/instructor/teacher for help?

 

It's a lot easier to diagnose & debug this stuff when you're at the actual machine with someone who's familiar with the setup - rather that a complete stranger trying to do it remotely with no context.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Alright, I tried to compile it by copying the command into command prompt. When I looked in the Debug directory (that contains the makefile) all of the subdirectories contained within them were empty. However I found the sysclk.c files with the subdirectories of the src folder that is housed in the same directory as the Debug. However, when I tried to specify the full sysclk.c path in command line it had a problem with finding the sysclk.o (which should exist as a file within the same place that sysclk.c was located but does not exist). Another error that the compiler gives me when I specified the full path of the sysclk.c was that the header #include <sysclk.h> does not exist as a directory or file (however it does exist in the same directory). 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the SAM4N Xplained Pro

This forum is for AVR related Studio problems, the question belongs in the ARM related Studio problems. ( Well the powers to be decided this)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry about replying in the wrong forum, I got a little confused on the forum locations. As for asking my teacher, I did on the first day of using this in class and he had no idea. We had just switched to this from Xilinx for budget issues (they raised the price of the board we needed to buy at Xilinx, so they switched us to Atmel's board). I had issues and asked him in class but he told me he didn't really know what was going on either. I was planning on emailing him again today to see if he had any updates from any other student who was having trouble. Would it help to post the zipped file? I know that can be iffy for some places since it pertains to security issues?

Last Edited: Sun. Jan 3, 2016 - 09:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

I don't like the look of this:

Quote:
arm-none-eabi-gcc.exe(0,0): warning: '-x c' after last input file has no effect

Especially since that option occurs at thew very beginning of the compiler command parameters, right after the path to the compiler per se.

 

What happens if you copy the whole command and run it manually on a command line? (You will need to have the correct current directory - which one is not clear to me from the build output above, but it is likely the one where the makefile resides, probably the Debug directory.)

 

If that goes well, next test would be to execute the Make command manually.

 

Hi Johan

I found this post and it seems much like my problem... but it is over a year since the post.  I hope someone will respond.

 

Here is my output when I try to compile a starter ARM file in Studio 7 on a WIN 10 machine:

 

------ Rebuild All started: Project: CAN_QUICK_START1, Configuration: Debug ARM ------
Build started.
Project "CAN_QUICK_START1.cproj" (Clean target(s)):
Target "Clean" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\Gerry & Linda\Documents\Atmel Studio\7.0\CAN_QUICK_START1\CAN_QUICK_START1\CAN_QUICK_START1.cproj" (entry point):
    Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe clean
        rm -rf  src/ASF/common/utils/interrupt/interrupt_sam_nvic.o src/ASF/sam0/boards/samc21_xplained_pro/board_init.o src/ASF/sam0/drivers/can/can.o src/ASF/sam0/drivers/port/port.o src/ASF/sam0/drivers/sercom/sercom.o src/ASF/sam0/drivers/sercom/sercom_interrupt.o src/ASF/sam0/drivers/sercom/usart/usart.o src/ASF/sam0/drivers/sercom/usart/usart_interrupt.o src/ASF/sam0/drivers/system/clock/clock_samc20_c21/clock.o src/ASF/sam0/drivers/system/clock/clock_samc20_c21/gclk.o src/ASF/sam0/drivers/system/interrupt/system_interrupt.o src/ASF/sam0/drivers/system/pinmux/pinmux.o src/ASF/sam0/drivers/system/system.o src/ASF/sam0/utils/cmsis/samc21/source/gcc/startup_samc21.o src/ASF/sam0/utils/cmsis/samc21/source/system_samc21.o src/ASF/sam0/utils/stdio/read.o src/ASF/sam0/utils/stdio/write.o src/ASF/sam0/utils/syscalls/gcc/syscalls.o src/qs_can_basic.o   
        rm -rf  src/ASF/common/utils/interrupt/interrupt_sam_nvic.d src/ASF/sam0/boards/samc21_xplained_pro/board_init.d src/ASF/sam0/drivers/can/can.d src/ASF/sam0/drivers/port/port.d src/ASF/sam0/drivers/sercom/sercom.d src/ASF/sam0/drivers/sercom/sercom_interrupt.d src/ASF/sam0/drivers/sercom/usart/usart.d src/ASF/sam0/drivers/sercom/usart/usart_interrupt.d src/ASF/sam0/drivers/system/clock/clock_samc20_c21/clock.d src/ASF/sam0/drivers/system/clock/clock_samc20_c21/gclk.d src/ASF/sam0/drivers/system/interrupt/system_interrupt.d src/ASF/sam0/drivers/system/pinmux/pinmux.d src/ASF/sam0/drivers/system/system.d src/ASF/sam0/utils/cmsis/samc21/source/gcc/startup_samc21.d src/ASF/sam0/utils/cmsis/samc21/source/system_samc21.d src/ASF/sam0/utils/stdio/read.d src/ASF/sam0/utils/stdio/write.d src/ASF/sam0/utils/syscalls/gcc/syscalls.d src/qs_can_basic.d   
        rm -rf "CAN_QUICK_START1.elf" "CAN_QUICK_START1.a" "CAN_QUICK_START1.hex" "CAN_QUICK_START1.bin" "CAN_QUICK_START1.lss" "CAN_QUICK_START1.eep" "CAN_QUICK_START1.map" "CAN_QUICK_START1.srec"
    Done executing task "RunCompilerTask".
Done building target "Clean" in project "CAN_QUICK_START1.cproj".
Done building project "CAN_QUICK_START1.cproj".

Build succeeded.
------ Rebuild All started: Project: CAN_QUICK_START1, Configuration: Debug ARM ------
Build started.
Project "CAN_QUICK_START1.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\Gerry & Linda\Documents\Atmel Studio\7.0\CAN_QUICK_START1\CAN_QUICK_START1\CAN_QUICK_START1.cproj" (target "Build" depends on it):
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 8 --output-sync
        'C:\Users\GERRY' is not recognized as an internal or external command,
        operable program or batch file.
        The system cannot find the path specified.
        make: *** [src/ASF/common/utils/interrupt/interrupt_sam_nvic.o] Error 1
C:\Users\Gerry & Linda\Documents\Atmel Studio\7.0\CAN_QUICK_START1\CAN_QUICK_START1\Debug\Makefile(266,1): error: recipe for target 'src/ASF/common/utils/interrupt/interrupt_sam_nvic.o' failed
C:\Users\Gerry & Linda\Documents\Atmel Studio\7.0\CAN_QUICK_START1\CAN_QUICK_START1\Debug\Makefile(273,1): error: recipe for target 'src/ASF/sam0/boards/samc21_xplained_pro/board_init.o' failed
        make: *** Waiting for unfinished jobs....
        'C:\Users\GERRY' is not recognized as an internal or external command,
        operable program or batch file.
        The system cannot find the path specified.
        make: *** [src/ASF/sam0/boards/samc21_xplained_pro/board_init.o] Error 1
C:\Users\Gerry & Linda\Documents\Atmel Studio\7.0\CAN_QUICK_START1\CAN_QUICK_START1\Debug\Makefile(280,1): error: recipe for target 'src/ASF/sam0/drivers/can/can.o' failed
        'C:\Users\GERRY' is not recognized as an internal or external command,
        operable program or batch file.
        The system cannot find the path specified.
        make: *** [src/ASF/sam0/drivers/can/can.o] Error 1
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "CAN_QUICK_START1.cproj" -- FAILED.
Done building project "CAN_QUICK_START1.cproj" -- FAILED.

Build FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

It looks very much like the make.exe will not allow spaces in the path.  Is this the problem?

Now I regret using spaces in the computer name as it is used in the path here.  Do you have any suggestion how to get around this problem?

Renaming would mess up other installs I assume.

 

Thanks

Gerry

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

GerryK9 wrote:
It looks very much like the make.exe will not allow spaces in the path.  Is this the problem?

Yes[1].

 

Now I regret using spaces in the computer name as it is used in the path here.  Do you have any suggestion how to get around this problem?

I think you really need to tackle the root of the problem - not work around it. 

 

Renaming would mess up other installs I assume.

Who knows.

 

But not renaming means that this will continue to give you grief forever

 

Probably best to bite the bullet.

 

http://www.avrfreaks.net/comment...

 

EDIT

 

[1] Well, of course there are workarounds - you would have to find a way (or ways) to correctly quote the path for each tool, and a way to force Studio to always apply that quoting.

The latter is likely to be the hard bit ...

 

Last Edited: Thu. Jan 11, 2018 - 09:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

GerryK9 wrote:
Now I regret using spaces in the computer name as it is used in the path here.

1) This is not a question about the computer name, but about the path to the folder where the project resides.

 

This path name comes from naming a user "Gerry & Linda".

 

2) Generally, a space in the path should not be a problem for Atmel Studio (and its build system). Studio by default places projects in a folder

  "C:\Users\UserName\Documents\Atmel Studio\7.0\"

and that path has a space in it. If that was a problem we would see masses of questions about this all of the time. My bet is on the ampersand. See below.

 

I would not recommend renaming the path anyway, since it might mess up other things like other documents and stuff that refers to that path.

 

Installed programs does not (normally) reside in user folders but under the root folder "C:\Program Files" and "C:\Program Files (x86)". You do NOT need to rename those folders. They are nmot a part of the problem. (If they where, you would not get as far into the build that you actually do.)

 

The Ampersand!

C:\Users\Gerry & Linda\Documents\Atmel Studio [..]

 

The ampersand has a very special meaning when it comes to command lines. In the best of worlds the path should be quoted (surrounded by quotes "like this"), but in this case it obviously isn't. Or the build system does not handle the ampersand corerctly despite it being quoted. Or... Whatever... But the ampersand is a really bad character to have in a path.

 

Put the project in a path which lacks both spaces and special characters, like the ampersand.

 

If your windows system allows you to, then perhaps place a folder directly under the root, e.g. "C:\AtmelStudioProjects" and put your Atmel Studio projects in that folder. OTOH, other complications might come with this approach:

- Windows might not allow you to create folders directly under the root

- Other rights might be denied due to the folder being directly under the root

...

 


 

Other tricks could also be used, e.g. by assigning a drive letter to the top directory of the project. It involves the SUBST command line command, but since it it obvious that you're not a confident "Windows system administrator" then this might perhaps not be a fitting solution. It also requires setting up the project again since the project files might still refer to some parts of the project with old complete paths (that then still has the spaces and ampersand).

 


 

Advice: Next time you set up a Windows system, do not create one user account for two separate persons. Separate persons should have separate user accounts. For a number of good reasons: You get separate shortcuts, separate places to store documents, separate browsing histories, you don't risk messing up each others documents etc etc.. Yes you will need to log out and in when switching users, but that is a small price to pay for the security and cleanliness you get.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan, thanks for the quick response!

FYI the username was a default from naming the computer.

I noticed the space in "Atmel Studio"... but these were before the make.exe call.  Probably the ampersand!

 

I'll try creating a new user name first, it seemed like one of the options, or I can create a path off of the C: drive root.

With a new drive letter I could shorten the path too!

 

Thanks for your help.

Gerry