Studio 4.14 not recognizing file changes

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

I set up a new computer with Win2k and a fresh copy of AVR Studio 4.14 and WinAVR 20080430 this weekend and had some interesting issues. Several times I had made a change to the C code, but the compiler wouldn't recognize that I had made a change during the build and downloaded the same code from the last build. After I specifically clicked on the "Save All" icon, then it rebuilt the new code and downloaded the new code.

It seemed to happen when I was only changing one line of code - commenting it out, or changing one value.

Scott

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

First, review the build log (bottom pane, left-most tab) to be sure that your code is compiled.

There is a known bug in AVR Studio that locks the .elf file if you have been in the debugger. Under some circumstances, the makefile cannot delete the .elf file, so the system uses the old .elf file to build the final .hex file. If you've been in the debugger and you notice that even a "Rebuild All" does not compile anything, close AVR Studio and restart it.

Second, make sure that when you download you are pointing at the hex file you actually created. The AVR programming window specifies the file to download which does not (necessarily) have a connection to the project you are building.

Finally, I would recommend *not* using WinAVR 20080430 if you have ISRs that call functions. Instead, go back to 20071221.

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

I wasn't using the debugger, but I'll keep an eye out for that one.

The hex file was in the right place and it was being pointed to, checked that.

My ISRs on this project just modify timer values and seem to be working correctly.

The compiler was acting up while I was playing around with some GPIO DDRs and initialization values. I didn't notice what was happening until I added some code to display my changes on a LCD, and it didn't register my changes when it ran. Then I clicked on save all before I clicked the build button, and it built correctly and showed me the correct values.

I'll play some more this evening and see if I can re-create the issue in a repeatable manner (I don't have the files here at work).

Thanks for the tips,

Scott

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

If is with .h files this is normal.
You must save .h files with save button

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

Yes, In AVR studio I always explicitly save all my files before trying to do a build.

The last time I asked about it here, I got some clever comment indicating it was my fault for being stupid.

So maybe it will get fixed one day, or maybe it has already been fixed, but I'm not holding my breath.

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

As far as I can see, Studio4 will save your edited file if it is in the source code list. But if it is a dependent file like a .h file, the re-compile just uses the old file on disk.

CodeVision will always save every dependent file in a build. So if you alter a wierd .h file, the re-compilation will use this edited version.

Play safe, and always save before a re-build.

David.