Forums

IAR workspace opening wrong files - bug?

Started by Aaron Greer February 29, 2008
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)

-Aaron

Beginning Microcontrollers with the MSP430

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.

Make a bad assumption, get a bad result.

Kip
On Fri, 2008-02-29 at 10:45 -0700, 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)
>
> -Aaron
>
>
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.

Make a bad assumption, get a bad result.

Kip
On Fri, 2008-02-29 at 10:45 -0700, 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)
>
> -Aaron
>
>
Not an IAR folk but I have a suggestion.

Try cleaning the project before doing anything. This may update things
so the correct files are opened.

Dan

________________________________

From: m... [mailto:m...] On Behalf
Of Aaron Greer
Sent: Friday, February 29, 2008 1:47 PM
To: m...
Subject: Re: [msp430] IAR workspace opening wrong files - bug?

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.

Make a bad assumption, get a bad result.

Kip
On Fri, 2008-02-29 at 10:45 -0700, 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)
>
> -Aaron
>

>
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.
>
> Make a bad assumption, get a bad result.
>
> Kip
> On Fri, 2008-02-29 at 10:45 -0700, 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)
> >
> > -Aaron
> >
> >
> >
> >
> >
> >
> 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.
> >
> > Make a bad assumption, get a bad result.
> >
> > Kip
> > On Fri, 2008-02-29 at 10:45 -0700, 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)
> > >
> > > -Aaron
> > >
> > >
> > >
> > >
> > >
> > >
Some (many?) of us are used to compilers/environments such as MS
Visual Studio/Visual C++ where you CAN copy your project AND
workspace and it will get the paths right.

Yes, with the IAR compiler/environment, you have to start a new
Workspace in a new subdirectory and then copy the source files and add
them to your workspace/project.

--- In m..., "tintronic" wrote:
>
> 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
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.
> >
> > Make a bad assumption, get a bad result.
> >
> > Kip
> > On Fri, 2008-02-29 at 10:45 -0700, 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)
> > >
> > > -Aaron
> > >
> > >
> > >
> > >
> > >
> > >
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.
> > >
> > > Make a bad assumption, get a bad result.
> > >
> > > Kip
> > > On Fri, 2008-02-29 at 10:45 -0700, 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)
> > > >
> > > > -Aaron
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
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.
>
> Make a bad assumption, get a bad result.
>
> Kip
> On Fri, 2008-02-29 at 10:45 -0700, 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)
> >
> > -Aaron
> >
> >
> >
> >
> >
> >