EmbeddedRelated.com
Forums

CW430: Fastest way to create a new project from existing one?

Started by aekalman February 28, 2003
Hi all you CrossWorks 430 users ...

What's the fastest way to create a new project that is substantially
identical to an existing one?

E.g. I have a solution (t40) with one project (t40). I'd like to add
another project (t41) to this solution. The Project System Help files
talks mainly about File | New | New Project ..., but I don't want to
create the t41 project from scratch, as it is substantially identical
to the t40 project.

In the help there is a mention of a "Staging" project, but it's
not
clear what that's for ...

--Andrew


Beginning Microcontrollers with the MSP430

Hi Andrew,

Still need to pick up where I left off with Salvo BTW - got sidetracked
Do you have a demo already that can run on CrossWorks, haven't checked
anymore...

> Hi all you CrossWorks 430 users ...
> What's the fastest way to create a new project that is substantially
> identical to an existing one?

I've put this forward to Paul and Michael not too long ago.
I think you'll find that Michael's about to put that in, unless
it's already there and I've missed it as well.

While the hierarchy concept of a solution with one or more projects with all
their
associated groups/files might seem odd, it is a significant contribution to
productivity.

When starting the first time, it's easy enough (for others who will want to
try CrossWorks 430)
One solution containing one project, and possibly just one file to start off
with.
It might be that RAL's further flexibility by distinction between a
solution and a workspace is somewhat
confusing terminology for some ??
(I must admit I enjoy looking at the pretty HTML context sensitive help :-)

If Kickstart is to eventually contain the new IAR platform, rather than EW430
V1.26B, people will have to
grasp this concept more anyway I think - as IAR now have adopted the same
approach.
IAR's EW430 Beta 2.09b follows RAL by introducing the concept of
"workspaces".

I noticed that the IAR Beta has a project option "Insert project into the
workspace".
I guess this would equate to RAL's CW allowing you to insert a project from
one solution directly to another ??
I hope the next release implements this, as it's a good idea.
When you have a project with 20 groups and dozens of files in it, it would be
somewhat cumbersome
to re-create the whole (almost identical) hierachy into a new solution, whereas
a single menu click to 
"import" the previous project, and then add/delete one or 2 files is a
big timesaver.

I guess that by the same token one could assert that if you have large projects
like that, the time needed 
to recreate a new project hierachy in a new solution surely is insignificant to
the time you spend on the
project itself , given its magnitude it would have by then ??????

I'm not sure. Some food for thought.
I hope I didn't state anything stupid - let's wait till the UK wakes
up, and see what Paul's take is on the
issue.

BTW : I noticed Clyde's posting, which reminds me that I should really
state that Hitech C allows you to
allocate absolute vars already 1-2-3 anyway....... (when I mentioned that EW430
no longer needs to
have new segments declared with pragmas and endless XCL file stuffing around)
I might also temporarily refrain from my take on the MSP430 tools, as I'm
hesitant it might land me on hot
water again somehow .. :-)
I have my own assertions/recommendations to my clients - I'll leave it
there for now - people should
try their own taste I guess.

People who have asked me "off-forum" will get my personal opinion
off-forum.

Claim Iraq as State #51 to the union, heh :-)

Cheers,
Kris







Andrew,

> What's the fastest way to create a new
project that is 
> substantially identical to an existing one?
> 
> E.g. I have a solution (t40) with one project (t40). I'd like 
> to add another project (t41) to this solution. The Project 
> System Help files talks mainly about File | New | New Project 
> ..., but I don't want to create the t41 project from scratch, 
> as it is substantially identical to the t40 project.

If you're "super careful" you can edit the .hzp file as an XML
file and
"copy" things, and then reload.

For example, if you open up your T40 project it has:

<solution version="1" Name="t40" >

  <project Name="t40" >
    <configuration Target="MSP430F449"
linker_memory_map_file="$(StudioDir)/targets/MSP430F449.xml"
c_preprocessor_definitions=""
c_user_include_directories="$(SalvoDir)/test/t40/sysx;$(SalvoDir)/test/t
40;$(SalvoDir)/inc" project_directory=""
project_type="Executable"
Name="Common" build_use_hardware_multiplier="Yes" />
    <folder Name="Source Files" >
      <file file_name="../main.c" Name="main.c" >
        <configuration
c_preprocessor_definitions="SYSX;TEST_SCHEDULER;TEST_INTERRUPTS;TEST_OST
IMER;TEST_DELAYED_TASKS" Name="Common"
c_additional_include_directories="\salvo\test\t40\sysx;\salvo\inc"
/>
      </file>

(Of course, this'll be reformatted by Outlook).

You can copy the <project>...</project> element and change the
"Name"
attribute to something like T41.  I believe that Mike has a means of
generating projects that got the TI examples into our system, but it's
simple enough to construct something from scratch or from an existing
project.  As it's all in XML, it should be simple... ;-)

> In the help there is a mention of a
"Staging" project, but 
> it's not clear what that's for ...

Mike didn't document it.  It's a way to copy files from one place to
another, which we use when building our releases.

-- Paul.

--- In msp430@msp4..., "Paul Curtis" <plc@r...> wrote:
> If you're "super careful" you can
edit the .hzp file as an XML file
and
> "copy" things, and then reload.

Well, I may try that, but I'm somewhat loathe to, as I don't want to
break anything and I don't want to introduce some weird errors.

For the Salvo for CW430 port, we'll need to create on the order of 28
projects for the tutorials and example projects. They're all slightly
different, and so it becomes a lot of work to create all those
puppies.

Some other IDEs handle this VERY well -- it's trivial to Save Project
As ..., and the newly-saved project carries with it the new name (e.g.
t41), etc. Something to consider for CW430.

--Andrew