Debugger not looking in directory where .elf is being built

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

Hello:

I searched for an answer to this and couldn't find it (though I found others with similar problems).  I expect I'm overlooking something simple.

 

Build and debug used to work fine.  Now, when I build, it places the .elf file not into the project folder, but into a Debug subfolder.  When I try to invoke the debugger, I get a "Failed to Launch.  Missing File" error that indicates the debugger is looking in the project folder for the .elf.  

 

So, build is placing it into .../projectfolder/Debug and the debugger is looking in .../projectfolder.  I can move the .ef file by hand and debug will run, but it's kind of a pain.

 

Is there some setting I may have changed by accident and need to change back?

Thanks!

 

Edit:  Atmel Studio 7.0.1417

Last Edited: Wed. Jul 19, 2017 - 06:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have no solution for you, but..

 

The error is about where the debugger is looking.

 

It is normal, and by design, that the build places the .elf file in the Debug subdirectory (or in the Release subdirectory if you change the build configuration from "Debug" to "Release").

 


 

Please don't give vague descriptions of error messages. There is no or very little extra effort needed for you to quote the exact error message.

 

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: Wed. Jul 19, 2017 - 09:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks.  That points me in the right direction, though I can't find any settings related to where Debug looks for the .elf file.

So I tried adding a post-build event and that seems to be working...

 

copy "$(MSBuildProjectDirectory)\Debug\$(MSBuildProjectName).elf" "$(MSBuildProjectDirectory)\$(MSBuildProjectName).elf"

 

Just posting the fix here in case someone else runs into this.  If I find the proper way to fix it, I'll post as well.

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

OmEigaMan wrote:

Thanks.  That points me in the right direction, though I can't find any settings related to where Debug looks for the .elf file.

So I tried adding a post-build event and that seems to be working...

 

copy "$(MSBuildProjectDirectory)\Debug\$(MSBuildProjectName).elf" "$(MSBuildProjectDirectory)\$(MSBuildProjectName).elf"

 

Just posting the fix here in case someone else runs into this.  If I find the proper way to fix it, I'll post as well.

 

Thank you for posting this, you saved me 30 minutes.

 

I ran into the exact same issue. Not sure what I did, but as you reported, it used to work, and then it stopped working.

 

Admittedly I have been playing around with my toolchain settings, but nothing that should have changed the behavior of the debugger's search path. I'll call this a Studio bug and carry on with your post-build hook.

 

Last Edited: Thu. Aug 3, 2017 - 07:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Update this issue is now fixed (AVRSV-8020), and will released on future Studio update (7.0.1680 or later).

 

It occurred when changing Build settings to use external Makefile (Build Tab, under project properties), and then reverting back to system Makefile.

 

Note: Once Studio fix is available, for projects already having this issue, it is necessary to choose external make (save, build), and then revert back for the flag to be set correctly.

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

Very minor change for those using the build configurations:

copy "$(MSBuildProjectDirectory)\$(Configuration)\$(MSBuildProjectName).elf" "$(MSBuildProjectDirectory)\$(MSBuildProjectName).elf"

 

Is there an expected release date for 7.0.1680? I just updated and the latest version is 7.0.1645, which as you mentioned does not have the fix.