"Clean Project" does not clean, it builds.

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

Hello,

 

I've experienced a very strange behavior in two separate projects under Atmel studio 7.0.1188 (windows 7). 

 

When I tell the project to clean (or rebuild, which includes a clean step), Atmel studio runs "make" instead of "make clean". Which of course does not clean anything; it builds the default target. Here is example output for a project called "RebuildApp":

------ Clean started: Project: RebuildApp, Configuration: Debug ARM ------
Build started.
Project "RebuildApp.cppproj" (Clean target(s)):
Target "Clean" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\jtbr\Documents\Atmel Studio\7.0\RebuildApp\RebuildApp\RebuildApp.cppproj" (entry point):
	Task "RunCompilerTask"
		Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
		C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe 
		make: Nothing to be done for 'src/ASF/thirdparty/freertos/freertos-8.2.3/Source/portable/MemMang/heap_4.d'.
	Done executing task "RunCompilerTask".
Done building target "Clean" in project "RebuildApp.cppproj".
Done building project "RebuildApp.cppproj".

Build succeeded.
========== Clean: 1 succeeded, 0 failed, 0 skipped ==========

Note that it is running make with no parameters. In a correctly functioning project, it would run "C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe clean". The heap_4.d is simply the first default target (which has already been built, hence "nothing to be done.") At first this behavior was very confusing because I was making code changes that seemed not to be reflected, so I tried rebuilding from scratch and still nothing happened... Which turned out to be because it WASN'T building from scratch.

 

As yet, I have been unable to produce this behavior deliberately from a freshly generated project. Freshly generated projects clean correctly. Here are the only things I can think of that these two projects share that might be unusual. 1) They are C++ projects created using New -> Project -> GCC C++ Executable project. 2) ASF components were added to the project, including FreeRTOS 8.2.3 (adding ASF stuff meant I had to remove device pack stuff originally added automatically in order to build correctly.) 3) I replaced the heap implementation from the ASF default and added other custom libraries (FreeRTOS-Plus libraries) outside ASF (very tediously recreating each subdirectory within the AS Solution explorer, copying in the files that belong in that directory, and Add -> Existing Item... to include all relevant code. (As an aside, I really wish we could just add an existing hierarchy of files in one step).

 

Has anybody else seen this behavior? Does anyone know how to correct it or prevent it from occurring?  (I did not find any bug reports or forum posts about this)

 

Many Thanks.

 

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

I have discovered that the exact same project/solution may or may not exhibit this behavior.

 

If I open atmel and load a given solution, then clean or rebuild the project it will work properly.

 

If I open atmel and load the same solution, then compile an individual file, then clean or rebuild the project, it will fail (ie, it will run "make" rather than "make clean"). As an aside, compile also does not work correctly, in that it does not compile the selected file, but rather builds the whole project.

Finally, this may be related to an issue with adding source/header files. If you add existing files (in place) then select both a header and a c file in the same directory, it will incorrectly add the header with the <Compile Include=...> rather than the <None Include=...> tag in the .cppproj file.

 

And I also get this warning when opening the solution: "[WARNING] Error updating project settings:Object reference not set to an instance of an object."

 

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

Just a note that this still occurs sporadically in build 7.0.1417. I'm still unclear as to what leads it to happen, but usually closing and re-opening Atmel Studio is enough to make it "clean" properly again.

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

I see the same issue 

"[WARNING] Error updating project settings:Object reference not set to an instance of an object"

 

This is in version 7.0.1645.

When this error is present I can't change any project settings and the builds fail :/

 

Anyone has any ideas what is causing this or how to fix it?

Last Edited: Sat. Oct 28, 2017 - 05:24 PM