add ttl
This commit is contained in:
155
Src/0_Tool/FW_Write/Customer/Mobis/20251016/Flash_IPL_PRK3.ttl
Normal file
155
Src/0_Tool/FW_Write/Customer/Mobis/20251016/Flash_IPL_PRK3.ttl
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
;---------------------------------------------------
|
||||||
|
; Setting load image parameter
|
||||||
|
;---------------------------------------------------
|
||||||
|
ARRAY_NUM = 1
|
||||||
|
strdim IMGNM ARRAY_NUM
|
||||||
|
IMGNM[0] = 'icumx_loader.srec'
|
||||||
|
|
||||||
|
strdim SAVEADR ARRAY_NUM
|
||||||
|
SAVEADR[0] = '40000'
|
||||||
|
|
||||||
|
strdim IMGADR ARRAY_NUM
|
||||||
|
IMGADR[0] = 'EB210000'
|
||||||
|
|
||||||
|
strdim WRITESEL ARRAY_NUM
|
||||||
|
WRITESEL[0] = 'Flash'
|
||||||
|
|
||||||
|
;---------------------------------------------------
|
||||||
|
; Setting FlashWriter parameter
|
||||||
|
;---------------------------------------------------
|
||||||
|
FLASHWRITER_FILE = 'Flash_writer_PRK3.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
|
||||||
|
setbaud 115200
|
||||||
|
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!'
|
||||||
|
setbaud 115200
|
||||||
|
mpause 100
|
||||||
|
return
|
||||||
Reference in New Issue
Block a user