designing custom teensy loader

thanks paul. when you upload via arduino ide it pushes the hex through the loader directly to connected device, im looking for this implementation in command line, is this soft reboot?
 
so i have a very raw working gui written in swift that uploads hex correctly but it seems ive hit that area some other users have experienced with reboot, sorry if this terrain has been covered before but could you confirm paul whether this is still relevant to automatic boot ? thanks for your time
Code:
static int teensy_reboot(ty_board_interface *iface)
{
    static const unsigned int serial_magic = 134;
    static const unsigned char seremu_magic[] = {0, 0xA9, 0x45, 0xC2, 0x6B};
 
Confirm, the USB types with Serial respond to setting baud rate to 134, and the non-Serial types respond to a HID feature request.

Please understand this response is not from the bootloader. It depends on code you previously wrote still running properly and listening for USB communication. If the previously loaded program shuts off USB, or goes into deep sleep modes without USB wakeup, or lingers inside an interrupt too long, or "crashes" in a variety of ways where it no longer responds to USB, this won't work. Every Teensy is made with a Program pushbutton to give a way to recover from loading such programs.

If you create a special application which uses this sort of USB communication, please understand it depends on the code you previously loaded still running properly (or at least well enough to respond to USB). If you create custom hardware without access to the Program button and you load a bad program, you can be left without the ability to recover from such bad code.
 
Confirm, the USB types with Serial respond to setting baud rate to 134, and the non-Serial types respond to a HID feature request.

Please understand this response is not from the bootloader. It depends on code you previously wrote still running properly and listening for USB communication. If the previously loaded program shuts off USB, or goes into deep sleep modes without USB wakeup, or lingers inside an interrupt too long, or "crashes" in a variety of ways where it no longer responds to USB, this won't work. Every Teensy is made with a Program pushbutton to give a way to recover from loading such programs.

If you create a special application which uses this sort of USB communication, please understand it depends on the code you previously loaded still running properly (or at least well enough to respond to USB). If you create custom hardware without access to the Program button and you load a bad program, you can be left without the ability to recover from such bad code.
understood, thanks paul.
 
Back
Top