@libs-scripts-mep/grav-fw-pvi 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,41 +26,100 @@ npm uninstall @libs-scripts-mep/grav-fw-pvi
|
|
|
26
26
|
| Renesas | Renesas Flash Programmer | ✔️ |
|
|
27
27
|
| Nuvoton | JLink v7.82 | ✔️ |
|
|
28
28
|
|
|
29
|
-
## Exemplo de Utilização
|
|
29
|
+
## Exemplo de Utilização do Modulo
|
|
30
30
|
|
|
31
|
+
### STM8
|
|
31
32
|
```js
|
|
32
33
|
|
|
33
|
-
static async GravaFirmware(
|
|
34
|
+
static async GravaFirmware(dirFirm, dirOpt) {
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
const ObjParams = {
|
|
37
|
+
|
|
38
|
+
objArguments: {
|
|
39
|
+
verbose: true,
|
|
40
|
+
Device: "STM8S003F3",
|
|
41
|
+
},
|
|
42
|
+
timeOut : 4000
|
|
36
43
|
|
|
37
|
-
if(await ExecGravacao(dirFirm, dirOpt, modelo_uC, ObjParams)){
|
|
38
|
-
console.log("GRAVOU")
|
|
39
|
-
}else{
|
|
40
|
-
console.log("NÃO GRAVOU")
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
return new Promise(async (resolve) => {
|
|
44
47
|
|
|
45
|
-
let RetornoGravacao = await GravaFW.STM8(dirFirm, dirOpt,
|
|
48
|
+
let RetornoGravacao = await GravaFW.STM8(dirFirm, dirOpt, ObjParams.objArguments, ObjParams.timeOut)
|
|
46
49
|
|
|
47
50
|
if (RetornoGravacao.sucess) {
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
console.log("GRAVOU")
|
|
50
53
|
|
|
51
54
|
} else {
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
return false
|
|
55
|
-
} else {
|
|
56
|
-
ObjParams.Tentativa++
|
|
57
|
-
return ExecGravacao(dirFirm, dirOpt, modelo_uC, ObjParams)
|
|
58
|
-
}
|
|
59
|
-
|
|
56
|
+
console.log("NÃO GRAVOU")
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
}
|
|
63
|
-
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
}
|
|
64
62
|
|
|
65
63
|
```
|
|
66
64
|
|
|
65
|
+
#### <h3> Possíveis valores para os argumentos da gravação <h3>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
[-BoardName=STxxx] ==========> Programming Tool name (ST-LINK, RLINK, STICE, ...)
|
|
70
|
+
[-Tool_ID=x] ================> ST-LINK Programming Tool ID (0, 1, 2...)
|
|
71
|
+
[-NbTools=x] ================> Number of ST-LINK Tools with same device connected (Tool_ID is automatically incremented)
|
|
72
|
+
[-Port=xxx] =================> Communication Port (USB, LPT1)
|
|
73
|
+
[-ProgMode=xxx] =============> Programming mode or protocol (SWIM, JTAG, SWD)
|
|
74
|
+
[-Device=STxxx] =============> Device name (exact same name as in STVP)
|
|
75
|
+
[-version] ==================> Display version of this application
|
|
76
|
+
[-verbose] ==================> Display messages, warnings, errors
|
|
77
|
+
[-log] ======================> Generate or append Result.log log file
|
|
78
|
+
[-loop] =====================> Loop on actions until 'Space' key hit
|
|
79
|
+
[-progress] =================> Display progress of each action
|
|
80
|
+
[-warn_protect] =============> Message Box if programming Option Byte protection
|
|
81
|
+
[-no_progProg] ==============> Do not program PROGRAM MEMORY (used to verify device from a file)
|
|
82
|
+
[-no_progData] ==============> Do not program DATA MEMORY (used to verify device from a file)
|
|
83
|
+
[-no_progOption] ============> Do not program OPTION BYTE (used to verify device from a file)
|
|
84
|
+
[-readProg] =================> Read PROGRAM MEMORY
|
|
85
|
+
[-readData] =================> Read DATA MEMORY
|
|
86
|
+
[-readOption] ===============> Read OPTION BYTE
|
|
87
|
+
[-erase] ====================> Erase the device (before programming)
|
|
88
|
+
[-blank] ====================> Blank Check the device (before programming)
|
|
89
|
+
[-verif] ====================> Verify the device after programming
|
|
90
|
+
[-FileProg=fname.hex/s19] ===> File name to program PROGRAM MEMORY area (hex or s19)
|
|
91
|
+
[-FileData=fname.hex/s19] ===> File name to program DATA MEMORY area (hex or s19)
|
|
92
|
+
[-FileOption=fname.hex/s19] => File name to program OPTION BYTE area (hex or s19)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
objArguments = {
|
|
97
|
+
|
|
98
|
+
log: true or false
|
|
99
|
+
loop: true or false
|
|
100
|
+
erase: true or false
|
|
101
|
+
blank: true or false
|
|
102
|
+
verif: true or false
|
|
103
|
+
verbose: true or false
|
|
104
|
+
version: true or false
|
|
105
|
+
progress: true or false
|
|
106
|
+
readProg: true or false
|
|
107
|
+
readData: true or false
|
|
108
|
+
readOption: true or false
|
|
109
|
+
no_progProg: true or false
|
|
110
|
+
warn_protect: true or false
|
|
111
|
+
no_progOption: true or false
|
|
112
|
+
verbose: true or false,
|
|
113
|
+
|
|
114
|
+
Port:"USB",
|
|
115
|
+
ProgMode:"SWIM",
|
|
116
|
+
NbTools:"1",
|
|
117
|
+
Tool_ID:"0",
|
|
118
|
+
BoardName:"ST-LINK",
|
|
119
|
+
Device: "STM8S003F3",
|
|
120
|
+
FileData: ""
|
|
121
|
+
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
```
|