A lot of thanks pert!
I'm trying to make working teensy core and funtions in an Arduino Leonardo clone (a CJMCU Beetle board), all worked fine with a custom boards.txt and platform.txt but I only can reprogram it if I reset it by hand and then It enters in bootloader mode.
Now is time for hard work! make the teensy core reboot in bootloader mode when serial port is opened at 1200 baud and then closed.