Adding folders and files by link to a project.

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

I use folders in my projects and I add files by links.  The recent versions of Studio work but the solution explorer view is goofy.

 

I saw it become goofy while I watched.

 

I had a good project.  Then I added the usb_user.cpp file by link in the USB_WinUSB folder (near the bottom).  It looked okay but the project wouldn't build.  It said it couldn't find the .d and .o files for the .cpp I just added.  I looked in the folder in Debug, and it was true.  the .d and .o for the other .cpp files was there, but not for the file I just added.  I could compile it by right clicking and hitting Compile, but it still couldn't build,

 

Then I killed Studio and restarted it.  Now it built, but it had created 2 new folders to put the new .cpp file in.  Another "Steve_atmel" and USB_WinUSB.   It looks goofy.  I see there is aother "System" folder there too, but Studio apparently created that earlier.

 

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

I've seen similar IIRC.

It seems to me that Studio does not rely solely on the actual file system to know the folder structure. So if there is a FS folder "foo" but Studio has no info on it in the project files it does not want to know about it sometimes.

I seem to recall a discussion a few months back ending with "always create folders from the Studio UI".

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

JohanEkdahl wrote:
It seems to me that Studio does not rely solely on the actual file system to know the folder structure.

I think that's right - Visual Studio (and, hence, Atmel Studio) project "folders" do not correspond (directly) to filesystem directories ("folders").

 

It's inherited from Microsoft Visual Studio - nothing specifically to do with Atmel.

 

Eclipse is (or was?)  similar ...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

awneil wrote:

 

I think that's right - Visual Studio (and, hence, Atmel Studio) project "folders" do not correspond (directly) to filesystem directories ("folders").

 

It's inherited from Microsoft Visual Studio - nothing specifically to do with Atmel.

 

I beg to differ.  Visual Studio does not have this problem.  Visual Studio doesn't create any hard drive folders in the project like Atmel Studio does.  Visual Studio doesn't use the word "folder" like Atmel Studio does.  Visual Studio calls the things you create in Solutions Explorer "filters" not "folders".  Visual Studio keeps track of what you see in Solution Explorer in the .proj file.

 

We can put any files into any filters in Visual Studio.  They have no relation to hard drive folders.  We use folders on hard drives because it makes sense to segregate related files into the same hard drive folder.  The same applies to filters in Visual Studio.  It makes sense to segregate related files into the same filters just as they are segregated on the hard drive.  It might appear that the project filters are related to the hard drive folders, but they are not.  Common sense dictates that the project filters would look similar to the hard drive folders but that's just because the programmer makes them look similar.