there are two same file in solution project, please tell me how to summarize it in one?

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

Hi,

 

I use Atmel Studio6.2.
I would like to ask a question about the function that cupple or more projects can register with solution project.

 

When there are the same header file and cord file by cupple projects each, Is there the function to use a file commonly?

 

(project1)
・main01.c
・spi.h
・spi.c

 

(project2)
・main02.c
・spi.h
・spi.c
 

 

project1 and project2 are registered with same  solution project.

Are spi.h and spi.c used in all projects same files.

 

there are two same file in solution project、please tell me how to summarize it in one?

 

thanks.

 

This topic has a solution.

kenji maehara

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there the function to use a file commonly?

When you use the "Add existing item..." option in Studio to add spi.c to the project you will see that the [add] button has a drop arrow to the right ("[Add V]")? Drop that arrow and you get two options - one of them is "add as link". Use that instead. Now it keeps spi.c (and .h) in the original place but both projects share the one copy. There is only one copy on disk and changes you make to it while editing (bug fixing) will update the master copy that all projects can "see".

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

clawson wrote:
changes you make to it while editing (bug fixing) will update the master copy that all projects can "see".

So you have to be really careful that changes you make for one project don't break the other(s)...

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: 0

Hi clawson

 

Thank you for your reply. I understood how to use "add as link" function.

 

I found the movie site how to use this function when I search these words "atmel studio 6 add as link" on google.

http://youtu.be/n_IvIQeRaCo

 

 

I tested it in this site.

 

https://sourceforge.jp/projects/...

 

 

Thank you so much.

kenji maehara

Last Edited: Fri. Nov 28, 2014 - 08:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi awneil,

 

Thank you for your reply.

 

I could link the souce code files by Atmel Studio.

 

I was able to link the file.

https://sourceforge.jp/projects/...

 

Thank you so much.

 

 

kenji maehara

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

blackzoro1112 wrote:
I search these words "atmel studio 6 add as link" on google.

Just for future reference, remember that Atmel Studio is built on MS Visual Studio; so it's often worth including "Visual Studio" when searching - especially for generic GUI things like this which are not specific to Atmel...

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...