Other Parts Discussed in Thread: C2000WARE
Hi,
I'm using SCI flash programming "serial_flash_programmer.exe"
Within the exe. and input the command line"serial_flash_programmer.exe -d f2837xD -k F2837xD_sci_flash_kernels_cpu01.txt -a blinky_dc_cpu01.txt -b 9600 -p COM5"
I can download the flash kernel to F28379 and get the feedback:
What operation do you want to perform?
1-DFU CPU1
2-DFU CPU2
3-Erase CPU1
4-Erase CPU2
5-Verify CPU1
6-Verify CPU2
7-Unlock CPU1 Zone 1
8-Unlock CPU1 Zone 2
9-Unlock CPU2 Zone 1
10-Unlock CPU2 Zone 2
11-Run CPU1
12-Reset CPU1
13-Run CPU1 and Boot CPU2
14-Reset CPU1 and Boot CPU2
15-Run CPU2
16-Reset CPU2
0-DONE
And then I need to input my choice. For example if the device is locked:
7-Unlock CPU1 Zone 1 then input passcode
8-Unlock CPU1 Zone 2 then input passcode
This is okay if I'm a software developer. But when the customer do this in mass production, it's complicated. Moreover, it's not that safe to let someone other than the software developer to know the passcode. So I wonder if there is a way to wrap up all these steps, and those who need to upgrade the software only need to click the mouse and it's all done.
I think the batch file should be a good choice.
I creat a .bat file and it can load the flash kernel into the device just by double click this file
"set /p num=please input com port number
serial_flash_programmer.exe -d f2837xD -k F2837xD_sci_flash_kernels_cpu01.txt -a blinky_dc_cpu01.txt -b 9600 -p COM%num%"
But I have trouble to wait for the flash kernel to be loaded to the device and do the appropriate choice, how can i do something like the following in a batch file
if(received packet="What operation do you want to perform?")
1
else
wait
Appreciate it If you have any good suggestion.