OSDN Git Service

7dea4cbd871db676a278d1ba835ce5cab5310dec
[fast-forth/master.git] / config / BSL_prog.bat
1 ::@echo off
2 :: use with modified BSL_Scripter: https://github.com/drcrane/bslscripter-vs2017/releases
3 :: extract from zip file to \prog\BSL_Scripter.exe
4 ::
5 :: wiring MSP430FRxx with UART2USB module
6 :: --------------------------------------
7 :: MSP430FRxxx      CP2102/PL2303TA
8 ::  Vcc                3V3
9 ::  GND                GND
10 ::  TXD                RXD
11 ::  RXD                TXD
12 ::  RST/SBWTDIO        DTR
13 ::  TEST/SBWTCK        RTS
14 ::
15 :: usage : 
16 :: close teraterm (the port COMx which will be used by BSL_Scripter.exe is freed)
17 :: wire your target on USB2UART module as indicated above
18 :: use scite command CTRL+2, with param1 = "your target", param3 = "COMx",
19 ::      or drag'n drop your \binaries\target.txt file onto BSL_Scripter.bat then
20 ::      select port COM when asked.
21 :: Once finished, start teraterm then remove the wire DTR, that performs reset.
22 ::
23 :: scite parameters (view command = SHIFT+F8)
24 :: scite commands in \config\asm.properties:
25 ::      $(1) target, example: MSP_EXP430FR5969
26 ::      $(2) target extension, example: _8MHz
27 ::      $(3) port COMx in use, example: COM8
28 ::
29 :: \config\BSL_Scripter.bat variables:
30 :: %~dp0 is the path of this file.bat
31 :: %1 = target name without ext. of \binaries\target.txt file
32 :: %2 = port COMx in use
33 :: %~d1 = drive: of %1
34 :: %~nx1 = target name with ext. of %1
35
36
37 @set PortCOM=%2
38 @if 1%PortCOM% == 1 CALL %~dp0Select.bat SelectPortCOM
39
40 @%~dp0..\prog\BSL-Scripter.exe --log --quiet --initComm [INVOKE,%PortCOM%,UART,9600,PARITY] --device FRxx --erase ERASE_ALL --exit [RESET]
41 @%~dp0..\prog\BSL-Scripter.exe --log --initComm [INVOKE,%PortCOM%,UART,9600,PARITY] --device FRxx --speed FAST  --bslPwd %~dp0..\binaries\pass32_default.txt -w %~dp0..\binaries\%~nx1 --exit [RESET]
42 @pause