Multi project setup using solution... Best practice?

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

Hi all,

currently I have my projects organized for AVR Studio 4 using some nasty workarounds to get the following structure:
.\projects\project1 <-AVR Studio4 project file and project specific source files
.\projects\project2 <-AVR Studio4 project file and project specific source files
.\projects\project3 <-AVR Studio4 project file and project specific source files
.\helper <- shared helper source files
.\driver <- shared low level driver files
...

Now, I want to port this to Atmel Studio 6.
I want to have a solution with all projects inside and again share the helper and driver files.

I can add the files as links, but than, the files are all shown as a long list in the main folder in the solution explorer (like in AVR Studio4)

Is it somehow possible to get a tree view when adding files which are from outside the project folder?

What is your solution for source files shared over multiple projects?

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

In real VS2008/2010 an overall "Solution" can be made up of several "Project"s so you can have projects for the "helper" and "driver" stuff. I'd have thought you could do the same using Add new/existing Project as in this image...

Maybe have the other projects build a static lib then have the actual development project link with those .a files. (this is the way real development used to be done!)

Attachment(s): 

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

Of course I can have a solution with more than one project inside. But I don't like the plain list view, which I get when I add the helper and driver files as links to the projects.

Regarding libraries:
I will not be able to debug the library files, right?
And also, the helper and driver files consist of some precompile defines, which depend on the compiled project.

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

Quote:

I will not be able to debug the library files, right?

Why would you want to - the whole point of libraries is that it's complete/tried/tested code. Do you ever feel the need to debug printf() or strcpy() or cos()?

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

clawson wrote:
Quote:

I will not be able to debug the library files, right?

Why would you want to - the whole point of libraries is that it's complete/tried/tested code. Do you ever feel the need to debug printf() or strcpy() or cos()?

1. The driver and helper files are changed to often to put them into a library. I only share them between the projects, because I don't want to merge the changes all the time I edit something in those files.
And of course I have to debug them if something doesn't work.

2. Have you never debugged your low level driver to encircle problems in prototype hardware? Of course, this doesn't count for printf() and similar standard functions.

Anyway, It seems I have to live with the missing folder view for files added as links.

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

I like to know how to create a solution and adding sub programs to that solution. Please help me

I am great

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

Well create a project and it will create a holding solution then in Solution Explorer right click and Add New Project to add as many more as you want.