EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

IAR workspace opening wrong files - bug?

Started by Aaron Greer February 29, 2008
And they want $2500for this crap:)

Without Wax,
BB
--- newworld64 wrote:

> I've had this problem for years with IAR. Sometimes,
> the workspace
> will randomly open the wrong file after months
> without problems.
> Sometimes the debugger will load the wrong source
> that was not
> edited/compiled and the highlighting for the source
> is all messed up.
> We've even lost 2 USB JTAGs made by IAR because the
> debugger loaded
> the code into the JTAG instead of the target and IAR
> refused to
> exchange them. We had to switch to the TI ones.
>
> As someone suggesting, closing all the files and
> reopening them from
> the project will clean up the space if you made a
> fresh copy, but if
> it starts acting up where the debugger and the
> editor get out of
> sync, it takes 10 restarts to get it working again.
> I leave the
> original directory in place and make a copy of it
> that I rename for
> backing up old versions of the code. This gets a bit
> weird since you
> edit the code and then copy it, but it's better than
> resetting the
> all of your files.
>
> The WORST thing IAR has done was with the dongles.
> The drivers are
> screwy and you have to do a lot of manual updating
> to get them
> working. On one computer, the dongle somehow
> prevented the computer
> from accepting anything on the USB or PCMCIA ports
> without
> crashing... formar c:. Comp was fine after that.
>
> The parallel port programmer also has issues and has
> to have the
> computer restarted whenever something goes wrong
> with the software,
> but honestly, once you know about all the little
> quirks, the tools do
> work.
>
> Still better than softbaugh's tools...
>
> --- In m..., Aaron Greer
> wrote:
> >
> > Thanks for your smugly disguised explanation.
> >
> > Here is what I will do from now on:
> > - copy all project files to new folder.
> > - remove workspace files from new folder (*.eww
> and ./settings/*.wsdt, NOT *.ewp.wsdt)
> > - from IAR, create a new workspace, click
> project->add existing
> project, select the *.ewp file in the new project
> folder.
> > - Save workspace in new project folder.
> >
> > That does what I want, but I still think it's
> silly that I have to
> do it this way.
> >
> > -Aaron
> >
> >
> > ----- Original Message -----
> > From: "tintronic"
> > To: m...
> > Sent: Friday, February 29, 2008 2:59:41 PM
> (GMT-0700)
> America/Denver
> > Subject: [msp430] Re: IAR workspace opening wrong
> files - bug?
> >
> >
> >
> >
> >
> >
> >
> > > Are you aware of a method to open a project
> without
> > > necessarily opening a workspace?
> > A workspace is precisely that, a space were you
> work. I guess
> that's a
> > bit like trying to write in WORD without opening a
> document. You
> need
> > a workspace, you just don't need to save it or
> even give it a name.
> >
> > Michael K.
> >
> > --- In m... , Aaron Greer
> wrote:
> > >
> > > Michael,
> > > thanks for pointing that out, it makes a lot of
> sense. I had
> figured
> > that "project" and "workspace" were essentially
> equivalent,
> inasmuch
> > as there is no "open project..." menu option that
> I can see. Are
> you
> > aware of a method to open a project without
> necessarily opening a
> > workspace?
> > >
> > > thanks,
> > > Aaron
> > >
> > > ----- Original Message -----
> > > From: "tintronic"
> > > To: m...
> > > Sent: Friday, February 29, 2008 2:08:24 PM
> (GMT-0700)
> America/Denver
> > > Subject: [msp430] Re: IAR workspace opening
> wrong files - bug?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > As a matter of fact, you did make a wrong
> assumption. You're
> talking
> > > about the WORKSPACE, which may include more than
> one PROJECT and
> files
> > > that are NOT necessary part of any project,
> hence, the workspace
> saves
> > > the absolute path of things.
> > >
> > > You actually didn't want the same workspace. You
> wanted to edit
> the
> > > files of a different project. The fact that that
> project is a
> copy of
> > > another one is irrelevant as much as the fact
> that you store the
> > > workspace file in the project directory.
> > >
> > > There is a reason for project and workspace
> files being
> different.
> > >
> > > Michael K.
> > >
> > > --- In m... , Aaron Greer
> wrote:
> > > >
> > > > Yes, I assumed that the path info within the
> workspace was
> relative.
> > > But was that a bad assumption? I don't think so.
> It was obviously
> > > incorrect, but I believe the more desirable
> implementation would
> be a
> > > relative path.
> > > > Any IAR folks have an opinion on this?
> > > >
> > > > -Aaron
> > > >
> > > > ----- Original Message -----
> > > > From: "Kipton Moravec"
> > > > To: m...
> > > > Sent: Friday, February 29, 2008 11:58:35 AM
> (GMT-0700)
> America/Denver
> > > > Subject: Re: [msp430] IAR workspace opening
> wrong files - bug?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > My take is that you did something you were not
> supposed to do.
> > > >
> > > > The workspace probably gives full path info to
> the files. You
> > > assumed it
> > > > was relative path info.
>
=== message truncated ==
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

Beginning Microcontrollers with the MSP430

On Fri, Feb 29, 2008 at 1:46 PM, Aaron Greer wrote:
> Yes, I assumed that the path info within the workspace was relative. But was
> that a bad assumption? I don't think so. It was obviously incorrect, but I
> believe the more desirable implementation would be a relative path.

I am successfully using svn to keep IAR workspaces/projects
under source code control. This results in multiple copies
of the same workspace/project being checked out in many
different places on many users computers, so it is important
that all file paths are relative. After a little initial adjustment,
it seems to be working fine now.

You do have to look out for IAR using absolute pathnames,
I think any time you use "browse" to find/reference files, it will
default to an absolute pathname. I consider this a major
problem, but do not know if there is a way to override this
default behaviour. Check the manual for using variables
like $PROJ_DIR$ in filename specifications. I'd offer a page
number, but the manuals are on the bookshelf at work.

If you can be sure that all the filenames are relative, or
use a $xxxx_DIR$ variable, I think you should be OK. It
has worked for me so far. I'm open to any better suggestions
from the list.
--
Andy
Aaron Greer wrote:
> I've discovered what may be a bug in IAR.
>
> Here is what I did:
> Closed my current workspace in IAR (after making sure everything was saved).
> Went to Windows explorer and made a copy of the folder containing my
> workspace.
> Went back to IAR, clicked file->open->workspace, selected the workspace
> in the new folder (which is a copy of my original workspace), clicked open.
> The workspace opened in IAR and the source file I was working on opened
> in the editor section of the screen.
>
> Here is the problem:
> The source file that opened when I opened the newly copied workspace was
> actually the file in the original workspace folder. If I hadn't thought
> to check the properties of it from within IAR, I might have edited the
> file and saved it, unknowingly overwriting my original file in the
> original workspace. Fortunately, closing the file, and double clicking
> the source file in the workspace pane opens the correct one.
>
> Is this a bug or just a feature I was not aware of?
>
> Here is my IAR info:
> IAR Embedded Workbench IDE
> 4.7A (4.7.1.0)

Hi Aaron!

I talked with the EW group here and they said that editor windows that
are open are referred to using absolute path names. This means that if
you close all editor windows before making the copy it should work.

Also, the debug information in the executable refers to the source file
using an absolute path, so you should do a "rebuild all" in the new
location.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Anders,
I, like at least one other list member, use CVS to track my source and project files. Would it be safe to say that there would be no absolute path references anywhere within the project if I closed all the source files within the IDE and did a "clean all" before checking anything into CVS?

thanks,
Aaron

----- Original Message -----
From: "Anders Lindgren"
To: m...
Sent: Monday, March 3, 2008 4:29:05 AM (GMT-0700) America/Denver
Subject: Re: [msp430] IAR workspace opening wrong files - bug?

Aaron Greer wrote:
> I've discovered what may be a bug in IAR.
>
> Here is what I did:
> Closed my current workspace in IAR (after making sure everything was saved).
> Went to Windows explorer and made a copy of the folder containing my
> workspace.
> Went back to IAR, clicked file->open->workspace, selected the workspace
> in the new folder (which is a copy of my original workspace), clicked open.
> The workspace opened in IAR and the source file I was working on opened
> in the editor section of the screen.
>
> Here is the problem:
> The source file that opened when I opened the newly copied workspace was
> actually the file in the original workspace folder. If I hadn't thought
> to check the properties of it from within IAR, I might have edited the
> file and saved it, unknowingly overwriting my original file in the
> original workspace. Fortunately, closing the file, and double clicking
> the source file in the workspace pane opens the correct one.
>
> Is this a bug or just a feature I was not aware of?
>
> Here is my IAR info:
> IAR Embedded Workbench IDE
> 4.7A (4.7.1.0)

Hi Aaron!

I talked with the EW group here and they said that editor windows that
are open are referred to using absolute path names. This means that if
you close all editor windows before making the copy it should work.

Also, the debug information in the executable refers to the source file
using an absolute path, so you should do a "rebuild all" in the new
location.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Aaron Greer wrote:

> I, like at least one other list member, use CVS to track my source and
> project files. Would it be safe to say that there would be no absolute
> path references anywhere within the project if I closed all the source
> files within the IDE and did a "clean all" before checking anything into
> CVS?

Yes, that should work.

The IDE tries to make sure that all paths are relative. The one
situation where it can't do that is if the opened file is on another
drive, bot that would not be a problem for you as long as all your files
are in one CVS archive.

While we're on the topic of version control systems -- I've been working
with subversion (a.k.a. SVN) for the last year or so. It is a much
better solution compared to CVS. There is also GIT (buy a git named
Linus something, who also wrote an OS a while ago), which seems promising.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Anders,
Here is my situation. My source and project files reside on a shared linux folder, which I access in Windows via Samba mapping. I run IAR from my Windows machine and open the project using the samba drive. As far as I can tell, this hasn't been a problem as far as checking in to CVS and then checking back out to a different location (with the exception of files open in the workspace, which always have absolute paths). What are you referring to when you said: "The one situation where it can't do that is if the opened file is on another drive"?
Are there certain circumstances when the project configuration would contain absolute file references, or are you referring to the workspace again here?
Yes, I'm familiar with subversion, but they've used CVS here since way before I arrived on the scene. As an aside, what would you say makes SVN or GIT better than CVS?

thanks again,
Aaron

----- Original Message -----
From: "Anders Lindgren"
To: m...
Sent: Wednesday, March 5, 2008 1:36:58 AM (GMT-0700) America/Denver
Subject: Re: [msp430] IAR workspace opening wrong files - bug?

Aaron Greer wrote:

> I, like at least one other list member, use CVS to track my source and
> project files. Would it be safe to say that there would be no absolute
> path references anywhere within the project if I closed all the source
> files within the IDE and did a "clean all" before checking anything into
> CVS?

Yes, that should work.

The IDE tries to make sure that all paths are relative. The one
situation where it can't do that is if the opened file is on another
drive, bot that would not be a problem for you as long as all your files
are in one CVS archive.

While we're on the topic of version control systems -- I've been working
with subversion (a.k.a. SVN) for the last year or so. It is a much
better solution compared to CVS. There is also GIT (buy a git named
Linus something, who also wrote an OS a while ago), which seems promising.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
> Here is my situation. My source and project files reside on a shared
> linux folder, which I access in Windows via Samba mapping. I run IAR
> from my Windows machine and open the project using the samba drive. As
> far as I can tell, this hasn't been a problem as far as checking in to
> CVS and then checking back out to a different location (with the
> exception of files open in the workspace, which always have absolute
> paths). What are you referring to when you said: "The one situation
> where it can't do that is if the opened file is on another drive"?
> Are there certain circumstances when the project configuration would
> contain absolute file references, or are you referring to the workspace
> again here?

Aaron,

What I meant with a different drive compared to where the project and/or
workspace file is located (there is no way, in Windows, to create a
relative path to such file). Clearly, this isn't the case for you, but I
wanted to mention it for the sake of completeness.
> Yes, I'm familiar with subversion, but they've used CVS here since way
> before I arrived on the scene. As an aside, what would you say makes SVN
> or GIT better than CVS?

I have no experience with GIT, but Subversion is a much more robust
system compared to CVS. One thing that I really like is the fact that
you can move and copy things (even directories) around, and still
retaining all the history, using Subversion commands. In CVS you had to
go into the archive itself and copy the underlying RCS file by hand.

Subversion stores much more information locally, so things like "status"
and "diff" are local operations.

There are some things that would require a change of perspective. The
first is that there is only one global version number, not a version
number per file. The second is that there is no classical labels.
Instead, the archive is "supertree", containing subtrees like "trunk"
(where you typically work), "branches", and "tags". Instead of doing a
labeling, you copy the content of, say, "trunk" (using "svn cp") to
"tags/V1_00". The names "trunk", "tags", "branches" are by convention only.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

The 2024 Embedded Online Conference