Solved: AS7 Not detecting changes in (symbolic linked) files?

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

Hey,

 

This may seem a bit like a weird thread but I'm observing some weird behaviour the build system. It doesn't seem to detect changes I make to a file, for example I have this code:

void twi_close()
{
	int i = 0
	MASTER_STOP();
	_state |= CLOSED;
}

 

This shouldn't compile right? But it doesn't seem to detect this change, here is the build log:

------ Build started: Project: SuperTiny (AS), Configuration: Debug AVR ------
Build started.
Project "SuperTiny (AS).cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\SuperTiny (AS).cproj" (target "Build" depends on it):
	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 all
		make: Nothing to be done for `all'.
	Done executing task "RunCompilerTask".
	Task "RunOutputFileVerifyTask"
				Program Memory Usage 	:	1530 bytes   18,7 % Full
				Data Memory Usage 		:	2 bytes   0,4 % Full
	Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "SuperTiny (AS).cproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Avr.common.targets" from project "C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\SuperTiny (AS).cproj" (entry point):
Done building target "Build" in project "SuperTiny (AS).cproj".
Done building project "SuperTiny (AS).cproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

 

I thinks this may be caused to the fact these are symbolic linked files, however I don't see why that would that be a problem for Atmel Studio? Does anyone have any insights to this?

 

To fix this issue I have a pre-build event: make clean. This does solve it however it recompiles everything which kinda defeats the purpose of a decent build system.. Does anyone have a better idea for this?

------ Build started: Project: SuperTiny (AS), Configuration: Debug AVR ------
Build started.
Project "SuperTiny (AS).cproj" (default targets):
Target "PreBuildEvent" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Avr.common.targets" from project "C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\SuperTiny (AS).cproj" (target "Build" depends on it):
	Task "Exec"
		make clean
		rm -rf  bus/supertiny/communication.o bus/supertiny/main.o bus/supertiny/sensors.o util/ds1307_usi/ds1307.o util/eeprom_usi/eeprom.o util/twi/twi.o util/twi/usi/twi_usi.o
		rm -rf  bus/supertiny/communication.d bus/supertiny/main.d bus/supertiny/sensors.d util/ds1307_usi/ds1307.d util/eeprom_usi/eeprom.d util/twi/twi.d util/twi/usi/twi_usi.d
		rm -rf "SuperTiny (AS).elf" "SuperTiny (AS).a" "SuperTiny (AS).hex" "SuperTiny (AS).lss" "SuperTiny (AS).eep" "SuperTiny (AS).map" "SuperTiny (AS).srec" "SuperTiny (AS).usersignatures"
	Done executing task "Exec".
Done building target "PreBuildEvent" in project "SuperTiny (AS).cproj".
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\SuperTiny (AS).cproj" (target "Build" depends on it):
	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 all
		Building file: ../bus/supertiny/communication.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "bus/supertiny/communication.d" -MT"bus/supertiny/communication.d" -MT"bus/supertiny/communication.o"   -o "bus/supertiny/communication.o" "../bus/supertiny/communication.c"
		Finished building: ../bus/supertiny/communication.c
		Building file: ../bus/supertiny/main.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "bus/supertiny/main.d" -MT"bus/supertiny/main.d" -MT"bus/supertiny/main.o"   -o "bus/supertiny/main.o" "../bus/supertiny/main.c"
		Finished building: ../bus/supertiny/main.c
		Building file: ../bus/supertiny/sensors.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "bus/supertiny/sensors.d" -MT"bus/supertiny/sensors.d" -MT"bus/supertiny/sensors.o"   -o "bus/supertiny/sensors.o" "../bus/supertiny/sensors.c"
		Finished building: ../bus/supertiny/sensors.c
		Building file: ../util/ds1307_usi/ds1307.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "util/ds1307_usi/ds1307.d" -MT"util/ds1307_usi/ds1307.d" -MT"util/ds1307_usi/ds1307.o"   -o "util/ds1307_usi/ds1307.o" "../util/ds1307_usi/ds1307.c"
		Finished building: ../util/ds1307_usi/ds1307.c
		Building file: ../util/eeprom_usi/eeprom.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "util/eeprom_usi/eeprom.d" -MT"util/eeprom_usi/eeprom.d" -MT"util/eeprom_usi/eeprom.o"   -o "util/eeprom_usi/eeprom.o" "../util/eeprom_usi/eeprom.c"
		Finished building: ../util/eeprom_usi/eeprom.c
		Building file: ../util/twi/twi.c
		Invoking: AVR/GNU C Compiler : 4.9.2
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=8000000  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\include"  -O2 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny85 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.0.71\gcc\dev\attiny85" -c -std=gnu99 -MD -MP -MF "util/twi/twi.d" -MT"util/twi/twi.d" -MT"util/twi/twi.o"   -o "util/twi/twi.o" "../util/twi/twi.c"
		../util/twi/twi.c: In function 'twi_close':
C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\util\twi\twi.c(136,1): error: expected ',' or ';' before '}' token
		 }
		 ^
C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\util\twi\twi.c(141,1): error: expected declaration or statement at end of input
		 }
		 ^
C:\Users\joell\Dropbox\Programming\avr\SuperTiny (AS)\SuperTiny (AS)\util\twi\twi.c(135,6): warning: unused variable 'i' [-Wunused-variable]
		  int i = 0
		      ^
		make: *** [util/twi/twi.o] Error 1
	Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "SuperTiny (AS).cproj" -- FAILED.
Done building project "SuperTiny (AS).cproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Build log with the make clean first.

 

Regards

 

edit: Added Solved to title.

Last Edited: Sun. Jan 31, 2016 - 12:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Symbolically linked how? Links? Junctions? Just dropbox? 

 

We are relying on make to decide if a file needs to be rebuilt, so I haven't heard of it missing out... 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Sat. Jan 30, 2016 - 12:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just checked with Atmel Studio 7 and linked files (as in your build output), and it works fine even if editing is done from outside Atmel Studio 7.0. But not sure if this has something to do with DropBox !

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

No I have everything on Dropbox so I have the same files on my laptop as on computer (and backup.) With symbolic links I mean an actual symbolic link, (mklink [link] [target]). I just checked how it handles hard links and that seems to work fine! So that would be a better solution than do a clean before building. But still it is quite weird that make doesn't see the changes on a symbolic linked file.

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

My guess would be that the timestamps are not correctly 'propagated' through the link (doesn't make use timestamps?)

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

Aha that would explain it! Since symbolic link doesn't store any information but a hard link does store the timestamp and size etc. Thank you :)