But if it does work and if possibility, then next would be to see about moving the variant completely out of the Teensy install. Could be own install or in <sketches>/hardware... But not sure how fully yet.
Unclear if any of this will ever be pulled in, but still playing. I was having problems getting a version to build outside of the main Teensy folder,
So I opened up a thread on Arduino forum:
@ptillisch @Merlin513 Fixed this last issue (for IDE2): updated the platform.txt line to: ## Precompile Arduino.h header recipe.hooks.sketch.prebuild.1.pattern="{teensytools.path}precompile_helper" "{build.core.path}" "{build.path}" "{compiler.path}{build.toolchain}{build.command.g++}" -x...
forum.arduino.cc
With help from
@PerT and
@mjs513 both for suggestions and sounding board, I think I have a version that compiles:
Mostly the issues were self-inflicted. In that the boards.txt file when I simply copied my boards.local.txt from
the Teensy install, it does not work... You need to add in the stuff from the top of the boards.txt which defines the menues...
The other thing that hit me, was in platform.txt - the precompiler helper app command line. I had modified it earlier to
include the variant directory on the include search. But the issue I ran into here is I believe that
@PaulStoffregen setup this
line awhile ago to not use the {build.cores.path} setting and instead built your own... I believe such that when run from Arduino 1.x it would not go to the Teensy install within the Arduino15 stuff...
So in my version here I undid that and now it is building...
Lots of little details left to update/fix...
like: Has anyone yet generated Arduino pin numbers for all of the pins on the devboard 4? If so would be fun to include that here.
Like the hacks I did to eeprom.c and bootdata.c, could either wait to see if it will be pulled in, or next up try adding files to compile in the variant and add if it overrides the one in core...
Need to update how pin table is generated. And/or allow for the table only overwritten and/or modified version of file... Ditto for where the functions like: digitalWriteFast is defined. Which could also take the approach of simply using the passed in index into the pin table array, and for constant value passed in appears to generate the same code...
But for now time to rest hands...