6 \ TARGET SELECTION ( = the name of \INC\target.pat file without the extension)
7 \ MSP_EXP430FR5739 MSP_EXP430FR5969 MSP_EXP430FR5994 MSP_EXP430FR6989
8 \ MSP_EXP430FR4133 CHIPSTICK_FR2433 MSP_EXP430FR2433 MSP_EXP430FR2355
11 \ from scite editor : copy your target selection in (shift+F8) parameter 1:
13 \ or, from windows explorer:
14 \ drag and drop this file onto SendSourceFileToTarget.bat
15 \ then select your TARGET when asked.
17 \ SYSRSTIV decimal/hex values for MSP430FR5994 (device specific)
18 \ ----------------------------------------------------------
19 \ #00 $00 No interrupt pending
20 \ #02 $02 Brownout (BOR)
21 \ #04 $04 RSTIFG RST/NMI (BOR)
22 \ #06 $06 PMMSWBOR software BOR (BOR)
23 \ #08 $08 LPMx.5 wake up (BOR)
24 \ #10 $0A violation memory protected areas (BOR)
26 \ #14 $0E SVSHIFG SVSH event (BOR)
29 \ #20 $14 PMMSWPOR software POR (POR)
30 \ #22 $16 WDTIFG watchdog timeout (PUC)
31 \ #24 $18 WDTPW password violation (PUC)
32 \ #26 $1A FRCTLPW password violation (PUC)
33 \ #28 $1C Uncorrectable FRAM bit error detection (PUC)
34 \ #30 $1E Peripheral area fetch (PUC)
35 \ #32 $20 PMMPW PMM password violation (PUC)
36 \ #34 $22 MPUPW MPU password violation (PUC)
37 \ #36 $24 CSPW CS password violation (PUC)
38 \ #38 $26 MPUSEGIPIFG encapsulated IP memory segment violation (PUC)
39 \ #40 $28 MPUSEGIIFG information memory segment violation (PUC)
40 \ #42 $2A MPUSEG1IFG segment 1 memory violation (PUC)
41 \ #44 $2C MPUSEG2IFG segment 2 memory violation (PUC)
42 \ #46 $2E MPUSEG3IFG segment 3 memory violation (PUC)
44 \ emulated SYSRSTIV values added by FastForth SYS
45 \ -----------------------------------------------
46 \ n SYS ( n<0) : user WIPE = Deep Reset: restores FastForth as it was "flashed"
47 \ -3 : reset after FastForth "flashing".
49 \ n SYS (n even ) : user COLD (don't reuse hardware SYSRSTIV!)
50 \ n SYS (n odd ) : user WARM.
53 \ ------------------------------------------------------------------------------
54 \ When BOOT.4TH is called by the FastForth bootstrap, the SYSRSTIV (hardware or
55 \ emulated value) is on the Top Of paramater Stack -TOS- ready to test.
56 \ ------------------------------------------------------------------------------
57 \ to enable bootstrap: BOOT
58 \ to disable bootstrap: UNBOOT
59 \ ------------------------------------------------------------------------------
63 \ https://forth-standard.org/standard/core/DUP
64 \ DUP x -- x x duplicate top of stack
68 BW1 SUB #2,PSP \ 2 push old TOS..
69 MOV TOS,0(PSP) \ 3 ..onto stack
73 \ https://forth-standard.org/standard/core/qDUP
74 \ ?DUP x -- 0 | x x DUP if nonzero
76 CMP #0,TOS \ 2 test for TOS nonzero
82 \ https://forth-standard.org/standard/core/DROP
83 \ DROP x -- drop top of stack
94 \ https://forth-standard.org/standard/core/Equal
95 \ = x1 x2 -- flag test x1=x2
98 SUB #1,TOS \ 1 borrow (clear cy) if TOS was 0
99 SUBC TOS,TOS \ 1 TOS=-1 if borrow was set
106 \ https://forth-standard.org/standard/core/Plus
107 \ + n1/u1 n2/u2 -- n3/u3 add n1+n2
116 \ https://forth-standard.org/standard/core/EXECUTE
117 \ EXECUTE i*x xt -- j*x execute Forth word at 'xt'
121 MOV @RSP+,PC \ 4 xt --> PC
125 \ ------------------------------------------------------------------------------
127 \ ------------------------------------------------------------------------------
128 \ it is not recommended here to compile then execute a definition
129 \ because the risk of crushing thereafter.
130 \ Interpreting mode as below is required:
131 \ ------------------------------------------------------------------------------
132 DUP 4 = \ TOS = SYS value
133 [IF] \ if PUC event is <SW1+RESET> or -1 SYS
135 RST_RET \ remove definitions above
136 LOAD" SD_TEST.4TH" \ load a file to test the SD_Card driver
138 ' SYS $0A + EXECUTE \ return to n SYS to remove definitions above