I was doing a bit of optimising and I noticed that if I undefine TEMPERATUREPROBE the code will no longer compile. I have narrowed it down to the section with the header file includes.
// FIRMWARE START#include<Arduino.h>#include<myQueue.h> // By Steven de Salas#include<myEEPROM.h> // needed for EEPROM#include<myeepromanything.h> // needed for EEPROM#ifdef TEMPERATUREPROBE#include<OneWire.h> // needed for DS18B20 temperature probe, see https://github.com/PaulStoffregen/OneWire#include<myDallasTemperature.h> // needed for DS18B20 temperature probe, see https://github.com/milesburton/Arduino-Temperature-Control-Library#endif
If TEMPERATUREPROBE is defined there is no issue.
However when I undefine it I can only get it to compile if I change it to:
// FIRMWARE START#include<Arduino.h>#include<myQueue.h> // By Steven de Salas#include<myEEPROM.h> // needed for EEPROM#include<myeepromanything.h> // needed for EEPROM//#ifdef TEMPERATUREPROBE//#include <OneWire.h> // needed for DS18B20 temperature probe, see https://github.com/PaulStoffregen/OneWire#include<myDallasTemperature.h> // needed for DS18B20 temperature probe, see https://github.com/milesburton/Arduino-Temperature-Control-Library//#endifForsomereasonitseemsthatyouneedto#includemyDallasTemperature.hifyouundefineTEMPERATUREPROBE.ThisistheactualerrorIgetfromthecompiler:
lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
I change line 43 to read
//#define TEMPERATUREPROBE 1
then I recompile. No errors. I am using the recommended Arduino IDE for this project of 1.6.8
Sketch uses 21,362 bytes (69%) of program storage space. Maximum is 30,720 bytes.
Global variables use 748 bytes (36%) of dynamic memory, leaving 1,300 bytes for local variables. Maximum is 2,048 bytes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is \vmware-host\
There is something you have not said about your setup. Is this a standard Windows installation. Your error messages seem to point to am issue wth your installation
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Bizar! I just tried it again and it now it works fine with 1.8.8 of the IDE. The VM it runs on was rebooted and patched in the meantime but anyway now it compiles fine with or without the TEMPERATUREPROBE.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I run the IDE in a virtual machine. The host machine is a Mac but in order to run your test program I run the IDE in a VM. I guess there was some file sharing issue and after everything was rebooted it sorted itself out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jon
Yes I suspected you were on a Mac and using a VM. But is there not a native Arduino IDE for the Mac? All my testing is obviously done on a Windows machine, it is all I have.
Anyhow, glad things are now working.
regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All
I was doing a bit of optimising and I noticed that if I undefine TEMPERATUREPROBE the code will no longer compile. I have narrowed it down to the section with the header file includes.
If TEMPERATUREPROBE is defined there is no issue.
However when I undefine it I can only get it to compile if I change it to:
Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"
\vmware-host\Shared Folders\Documents\Arduino\libraries\myEEPROM/myeepromanything.h: In function 'EEPROM_writeAnything.constprop':
\vmware-host\Shared Folders\Documents\Arduino\libraries\myEEPROM/myeepromanything.h:11:1: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
compilation terminated.
c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Nano.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
~~~
I have searched for a possible orphaned '}' but can't find it yet.
Not critical but would be nice to fix it.
Cheers
Rishi
Focuserv175_DRV8825_HW203.ino
I change line 43 to read
//#define TEMPERATUREPROBE 1
then I recompile. No errors. I am using the recommended Arduino IDE for this project of 1.6.8
Sketch uses 21,362 bytes (69%) of program storage space. Maximum is 30,720 bytes.
Global variables use 748 bytes (36%) of dynamic memory, leaving 1,300 bytes for local variables. Maximum is 2,048 bytes.
I am using a slightly later version (1.8.8) of the compiler so I guess thats it.
Hi Jon
Nope that is not it. It compiles fine with 1.8.8 - see attached. Please post your ino file here and I will take a look at it,
What is \vmware-host\ There is something you have not said about your setup. Is this a standard Windows installation. Your error messages seem to point to am issue wth your installation
Bizar! I just tried it again and it now it works fine with 1.8.8 of the IDE. The VM it runs on was rebooted and patched in the meantime but anyway now it compiles fine with or without the TEMPERATUREPROBE.
I run the IDE in a virtual machine. The host machine is a Mac but in order to run your test program I run the IDE in a VM. I guess there was some file sharing issue and after everything was rebooted it sorted itself out.
Hi Jon
Yes I suspected you were on a Mac and using a VM. But is there not a native Arduino IDE for the Mac? All my testing is obviously done on a Windows machine, it is all I have.
Anyhow, glad things are now working.
regards
Robert