STUDIO: Relative filenames for sources?

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

How do you specify relative filenames in Studio?

When specifying project files, e.g. Add Existing Source File(s)" Studio seems to create an absolute path.

So when I move the whole project to a friend's machine, he has to re-specify the location of the source files because the project file (".aps") contains absolute references. Is there a simple workaround?

Thanks,

Mike

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

Do a search on this forum -- this subject comes up about once a month.

The short answer is: Known bug: The current AVR Studio cannot handle relative paths in the general case.

Of course, you can always go to an external Makefile (highly recommended, by the way - check out MFile from WinAVR) to support relative source trees (and to create an object directory for compiled components). But even so, you will still have to refer to the files directly in AVR Studio. And it's best if the final destination files (MyProject.elf, MyProject.hex, . . .) reside in the project's home directory.

Of course, that just my opinion. I could be wrong.

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

What I did is create a folder in MyDocuments that says AVR. Then, every time i create a new project i point studio to save the project in a subfolder in AVR. Now, when i transfer to another machine i simply create an AVR folder in mydocs, and copy the subfolder.

Works like a charm.

I do not know how it would work in Linux though

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

:oops: I did search the forum for clues - miraculously managing to avoid using the appropriate search terms. Doh! Thanks for re-iterating what was in the forum already.

If you end up on this embarrassing thread check out the following more useful thread. https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=64033

Thanks for your forbearance everyone.

Mike