A few members over on the PJRC forum have setup some windows command files and some sublime text build setup scripts to allow us to do Arduino builds for most/all of the Teensy boards using the Arduino build system. Which is great. I much prefer working within sublime text instead of the Arduino IDE, and the default stuff works pretty well for showing the errors within the source file.
Which is great. The one main issue I run into with this, is that Arduino will copy your sketch and any other source files within your sketch folder to a temporary directory, which is where it compiles from.
The issue in these cases, is the error messages reported show up looking something like:
"C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_LSS_Phoenix.ino\\sketch\\LSS_Phoenix.ino.cpp.o"
In file included from C:\arduino-1.8.12\hardware\teensy\avr\cores\teensy4/WProgram.h:41:0,
from C:\Users\kurte\AppData\Local\Temp\arduino_build_LSS_Phoenix.ino\pch\Arduino.h:6:
C:\Users\kurte\AppData\Local\Temp\arduino_build_LSS_Phoenix.ino\sketch\_Phoenix_Driver_lss.h: In function 'void FindServoOffsets()':
C:\Users\kurte\AppData\Local\Temp\arduino_build_LSS_Phoenix.ino\sketch\_Phoenix_Driver_lss.h:658:61: error: 'cCoxaPin' was not declared in this scope
abSSCServoNum[sSN*NUMSERVOSPERLEG + 0] = pgm_read_byte(&cCoxaPin[sSN]);
^
And when I hit F4 it brings up that line in the temp file, where many times I will fix the error there, do a compile again and get the same error… As again the real source file is copied back to the temporary folder overwriting my changes.
So was wondering if there is a way to setup the file_regex to allow the normal finding of files, except when it finds files tat are coming out of the temporary directory such as this and redirect back to the real source file?
Thanks