add fw update script
This commit is contained in:
153
EVB_FW_Write/V4M/Flash_Bootloader_Dummyrtos_V4M.ttl
Normal file
153
EVB_FW_Write/V4M/Flash_Bootloader_Dummyrtos_V4M.ttl
Normal file
@@ -0,0 +1,153 @@
|
||||
;---------------------------------------------------
|
||||
; Setting load image parameter
|
||||
;---------------------------------------------------
|
||||
ARRAY_NUM = 1
|
||||
strdim IMGNM ARRAY_NUM
|
||||
IMGNM[0] = 'App_MCU_V4M_Sample.srec'
|
||||
|
||||
strdim SAVEADR ARRAY_NUM
|
||||
SAVEADR[0] = '0000'
|
||||
|
||||
strdim IMGADR ARRAY_NUM
|
||||
IMGADR[0] = 'E2100000'
|
||||
|
||||
strdim WRITESEL ARRAY_NUM
|
||||
WRITESEL[0] = 'eMMC'
|
||||
|
||||
;---------------------------------------------------
|
||||
; Setting FlashWriter parameter
|
||||
;---------------------------------------------------
|
||||
FLASHWRITER_FILE = 'ICUMX_Flash_writer_SCIF_DUMMY_CERT_EB203000_V4M.mot'
|
||||
FLASHWRITER_SPEED = 921600
|
||||
|
||||
;---------------------------------------------------
|
||||
; Select load all images
|
||||
;---------------------------------------------------
|
||||
LOAD_FILES = 'all'
|
||||
|
||||
;---------------------------------------------------
|
||||
; DO NOT EDIT THE FOLLOWING LINES
|
||||
;---------------------------------------------------
|
||||
; Main program
|
||||
;---------------------------------------------------
|
||||
getdir DIR
|
||||
|
||||
call Load_FlashWriter
|
||||
call Load_all_image
|
||||
|
||||
end
|
||||
|
||||
;---------------------------------------------------
|
||||
; load FlashWriter
|
||||
;---------------------------------------------------
|
||||
:Load_FlashWriter
|
||||
filesearch FLASHWRITER_FILE
|
||||
if result=0 then
|
||||
sprintf 'File "%s" not found' FLASHWRITER_FILE
|
||||
messagebox inputstr 'error'
|
||||
break
|
||||
endif
|
||||
|
||||
setbaud 921600
|
||||
sprintf2 FILE_NAME '%s\%s' DIR FLASHWRITER_FILE
|
||||
sendfile FILE_NAME 1
|
||||
wait '>'
|
||||
|
||||
return
|
||||
|
||||
;---------------------------------------------------
|
||||
; load all images
|
||||
;---------------------------------------------------
|
||||
:Load_All_image
|
||||
|
||||
; file check
|
||||
for i 0 ARRAY_NUM-1
|
||||
filesearch IMGNM[i]
|
||||
if result=0 then
|
||||
sprintf 'File "%s" not found' IMGNM[i]
|
||||
messagebox inputstr 'error'
|
||||
break
|
||||
endif
|
||||
next
|
||||
|
||||
if result=1 then
|
||||
for i 0 ARRAY_NUM-1
|
||||
index = i
|
||||
strcompare WRITESEL[i] 'Flash'
|
||||
if result=0 then
|
||||
call Load_Image
|
||||
endif
|
||||
strcompare WRITESEL[i] 'eMMC'
|
||||
if result=0 then
|
||||
call Load_Image_eMMC
|
||||
endif
|
||||
next
|
||||
else
|
||||
messagebox "Cancel write all images" "error"
|
||||
endif
|
||||
|
||||
;messagebox "Write Complete" ""
|
||||
return
|
||||
|
||||
;---------------------------------------------------
|
||||
; Load Image To Flash
|
||||
;---------------------------------------------------
|
||||
:Load_Image
|
||||
mpause 10
|
||||
sendln 'xls2'
|
||||
wait ' Select (1-3)>'
|
||||
mpause 10
|
||||
sendln '1'
|
||||
wait '(Push Y key)'
|
||||
mpause 10
|
||||
send 'y'
|
||||
wait '(Push Y key)'
|
||||
mpause 10
|
||||
send 'y'
|
||||
wait ' Please Input : H'
|
||||
mpause 1
|
||||
sendln IMGADR[index]
|
||||
wait ' Please Input : H'
|
||||
sendln SAVEADR[index]
|
||||
mpause 400
|
||||
wait 'please send ! (Motorola S-record)'
|
||||
mpause 400
|
||||
sprintf2 FILE_NAME '%s\%s' DIR IMGNM[index]
|
||||
sendfile FILE_NAME 1
|
||||
wait 'complete!' 'Clear OK?(y/n)'
|
||||
If result=1 goto proc_end
|
||||
If result=2 goto send_y
|
||||
|
||||
:send_y
|
||||
send 'y'
|
||||
wait '>'
|
||||
|
||||
:proc_end
|
||||
mpause 100
|
||||
return
|
||||
|
||||
;---------------------------------------------------
|
||||
; Load Image To eMMC
|
||||
;---------------------------------------------------
|
||||
:Load_Image_eMMC
|
||||
mpause 10
|
||||
sendln 'em_w'
|
||||
wait '(Push Y key)'
|
||||
mpause 10
|
||||
send 'y'
|
||||
wait ' Select area(0-2)>'
|
||||
mpause 10
|
||||
sendln '1'
|
||||
wait 'Please Input Start Address in sector :'
|
||||
mpause 1
|
||||
sendln SAVEADR[index]
|
||||
wait 'Please Input Program Start Address :'
|
||||
sendln IMGADR[index]
|
||||
mpause 400
|
||||
wait 'please send ! (Motorola S-record)'
|
||||
mpause 400
|
||||
sprintf2 FILE_NAME '%s\%s' DIR IMGNM[index]
|
||||
sendfile FILE_NAME 1
|
||||
wait 'EM_W Complete!'
|
||||
mpause 100
|
||||
return
|
||||
Reference in New Issue
Block a user