Two issues with AS6.1

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

1. Although the Atmel website says that 6.0 and 6.1 play nicely and can coexist on the same machine, after installing 6.1 I find that I can no longer compile with 6.0 When I try I get the following error message

------ Build started: Project: AVRBase, Configuration: Debug AVR ------
Build started.
Project "AVRBase.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.0\Vs\Compiler.targets" from project "C:\Users\ejennings\Documents\AVRMicro\AVRBase\038-0384-01_VA\AVRBase\AVRBase.cproj" (target "Build" depends on it):
	Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.0\Vs\Compiler.Task.dll".
	Task "RunCompilerTask"
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

2. To perform a software reset I used the following

asm volatile(  "jmp 0 \n"  );  // jump to reset

This worked in Studio 4 and AS 6.0 but fails in 6.1 I had to change to using the watchdog and an infinite loop to perform a reset. This occurred on 2 different targets an ATTiny24 and an ATMega168p

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

One other thing is that when I try to debug I find that the watch window lists several of my variable as "Optimized away".

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

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

THAT is an example of why users need to be able to flag stuff on a per-user basis. It gets lost in the noise of all the other, and mostly slightly less great, tutorials. Then trying to remember what the name was or some search key or something.... to help get back there to see if it is the one that explains this nasty problem I am trying to get my head around.

Oh, well, try and try again, I guess.

Jim

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

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

Was there a change in the behavior of GCC's optimizer between Atmel Studio 6.0 and 6.1? This did not occur with the same project in 6.0 last week.

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

6.0 and 6.1 ship with different versions of gcc (based on 4.6.x and 4.7.x respectively), so yes, you will see different optimization behavior.

Regards

Senthil

 

blog | website

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

Quote:

THAT is an example of why users need to be able to flag stuff on a per-user basis.

While waiting for that to never be aded to the forum functionality there are alternatives: Saving a shortcut, adding to favourites in your browser etc...

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

Quote:

1. Although the Atmel website says that 6.0 and 6.1 play nicely and can coexist on the same machine, after installing 6.1 I find that I can no longer compile with 6.0 When I try I get the following error message

You might have opened the project created in 6.0 in 6.1 (the project file gets upgraded to 6.1)
When you try to go back to 6.0 it may not work.

You may have to edit the project file,

Following is an example for C project ,

6.1
com.Atmel.AVRGCC8.C

Change it to
6.0
com.Atmel.AVRGCC8

1. Downgrade the project version
2. Remove the language from ToolchainName

*6.1 beta creates backup for the project file

:D

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

That is an example of why I try to avoid updating my software tools as long as possible. Until a few weeks ago I was using AVR Studio 4 and MS Visual Studio 6 (circa 1999) Dragged kicking and screaming into the 21st century and sure enough I get bitten on the @@s.

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

Quote:
You might have opened the project created in 6.0 in 6.1 (the project file gets upgraded to 6.1)
When you try to go back to 6.0 it may not work.
This occurred to me so I tried opening an archived copy of a project that had never been opened in 6.1 and got the same result. I've got everything working, just wanted to whine.

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

Personally I preferred the way studio 4 handled AVR-GCC as a separate external program. That way I could control which version I was using. A while back I ran into an issue where after updating AVR-GCC I found that a legacy project on a MEGA8 that used almost all of the code space would no longer fit into the Mega8. I had to spend a lot of time downloading and testing previous versions in order to find one that would work and keep that on my computer.

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

mailtosarathy, I edited the project file as you suggested and was able to compile with 6.0. Thanks.
Still unsatisfied about the way my variables a handled though. These are globals that are accessed and modified in several places. The debugger should be able to find them and tell me what their value is. For now I'll be sticking with 6.0.

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

Quote:

Personally I preferred the way studio 4 handled AVR-GCC as a separate external program. That way I could control which version I was using

But "Toolchain flavours" actually makes this easier in 6?

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

I wasn't aware of that. How do you get to it?

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

eejay wrote:
I wasn't aware of that. How do you get to it?

http://www.atmel.no/webdoc/atmel...

http://www.atmel.no/webdoc/atmel...

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

I like that. Thanks

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

eejay wrote:
That is an example of why I try to avoid updating my software tools as long as possible. Until a few weeks ago I was using AVR Studio 4 and MS Visual Studio 6 (circa 1999)
I have updated Visual Studio several times because they give away the Express version. I still use Source Safe 6 from 1998 because it works perfectly and Microsoft never offered a free update.

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

Quote:
I still use Source Safe 6 from 1998 because it works perfectly

Ever tried to do a merge of a branch to the trunk in VSS?

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:

Ever tried to do a merge of a branch to the trunk in VSS?
No.

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

Whenever I upgrade something like Atmel Studio or Visual Studio, I always try it out first on a clone of my regular Windows installation. I do the same thing for service packs, and some of the Windows Updates, especially hardware drivers.

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

steve17 wrote:
JohanEkdahl wrote:

Ever tried to do a merge of a branch to the trunk in VSS?
No.

Works perfectly? Not. :twisted:

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

mailtosarathy wrote:
You might have opened the project created in 6.0 in 6.1 (the project file gets upgraded to 6.1)
When you try to go back to 6.0 it may not work.

You may have to edit the project file,

Following is an example for C project ,

6.1
com.Atmel.AVRGCC8.C

Change it to
6.0
com.Atmel.AVRGCC8

1. Downgrade the project version
2. Remove the language from ToolchainName

Thanks a lot for your helpful post. :wink:

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

eejay wrote:

2. To perform a software reset I used the following

asm volatile(  "jmp 0 \n"  );  // jump to reset

This worked in Studio 4 and AS 6.0 but fails in 6.1 I had to change to using the watchdog and an infinite loop to perform a reset. This occurred on 2 different targets an ATTiny24 and an ATMega168p

Can anyone enlighten me on why this stopped working?

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

Quote:

This worked in Studio 4 and AS 6.0 but fails in 6.1

How does it fail?

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

I would expect it to jump to location 0 which should be the reset vector. Thus performing a software reset. My code doesn't appear to actually reset. When I run it in the debugger it appears to flail around in the general vicinity of the command. I have not run the debugger in disassembly view to see what it is actually doing. Because of current deadlines I haven't tried to investigate more because by going back to 6.0 it works which means I can work.

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

I thought causing a reset, like the watchdog, was the best way because it reset everything, disabled interrupts etc.

I don't think jumping to location zero does a reset. On the other hand, I'm not an expert.