import sys from time import sleep from iapIntf import CIapDev from charDev import CCharDev, CUdpCharDev flashMap_F4 = [0x08000000, 0x0800c000, 0x08010000] udpCharDev = CUdpCharDev(('192.168.192.4',5003), ('192.168.192.4',5000)) # udpCharDev = CUdpCharDev(('127.0.0.1', 9999),('127.0.0.1', 9999)) udpIapDev = CIapDev(udpCharDev, flashMap_F4) udpIapDev.jumpToBootloader() ver = udpIapDev.getBootLoaderVersion() print('version: 0x%02X'%ver) udpIapDev.readBin('readback.bin') udpIapDev.loadBin('Project_0x08010000_5000.bin') udpIapDev.jumpToApp() udpIapDev.loadBin('bootloader.bin', flashMap_F4[0]) udpIapDev.jumpToAddress(flashMap_F4[0]) udpIapDev.loadBin('readback.bin') udpIapDev.writeBootParam(CIapDev.byteBootParam_APP) udpIapDev.jumpToApp() sleep(1) sys.exit(0)
import sys from time import sleep from iapIntf import CIapDev from charDev import CCharDev, CCanCharDev flashMap_F1 = [0x08000000, 0x08007800, 0x08008000] # canCharDev = CCanCharDev((0x5006, 0x5005), (0x5006, 0x5005)) canCharDev = CCanCharDev((0x5004, 0x5005), (0x5004, 0x5005)) canCharDev.ioctl("readTimeout", 1) canIapDev = CIapDev(canCharDev, flashMap_F1) canIapDev.resetToBootloader() ver = canIapDev.getBootLoaderVersion() print('version: 0x%02X' % ver) canIapDev.readBin('readback_sub.bin') canIapDev.loadBin('subsysBootloaderFlasher.bin') canIapDev.writeBootParam(CIapDev.byteBootParam_APP) canIapDev.jumpToApp() canIapDev.loadBin('subsysBL.bin', 0x08000000) canIapDev.writeBootParam(CIapDev.byteBootParam_BL) canIapDev.jumpToAddress(0x08000000) canIapDev.loadBin('readback_sub.bin') canIapDev.writeBootParam(CIapDev.byteBootParam_APP) canIapDev.jumpToApp() sys.exit(0)
import sys import os os.chdir(sys.path[0]) from time import sleep from iapIntf import CIapDev from charDev import CCharDev, CUdpCharDev flashMap_F4 = [0x08000000, 0x0800c000, 0x08010000] udpCharDev = CUdpCharDev(('192.168.192.4', 5003), ('192.168.192.4', 5003)) # udpCharDev = CUdpCharDev(('127.0.0.1', 9999),('127.0.0.1', 9999)) udpIapDev = CIapDev(udpCharDev, flashMap_F4) udpIapDev.jumpToBootloader() udpIapDev.getBootLoaderVersion() udpIapDev.loadBin('../Output/Project.bin') udpIapDev.writeBootParam(CIapDev.byteBootParam_APP) udpIapDev.jumpToApp() os.system('pause') sys.exit()
import sys import os os.chdir(sys.path[0]) from time import sleep from iapIntf import CIapDev from charDev import CCharDev, CCanCharDev flashMap_F1 = [0x08000000, 0x08007800, 0x08008000] # canCharDev = CCanCharDev((0x5006, 0x5005), (0x5006, 0x5005)) canCharDev = CCanCharDev((0x5004, 0x5005), (0x5004, 0x5005)) canCharDev.ioctl("readTimeout", 1) canIapDev = CIapDev(canCharDev, flashMap_F1) canIapDev.resetToBootloader() #canIapDev.resetBoard() ver = canIapDev.getBootLoaderVersion() canIapDev.loadBin('.\\out\\test1.bin') canIapDev.writeBootParam(CIapDev.byteBootParam_APP) canIapDev.jumpToApp() # canIapDev.resetBoard() canCharDev.close() os.system('pause') sys.exit()
import sys import os os.chdir(sys.path[0]) from time import sleep from iapIntf import CIapDev from charDev import CCharDev, CUdpCharDev flashMap_F4 = [0x08000000, 0x0800c000, 0x08040000] udpCharDev = CUdpCharDev(('192.168.192.4', 5003), ('192.168.192.4', 5003)) udpIapDev = CIapDev(udpCharDev, flashMap_F4) # udpIapDev.jumpToBootloader() udpIapDev.getBootLoaderVersion() udpIapDev.jumpToAddress(0x08040000) # udpIapDev.jumpToBootloader() udpIapDev.loadBin('../../SubSystem_Prj/prj/out/test1.bin', 0x08008000) udpIapDev.writeBootParam(CIapDev.byteBootParam_BL, 0x08007800) udpIapDev.jumpToAddress(0x08008000) os.system('pause') sys.exit()