Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Time.h breaks the build only in VM (Read 6097 times)
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Time.h breaks the build only in VM
Nov 7th, 2014 at 12:39am
Print Post  
This sketch works in the Arduino dev environment, but blow up in Visual Micro.  It was working in VM but magically on the next build it blows.  I have no idea what I might have done.

Thank you for your help.

#include <Time.h>
void setup() {
}
void loop() {
}
« Last Edit: Nov 7th, 2014 at 2:30am by terrence1 »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Re: Time.h breaks the build only in VM
Reply #1 - Nov 8th, 2014 at 1:48pm
Print Post  
Tim, any thoughts on why this gets a compile error in VM but runs fine in the arduino environment?

It was running fine in VM and then suddenly it wasn't and I have no idea what I might have done to mess things up.

Board Properties
name=Intel® Edison
upload.tool=izmirdl
upload.protocol=sam-ba
upload.maximum_size=10000000
upload.use_1200bps_touch=false
upload.wait_for_upload_port=false
upload.native_usb=false
build.mcu=i686
build.f_cpu=-m32
build.core=arduino
build.variant=edison_fab_c
build.toolchain_path=x86_64-pokysdk-linux-eglibc/usr/bin/i586-poky-linux
build.sysroot_path=i586-poky-linux-eglibc
build.toolchain_prefix=i586-poky-linux-
runtime.ide.path=E:\Ard104
build.system.path=E:\Ard104\hardware\arduino\edison\system
runtime.ide.version=153
originalid=izmir_ec
compiler.toolchain.path={runtime.ide.path}/hardware/tools/edison
compiler.prefix=i586-poky-linux
86-poky-linux/
compiler.sysroot={compiler.toolchain.path}/sysroots/core2-32-poky-linux
compiler.c.cmd={compiler.prefix}-gcc
compiler.c.flags=-m32 -march=i586 --sysroot={compiler.sysroot} -c -g -Os -w -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__
compiler.c.elf.flags=-m32 -march=i586 --sysroot={compiler.sysroot} -Os -Wl,--gc-sections
compiler.c.elf.cmd={compiler.prefix}-g++
compiler.S.flags=-c -g -assembler-with-cpp
compiler.cpp.cmd={compiler.prefix}-g++
compiler.cpp.flags=-m32 -march=i586 --sysroot={compiler.sysroot} -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__
compiler.ar.cmd={compiler.prefix}-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd={compiler.prefix}-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O ihex -R .eeprom
compiler.elf2hex.cmd={compiler.prefix}-objcopy
compiler.ldflags=
compiler.size.cmd={compiler.prefix}-size
compiler.strip.cmd={compiler.prefix}-strip
build.extra_flags=
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -march={build.mcu} {build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -march={build.mcu} {build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -march={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lpthread
recipe.objcopy.eep.pattern="{compiler.path}{compiler.strip.cmd}" "{build.path}/{build.project_name}.elf"
recipe.objcopy.hex.pattern=
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=Total\s+([0-9]+).*
upload_win.sh
tools.izmirdl.upload.params.verbose=-vvvvvv
tools.izmirdl.upload.params.quiet=-q
tools.izmirdl.upload.pattern={runtime.ide.path}/hardware/tools/x86/bin/bash --verbose  --noprofile {cmd.path} {runtime.ide.path}/hardware/tools/x86/bin {build.path}/{build.project_name}.elf {serial.port}
tools.izmirdl.program.params.verbose=-v -v -v -v
tools.izmirdl.program.params.quiet=-q -q
tools.izmirdl.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
tools.izmirdl.erase.params.verbose=-v -v -v -v
tools.izmirdl.erase.params.quiet=-q -q
tools.izmirdl.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
tools.izmirdl.bootloader.params.verbose=-v -v -v -v
tools.izmirdl.bootloader.params.quiet=-q -q
tools.izmirdl.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} :i" -Ulock:w:{bootloader.lock_bits}:m
vm.platform.root.path=C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\arduino15x
ide.hint=Arduino 1.5 Ide
ide.location.key=Arduino15x
ide.location.ide.winreg=Arduino 1.5.x Application
ide.location.sketchbook.winreg=Arduino 1.5.x Sketchbook
ide.location.sketchbook.preferences=sketchbook.path
ide.location.preferences=%VM_APPDATA_ROAMING%\arduino15\preferences.txt
ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino\preferences.txt
ide.default.version=150
ide.default.package=arduino
ide.default.platform=avr
ide.multiplatform=true
ide.includes=arduino.h
ide.platformswithoutpackage=false
ide.includes.fallback=wprogram.h
ide.extension=ino
ide.extension.fallback=pde
ide.versionGTEQ=150
ide.exe=arduino.exe
ide.hosts=atmel
ide.url=http://arduino.cc/en/Main/Software
vm.debug=true
software=ARDUINO
ssh.user.name=root
ssh.user.default.password=arduino
ssh.host.wwwfiles.path=/www/sd
build.working_directory={runtime.ide.path}
ide.appid=arduino15x
location.sketchbook=C:\Users\Terrence\Documents\Arduino
vm.core.include=arduino.h
build.board=EDISON_IZMIR_EC
vm.boardsource.path=E:\Ard104\hardware\arduino\edison
runtime.platform.path=E:\Ard104\hardware\arduino\edison
vm.platformname.name=edison
build.arch=EDISON
build.architecture=bin
ingw32\usr\bin\i586-poky-linux\
w32\usr\bin
vm.runtime.compiler.showwarnings=false
serial.port.file=COM8
serial.port=COM8
includes= -I"E:\Ard104\hardware\arduino\edison\cores\arduino"  -I"E:\Ard104\hardware\arduino\edison\variants\edison_fab_c"  -I"E:\Ard104\libraries\Time"  -I"E:\Ard104\hardware\arduino\edison\libraries\WiFi"  -I"E:\Ard104\hardware\arduino\edison\libraries\Ethernet"  -I"E:\Ard104\libraries"  -I"E:\Ard104\hardware\arduino\edison\libraries"  -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers"  -I"C:\Users\Terrence\Documents\Arduino\libraries"  -I"E:\Ard104\hardware\arduino\edison\libraries\WiFi\utility"
mir_ec
build.project_name=EdisonAzure2
build.variant.path=E:\Ard104\hardware\arduino\edison\variants\edison_fab_c
archive_file=core.a
zmir_ec\variant.cpp.o
source_file=E:\Ard104\hardware\arduino\edison\variants\edison_fab_c\variant.cpp

Compiling 'EdisonAzure2' for 'Intel® Edison'
Build folder: _ec
fcntl.h:In file included from
fast_gpio_common.c:from
stat.h:91:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:^
stat.h:92:21: error: field 'st_mtim' has incomplete type
:struct timespec st_mtim;  \* Time of last modification.  *\
:^
stat.h:93:21: error: field 'st_ctim' has incomplete type
:struct timespec st_ctim;  \* Time of last status change.  *\
:^
fcntl.h:In file included from
variant.cpp:from
stat.h:91:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:^
stat.h:92:21: error: field 'st_mtim' has incomplete type
:struct timespec st_mtim;  \* Time of last modification.  *\
:^
stat.h:93:21: error: field 'st_ctim' has incomplete type
:struct timespec st_ctim;  \* Time of last status change.  *\
:^
stat.h:152:21: error: field 'st_atim' has incomplete type
:struct timespec st_atim;  \* Time of last access.  *\
:
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Time.h breaks the build only in VM
Reply #2 - Nov 8th, 2014 at 2:45pm
Print Post  
Hi,

I get the same error in both Ide's.

However the error with Visual Micro changes after 1st build due to cache.

If you click "Build>Clean Solution" then compile you should see the same error as we see in the Intel/Arduino Ide

Code
Select All
DateStrings.cpp:In file included from
DateStrings.cpp:In function 'char* monthStr(uint8_t)'
pgmspace.h:25:49: error: 'strcpy' was not declared in this scope
:#define strcpy_P(dest, src) strcpy((dest), (src))
:^
DateStrings.cpp:in expansion of macro 'strcpy_P'
:strcpy_P(buffer, (PGM_P)pgm_read_word(&(monthNames_P[month]))) 



I tested with Intel 1.0.3
« Last Edit: Nov 8th, 2014 at 2:46pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
terrence1
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2014
Re: Time.h breaks the build only in VM
Reply #3 - Nov 12th, 2014 at 2:52am
Print Post  
Tim, when I search for the first line in the error stack the first result in Google is this.  Do you think there is something to this guy's assertions?

Search: error: field 'st_atim' has incomplete type

1st results:

http://stackoverflow.com/questions/14947691/c-system-file-bits-stat-h-suddenly-b...
« Last Edit: Nov 12th, 2014 at 2:53am by terrence1 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Time.h breaks the build only in VM
Reply #4 - Nov 12th, 2014 at 12:57pm
Print Post  
Not sure.

I would expect the same error on every compile.

Probably unconnected but please apply the sp7 beta from visualmicro.com. 

I also recommend switching off "show build properties" but switching on verbose compile. This will more clearly show where library files are resolved.

Thanks


Thanks
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint