added jump_to_systembootloader

This commit is contained in:
2024-05-22 21:37:25 +02:00
parent 2b12ea9602
commit fd3757b6a1
4 changed files with 58 additions and 0 deletions

13
tools/bootloader.py Normal file
View File

@@ -0,0 +1,13 @@
from usb_pb2 import PackageType, JumpToBootloader
from vcp_driver import *
if __name__ == "__main__":
ser = setup_connection()
# Create a message
request = JumpToBootloader()
request.magic = 0xdeadbeef
# Serialize the request to a bytearray
request_data = request.SerializeToString()
# Send the request
send_package(PackageType.JUMP_TO_BOOTLOADER, request_data, ser)