Editing Studio 6 projects?

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

With Studio 4 I could create a new project based on an existing one by hand editing the .APS file. Studio 6 uses .atsln files but seems to store changes in a .atsuo file. If I make a copy of an existing .atsln file and 'run' it S6 will create a new .atsuo file with the same name as my 'copy' (not the original) but any changes I make to the 'new' project also show up in the original when I open THAT project.

How can I 'clone' an existing project, change it to use different files (so I can create a new behaviour without destroying the original) and also change the name of the exe files produced? The .atsln files seem to be just simlinks to the repository and don't have much project info in them.

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

I believe your understanding of .atsln and .atsou files is wrong. I am basing this on my understanding of .sln and .sou files for MS Visual Studio.

The .atsln file should contain solution settings that holds for all developers using the solution. The .stsou file should contain personal preferences, i.e. this file exists in one incarnation for each developer.

This is just out of my memory, so I might be wrong.

I think this boils down to
i) you should probably not dabble with project files in the way you are attemting to, and
ii) if you persist, then you probably need to dig deeper into the file(s) and look for specific paths in all places etc..

If you give more of a scenario of what you are trying to acomplish there mighrt be alternative solutions/suggestions.

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

First of all .atsln files are text files and readable with an editor. The .atsuo files are binary (not ascii).

What I want to do is to take an existing working project and substitute some of the files in it with new ones that are edited versions of the existing files. In particular I would replace the main.c file with a new one that contained modified behaviour, but used functions in some existing files and some functions in new or modified files. I want to keep the existing directory intact since I will now have two 'parallel' similar projects that produce two different versions of the project that run on the same hardware. This would be cleaner than putting tons of #ifdef directives in many files. The primary difference between the two projects will probably be in having different main.c files (such as basic_main.c and deluxe_main.c).

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

OK. I understand that this might make you puke violently :D, but I would use a version/revision control system. Any decent one will allow you to "branch off" for doing a "variant".

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:
OK. I understand that this might make you puke violently :D, but I would use a version/revision control system. Any decent one will allow you to "branch off" for doing a "variant".
For some applications that is a viable solution, but it would seem to force my having two parallel directories, one for each version which is what I wanted to avoid. The information about a project's settings (which seems to include what files were left open and to what line number, what files are included, compiler/linker settings, etc must be stored some place, S6 being based on M$ I'm guessing in the registery (yuck) even though there is a file describing the project. Is there a way to modify the project to use an external makefile? At least that would get me partway there (except I still can't create two different projects with different makefiles?)

DEAN??????

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

Quote:

but it would seem to force my having two parallel directories, one for each version which is what I wanted to avoid.

But a code management system allows that. Any shared files continue to have one master copy and changes you make in one branch can be committed to the repository then pulled as updates in the other location.

As a possibly(??) simpler alternative if you use a "modern" operating system (or a 30 year old one in the case of Linux!) they have the facility to make one file/directory appear in more than one place. In Linux they are called "soft/hard links" while in Windows they are called "joins"/"junctions". Even for Windows XP sysinternals.com offer a junction.exe and later OS (Vista/7) have it natively. So if you have:

\foo\main.c
     uart.c
     uart.h

You can either:

ln -s /bar /foo

or

junction \bar \foo

and then you have:

\foo\main.c
     uart.c
     uart.h
\bar\main.c
     uart.c
     uart.h

where they are really the same files. If you edit \foo\main.c when you save the changes appear in \bar\main.c and so on.

It only took about 1/4 of a century for Windows to catch up with Unix/Linux in this sense!

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

Calm down... The story goes something like this:

  • atsln: Solution. Contains solution wide config and links to projects
  • atsuo: Solution user settings. An studio specific file which stores settings that only current user uses
  • projectname/*.cproj: C project file. Contains project settings and file links. If you want ot switch out files, this is the place to go (and also to change the name of the project, which should be synced with the atsuo file)

Quote:

You can either:
Code:
ln -s /bar /foo

I want ln on windows!!

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Quote:

which seems to include what files were left open and to what line number, what files are included, compiler/linker settings, etc must be stored some place

I believe such "personal" information is stored in the .atsou file. This is what I tried to tell you above.

Quote:
but it would seem to force my having two parallel directories

Yes. But you do realize that "the prime home" of files are no longer on your local hard disk? The prime home is in the repository of the VCS, and here you can sync/merge the two branches, and then push those updated files out to your copies on the local hard disk.

I did a small test in AS6, hoping that the build settings for inividual files could be set per configuration. According to my experiments, they can't. A sad misfortune, since this might have been a solution to your problem.

Aside: I wonder why the individual setting for Build Action is there at all if it can not be varied over different configurations or some such. If the only option is to always or never be built into the project then one could simly control this by having it or not having it in the project. Strange. If someone from Atmel comes by, then we might get an explanation of what the intended use of the setting is?

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

meolsen wrote:
Calm down... The story goes something like this:
  • atsln: Solution. Contains solution wide config and links to projects
  • atsuo: Solution user settings. An studio specific file which stores settings that only current user uses
  • projectname/*.cproj: C project file. Contains project settings and file links. If you want ot switch out files, this is the place to go (and also to change the name of the project, which should be synced with the atsuo file)

Quote:

You can either:
Code:
ln -s /bar /foo

I want ln on windows!!

Too bad S6 won't run on Linux!

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

Quote:

I want ln on windows!!

As I say, Vista and Win7 now have some command for setting up junctions (try "help" at a command prompt and look through the available commands). For Windows XP there is:

http://technet.microsoft.com/en-...

In fact I'd recommend everyone get pretty much everything Mark Russinovich has made available on Sys Internals - things like procexp.exe and procmon.exe are invaluable:

http://technet.microsoft.com/en-...

PS I'm reminded that the command in Vista (and presumably Win7?) is mklink:

http://www.mydigitallife.info/cr...

this is very like Unix'es "ln" command.

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

Can you put some sort of #IFDEF conditional in your source so that you have BOTH behaviors in a single project, just by changing a define?

Maybe two different header files, with the appropriate one referenced based on a define?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

meolsen wrote:
Calm down... The story goes something like this:
  • atsln: Solution. Contains solution wide config and links to projects
  • atsuo: Solution user settings. An studio specific file which stores settings that only current user uses
  • projectname/*.cproj: C project file. Contains project settings and file links. If you want ot switch out files, this is the place to go (and also to change the name of the project, which should be synced with the atsuo file)

Quote:

You can either:
Code:
ln -s /bar /foo

I want ln on windows!!

Thanks for the idea. I can do EXACTLY what I want by
making a copy of, and renaming BOTH the .atsln and .cproj files. Then I edit the .atsln file to rename the project and the .cproj file link. Then I open the new project by clicking on the new .atsln file and make my changes which will be saved to the new .cproj file.

I tested this and it seems to work. I can now create two different executables from a common set of source files with one or two modified source files and maybe some modified header files.

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

Reviving this old thread, as I've just hit this...

meolsen wrote:

  • atsln: Solution. Contains solution wide config and links to projects
  • atsuo: Solution user settings. An studio specific file which stores settings that only current user uses

 

It seems that the selection of which Project is the StartUp Project is saved in the .atsuo file?

 

 

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

awneil wrote:
It seems that the selection of which Project is the StartUp Project is saved in the .atsuo file?

 

Yes, it is - see: http://stackoverflow.com/questio...

 

Which links here - http://stackoverflow.com/questio... - for how to set the default when the .atsuo file is not found.

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