[Teensy] How to use a custom platform

I’m trying to modify some code of the USB source code of the original Teensy platform, but I want to do by project, and at the same time, being able to store all at git (and be able to compile in Windows and Linux).
How I can define a custom platform or board per project?

A custom platform would already have the capability of storing custom boards in the boards/ folder.

As the docs show, you can reference an arbitrary custom platform link in the platformio.ini’s platform value, which can also be a Git link.