@microtronics/studio-cli 0.4.1 → 0.5.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
 
2
2
 
3
+ ## 0.5.0 (2024-12-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * **studio-cli:** generate all dde related api files ([e004302](https://bitbucket.org/microtronics-core/vscode-studio/commits/e004302edf7870ab635e67fade3ca34ea5664c34))
9
+ * **studio-cli:** generate all dde related dlo files ([8a905b5](https://bitbucket.org/microtronics-core/vscode-studio/commits/8a905b5df2732fd0df1905ff30a6a7f935dbdc44))
10
+ * **studio-cli:** generate history.json for the current working dir ([c7a9dd5](https://bitbucket.org/microtronics-core/vscode-studio/commits/c7a9dd59cb31953adba21231a5645e27316065da))
11
+ * **studio-cli:** moved dde specific api file generation to `stuiod-cli` ([54257cd](https://bitbucket.org/microtronics-core/vscode-studio/commits/54257cdc96cfda53b55d8793acbbd47b685053da))
12
+ * **studio-cli:** moved dde specific dlo file generation to `stuiod-cli` ([f9475e0](https://bitbucket.org/microtronics-core/vscode-studio/commits/f9475e07fb7143068b2948349af36969241d5e57))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **studio-cli:** prevent handling empty strings as Number ([376ea04](https://bitbucket.org/microtronics-core/vscode-studio/commits/376ea04c397855c4aab6eabfb7c7cec2e48124f2))
18
+
3
19
  ## 0.4.1 (2024-12-10)
4
20
 
5
21
 
@@ -1017,6 +1017,40 @@ export declare namespace DDE {
1017
1017
  * @param ddeJSON
1018
1018
  */
1019
1019
  export function exportMyDatanetXML(cwd: URI, fs: LocalFS, ddeJSON: DDEJson): Promise<void>;
1020
+ /**
1021
+ * Read the correct history.json file from the project
1022
+ * @param cwd
1023
+ * @param fs
1024
+ */
1025
+ export function getHistoryJson(cwd: URI, fs: LocalFS): Promise<any>;
1026
+ /**
1027
+ * Generate the object for the history.json
1028
+ * @param ddeJson
1029
+ * @param currentHistory
1030
+ * @param manifest
1031
+ */
1032
+ export function buildHistoryJson(ddeJson: DDEJson, currentHistory: any, manifest: Manifest.Manifest): {};
1033
+ /**
1034
+ * Generate the history.json file for the current version
1035
+ * @param cwd
1036
+ * @param fs
1037
+ * @param ddeJSON
1038
+ */
1039
+ export function exportHistoryJson(cwd: URI, fs: LocalFS, ddeJSON: DDEJson): Promise<void>;
1040
+ /**
1041
+ * Generate all dde related dlo files
1042
+ * @param cwd
1043
+ * @param fs
1044
+ * @param ddeJSON
1045
+ */
1046
+ export function exportAutoDloFiles(cwd: URI, fs: LocalFS, ddeJSON: DDEJson): Promise<void>;
1047
+ /**
1048
+ * Generate all dde related openapi files
1049
+ * @param cwd
1050
+ * @param fs
1051
+ * @param ddeMap
1052
+ */
1053
+ export function exportOpenApi(cwd: URI, fs: LocalFS, ddeMap: DDEJson): Promise<void>;
1020
1054
  }
1021
1055
 
1022
1056
  export declare namespace DDE_Core {
@@ -1270,6 +1304,11 @@ export declare namespace DDE_Core {
1270
1304
  */
1271
1305
  yaml: string;
1272
1306
  }
1307
+ /**
1308
+ * Validates if the given container has fields defined within the app's dde
1309
+ * @param container
1310
+ */
1311
+ export function hasContainerAppFields(container: DDEJsonContainer): boolean;
1273
1312
  {};
1274
1313
  }
1275
1314
 
@@ -1280,7 +1319,7 @@ export declare namespace DefaultFiles {
1280
1319
  mainAmxReport: string;
1281
1320
  ddeXml: string;
1282
1321
  ddeOpenApi: string;
1283
- ddeJson: string;
1322
+ historyJson: string;
1284
1323
  mainDDE: string;
1285
1324
  autoInc: string;
1286
1325
  defaultInc: string;
@@ -1318,7 +1357,7 @@ export declare namespace DefaultFiles {
1318
1357
  ddeXmlPath: string;
1319
1358
  ddeApiPath: string;
1320
1359
  ddeApi: string;
1321
- ddeJson: string;
1360
+ historyJson: string;
1322
1361
  povPath: string;
1323
1362
  povDetailsPath: string;
1324
1363
  dfilesPath: string;
@@ -1437,6 +1476,8 @@ export declare namespace Dependencies {
1437
1476
  export function uninstallDependency(cwd: URI, fs: LocalFS, publisherId: string, libraryName: string): Promise<void>;
1438
1477
  }
1439
1478
 
1479
+ export declare const DeviceProfiles: any;
1480
+
1440
1481
  export declare namespace Diagnostics {
1441
1482
  const CODE: {
1442
1483
  ddeFieldLength: string;
@@ -1534,6 +1575,18 @@ declare enum FileType {
1534
1575
  SymbolicLink = 64
1535
1576
  }
1536
1577
 
1578
+ export declare namespace Globals {
1579
+ export interface Defines {
1580
+ [key: string]: string;
1581
+ }
1582
+ /**
1583
+ * Read all ini files from the project directory
1584
+ * @param cwd
1585
+ * @param fs
1586
+ */
1587
+ export function read(cwd: URI, fs: LocalFS): Promise<Defines>;
1588
+ }
1589
+
1537
1590
  export declare namespace Helper {
1538
1591
  /**
1539
1592
  * Convert yaml range to an valid vscode line information
@@ -1545,6 +1598,17 @@ export declare namespace Helper {
1545
1598
  startCharacter: number;
1546
1599
  endCharacter: number;
1547
1600
  };
1601
+ /**
1602
+ * Generates based on the name of the library a CRC16 Modbus hash
1603
+ * @param libraryName
1604
+ */
1605
+ export function generateHashForLibraryName(libraryName: string): string;
1606
+ export function generateHashForFilePath(filePath: string): string;
1607
+ /**
1608
+ * Generate CRC32 for any binary blob
1609
+ * @param content
1610
+ */
1611
+ export function generateCRC32ForFileContent(content: Uint8Array): string;
1548
1612
  }
1549
1613
 
1550
1614
  declare interface LocalFS {
@@ -1568,6 +1632,7 @@ declare interface LocalFS {
1568
1632
  }
1569
1633
 
1570
1634
  export declare namespace Manifest {
1635
+ export type DeviceProfiles = 'm22x' | 'm23x' | 'nrf91' | 'm2blegw' | 'm2easyv3' | 'm2easyiot';
1571
1636
  export interface Manifest {
1572
1637
  version: string;
1573
1638
  name: string;
@@ -1575,7 +1640,7 @@ export declare namespace Manifest {
1575
1640
  description: string;
1576
1641
  legacyProject?: boolean;
1577
1642
  icon?: string;
1578
- dpid?: string;
1643
+ dpid: DeviceProfiles;
1579
1644
  engines?: {
1580
1645
  backend?: string;
1581
1646
  hwfw?: string[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceProfiles.d.ts","sourceRoot":"","sources":["../src/DeviceProfiles.ts"],"names":[],"mappings":"AAuEA,eAAO,MAAM,cAAc,EAAE,GAoX5B,CAAC"}
@@ -0,0 +1,436 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeviceProfiles = void 0;
4
+ /***********************************************************************************************************************
5
+ DEVICE_PROFILES
6
+ ************************************************************************************************************************/
7
+ // these props are automatically added to ~auto.inc files
8
+ const auto_inc_default = {
9
+ DP_registry_sz: 1024,
10
+ DP_config_sz: 4000,
11
+ DP_histdata_sz: 1024,
12
+ DP_DISPLAY_CNT: 0, // display interfaces
13
+ // DP_DISPLAY_TYPE "xc", // extra compact, predefined functionality
14
+ DP_LED_CNT: 0, // system leds
15
+ DP_BUTTON_CNT: 0, // system buttons
16
+ DP_GPIO_CNT: 0, // digital in-/outputs
17
+ DP_IRQ_CNT: 0, // digital interrupt inputs
18
+ DP_DIGOUT_CNT: 0, // digital outputs
19
+ DP_UIN_CNT: 0, // analogue universal inputs
20
+ DP_TEMP_CNT: 0, // temperature sensors
21
+ DP_I2C_CNT: 0, // I2C ports
22
+ DP_SPI_CNT: 0, // SPI ports
23
+ DP_UART_CNT: 0, // TTL uart ports
24
+ DP_RS485_CNT: 0, // RS485 uart ports
25
+ DP_RS232_CNT: 0, // RS232 uart ports
26
+ DP_WIFI_CNT: 0, // wifi interfaces
27
+ DP_BLE_CNT: 0, // BLE interfaces
28
+ DP_LORA_CNT: 0, // LORA interfaces
29
+ DP_NBIOT_CNT: 0 // NB-IoT interfaces
30
+ };
31
+ const CONTDEF_Nk_1k = { max_size: 100000, max_fields: 1000 };
32
+ const CONTDEF_4k_1k = { max_size: 4000, max_fields: 1000 };
33
+ const CONTDEF_1k_1k = { max_size: 1024, max_fields: 1000 };
34
+ // max size/fields for configA..C, config0..9, histdata0..9
35
+ const DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k = {
36
+ configA: CONTDEF_Nk_1k,
37
+ configB: CONTDEF_Nk_1k,
38
+ configC: CONTDEF_Nk_1k,
39
+ config0: CONTDEF_4k_1k,
40
+ config1: CONTDEF_4k_1k,
41
+ config2: CONTDEF_4k_1k,
42
+ config3: CONTDEF_4k_1k,
43
+ config4: CONTDEF_4k_1k,
44
+ config5: CONTDEF_4k_1k,
45
+ config6: CONTDEF_4k_1k,
46
+ config7: CONTDEF_4k_1k,
47
+ config8: CONTDEF_4k_1k,
48
+ config9: CONTDEF_4k_1k,
49
+ histdata0: CONTDEF_1k_1k,
50
+ histdata1: CONTDEF_1k_1k,
51
+ histdata2: CONTDEF_1k_1k,
52
+ histdata3: CONTDEF_1k_1k,
53
+ histdata4: CONTDEF_1k_1k,
54
+ histdata5: CONTDEF_1k_1k,
55
+ histdata6: CONTDEF_1k_1k,
56
+ histdata7: CONTDEF_1k_1k,
57
+ histdata8: CONTDEF_1k_1k,
58
+ histdata9: CONTDEF_1k_1k,
59
+ aloha: { ...CONTDEF_1k_1k, warn_fields: 10 },
60
+ // max_fields:0 - fields are declared implicitly and NOT by DDE
61
+ alerts: { max_size: 13, max_fields: 0, exact_match: true }, // exact_match: do not allow shorter container (nor var length)
62
+ applog: { max_size: 125, max_fields: 0, exact_match: false } // exact_match: do not allow shorter container (nor var length)
63
+ };
64
+ // --- sources, datasheets -> ~stdilib project, _deviceprofile.inc files ---
65
+ exports.DeviceProfiles = {
66
+ // M22x
67
+ m22x: {
68
+ name: 'M22x',
69
+ dpid: 'm22x',
70
+ interface: {
71
+ type: 'usb',
72
+ filter: {
73
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
74
+ vendorId: 0x2544
75
+ // productId: 32777
76
+ // classCode: 0xFF ... deviceClass: 255
77
+ // protocolCode: 0x01 ... deviceProtocol: 0
78
+ // productName: "rapidM2M IoT-Box HW1.1"
79
+ // serialNumber: "861694037822xxxx"
80
+ },
81
+ fileChunk: 4096 //chunk size of a transmitting file part
82
+ },
83
+ usb_ids: ['rapidM2M M2 HW1.0'], // primary USB ID's assigned to this DP
84
+ alt_ids: [], // 'rapidM2M IoT-Box HW1.1' - alternative USB ID's on which this DP works too because hw is a super-set of primary hw
85
+ generation: 'M2',
86
+ prog_mem: 256 * 1024, // max. memory available for prog
87
+ data_mem: 64 * 1024, // max. memory available for data+stack+heap
88
+ total_mem: 256 * 1024, // total memory available for prog+data
89
+ hw_reqd: false, // truthy: can choose this DP only when hw listed in usb_ids is present (otherwise:anytime)
90
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
91
+ auto_inc: {
92
+ ...auto_inc_default,
93
+ DP_LED_CNT: 1,
94
+ DP_GPIO_CNT: 6,
95
+ DP_IRQ_CNT: 2,
96
+ DP_I2C_CNT: 1,
97
+ DP_SPI_CNT: 1,
98
+ DP_UART_CNT: 2,
99
+ DP_WIFI_CNT: 1 // optional
100
+ },
101
+ // usb dbg itf supports a certain cap since fw version XXvXXX (99v999 = not supported yet)
102
+ // applies to hw listed in .usb_ids, only!
103
+ usbcaps: {
104
+ // todo rem - replaced by auto detection - rm2mstate_x10:'01v014' // \x10rm2mstate (instead at+rm2mstate)
105
+ },
106
+ dlo: {
107
+ compileRestrictions: {
108
+ '-z': 0
109
+ }
110
+ }
111
+ },
112
+ // M23x
113
+ m23x: {
114
+ name: 'M23x',
115
+ dpid: 'm23x',
116
+ interface: {
117
+ type: 'usb',
118
+ filter: {
119
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
120
+ vendorId: 0x0483
121
+ },
122
+ fileChunk: 4096 //chunk size of a transmitting file part
123
+ },
124
+ usb_ids: ['rapidM2M M23 HW2.0', 'rapidM2M M23 HW1.0'],
125
+ alt_ids: [],
126
+ generation: 'M23',
127
+ prog_mem: 8 * 1024 * 1024,
128
+ data_mem: 8 * 1024 * 1024,
129
+ total_mem: 8 * 1024 * 1024,
130
+ hw_reqd: false,
131
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
132
+ auto_inc: {
133
+ ...auto_inc_default,
134
+ DP_LED_CNT: 1,
135
+ DP_GPIO_CNT: 6,
136
+ DP_IRQ_CNT: 2,
137
+ DP_I2C_CNT: 1,
138
+ DP_SPI_CNT: 1,
139
+ DP_UART_CNT: 1,
140
+ DP_WIFI_CNT: 1
141
+ },
142
+ usbcaps: {
143
+ // todo rem - replaced by auto detection - rm2mstate_x10:'99v999'
144
+ // dbg itf (console) - usb chunks may hang, timeouts are only applicable if device sends a heartbeat
145
+ dbgItfMayHangFixed: '99v999' // lowest version with fix (bug last seen on 01v005)
146
+ // ^^^^^ !!!! hardcoded implementation !!!! search for dbgItfMayHangFixed !!!!!
147
+ },
148
+ dlo: {
149
+ compileRestrictions: {}
150
+ }
151
+ },
152
+ // NRF91
153
+ nrf91: {
154
+ name: 'NRF91',
155
+ dpid: 'nrf91',
156
+ interface: {
157
+ type: 'usb',
158
+ filter: {
159
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
160
+ vendorId: 0x2544
161
+ // productId: 32777
162
+ // classCode: 0xFF ... deviceClass: 255
163
+ // protocolCode: 0x01 ... deviceProtocol: 0
164
+ // productName: "rapidM2M IoT-Box HW1.1"
165
+ // serialNumber: "861694037822xxxx"
166
+ },
167
+ fileChunk: 2048 //chunk size of a transmitting file part
168
+ },
169
+ usb_ids: ['rapidM2M NRF91 HW1.0', 'ONE NRF91 HW1.0', 'rapidM2M Evolve HW1.0'], // primary USB ID's assigned to this DP
170
+ alt_ids: [], // 'rapidM2M IoT-Box HW1.1' - alternative USB ID's on which this DP works too because hw is a super-set of primary hw
171
+ generation: 'NRF91',
172
+ prog_mem: 256 * 1024, // max. memory available for prog
173
+ data_mem: 64 * 1024, // max. memory available for data+stack+heap
174
+ total_mem: 256 * 1024, // total memory available for prog+data
175
+ hw_reqd: false, // truthy: can choose this DP only when hw listed in usb_ids is present (otherwise:anytime)
176
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
177
+ auto_inc: {
178
+ ...auto_inc_default,
179
+ DP_LED_CNT: 1,
180
+ DP_GPIO_CNT: 32,
181
+ DP_IRQ_CNT: 6,
182
+ DP_I2C_CNT: 2,
183
+ DP_SPI_CNT: 2,
184
+ DP_UART_CNT: 2,
185
+ DP_AIN_CNT: 8,
186
+ DP_PWM_CNT: 3
187
+ },
188
+ // usb dbg itf supports a certain cap since fw version XXvXXX (99v999 = not supported yet)
189
+ // applies to hw listed in .usb_ids, only!
190
+ usbcaps: {
191
+ // todo rem - replaced by auto detection - rm2mstate_x10:'01v014' // \x10rm2mstate (instead at+rm2mstate)
192
+ }
193
+ },
194
+ // M2 BLE-GW
195
+ m2blegw: {
196
+ name: 'BLE Gateway',
197
+ dpid: 'm2blegw',
198
+ interface: {
199
+ type: 'usb',
200
+ filter: {
201
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
202
+ vendorId: 0x2544
203
+ // productId: 32777
204
+ // classCode: 0xFF ... deviceClass: 255
205
+ // protocolCode: 0x01 ... deviceProtocol: 0
206
+ // productName: "rapidM2M IoT-Box HW1.1"
207
+ // serialNumber: "861694037822xxxx"
208
+ },
209
+ fileChunk: 4096 //chunk size of a transmitting file part
210
+ },
211
+ usb_ids: ['rapidM2M BLEGW HW1.0'], // primary USB ID's assigned to this DP
212
+ alt_ids: [], // 'rapidM2M IoT-Box HW1.1' - alternative USB ID's on which this DP works too because hw is a super-set of primary hw
213
+ generation: 'M2',
214
+ prog_mem: 256 * 1024, // max. memory available for prog
215
+ data_mem: 256 * 1024, // max. memory available for data+stack+heap
216
+ total_mem: 256 * 1024, // total memory available for prog+data
217
+ hw_reqd: false, // truthy: can choose this DP only when hw listed in usb_ids is present (otherwise:anytime)
218
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
219
+ auto_inc: {
220
+ ...auto_inc_default,
221
+ DP_DISPLAY_CNT: 1, // display interfaces
222
+ DP_DISPLAY_TYPE: 'xc', // extra compact, predefined functionality
223
+ DP_BUTTON_CNT: 1, // system buttons
224
+ DP_BLE_CNT: 1 // BLE interfaces
225
+ },
226
+ // usb dbg itf supports a certain cap since fw version XXvXXX (99v999 = not supported yet)
227
+ // applies to hw listed in .usb_ids, only!
228
+ usbcaps: {
229
+ // todo rem - replaced by auto detection - rm2mstate_x10:'01v014' // \x10rm2mstate (instead at+rm2mstate)
230
+ },
231
+ dlo: {
232
+ compileRestrictions: {
233
+ '-z': 0
234
+ }
235
+ }
236
+ },
237
+ // M2 myDatalogEASY v3
238
+ m2easyv3: {
239
+ name: 'myDatalogEasy V3',
240
+ dpid: 'm2easyv3',
241
+ interface: {
242
+ type: 'usb',
243
+ filter: {
244
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
245
+ vendorId: 0x2544
246
+ },
247
+ fileChunk: 4096 //chunk size of a transmitting file part
248
+ },
249
+ usb_ids: ['rapidM2M Easy HW3.0'],
250
+ alt_ids: ['rapidM2M EasyIoT HW1.0', 'rapidM2M M220 HW1.0'],
251
+ generation: 'M2',
252
+ prog_mem: 256 * 1024,
253
+ data_mem: 256 * 1024,
254
+ total_mem: 256 * 1024,
255
+ hw_reqd: false,
256
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
257
+ auto_inc: {
258
+ ...auto_inc_default,
259
+ DP_LED_CNT: 1,
260
+ DP_BUTTON_CNT: 1,
261
+ DP_DIGOUT_CNT: 1,
262
+ DP_UIN_CNT: 4,
263
+ DP_TEMP_CNT: 1,
264
+ DP_RS485_CNT: 1,
265
+ DP_RS232_CNT: 1,
266
+ DP_BLE_CNT: 1,
267
+ DP_LORA_CNT: 1
268
+ },
269
+ usbcaps: {
270
+ // todo rem - replaced by auto detection - rm2mstate_x10:'99v999'
271
+ },
272
+ dlo: {
273
+ compileRestrictions: {
274
+ '-z': 0
275
+ }
276
+ }
277
+ },
278
+ // M2 myDatalogEASY IoT
279
+ m2easyiot: {
280
+ name: 'myDatalogEasy IoT',
281
+ dpid: 'm2easyiot',
282
+ interface: {
283
+ type: 'usb',
284
+ filter: {
285
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
286
+ vendorId: 0x2544
287
+ },
288
+ fileChunk: 4096 //chunk size of a transmitting file part
289
+ },
290
+ usb_ids: ['rapidM2M EasyIoT HW1.0'],
291
+ alt_ids: [],
292
+ generation: 'M2',
293
+ prog_mem: 256 * 1024,
294
+ data_mem: 256 * 1024,
295
+ total_mem: 256 * 1024,
296
+ hw_reqd: false,
297
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
298
+ auto_inc: {
299
+ ...auto_inc_default,
300
+ DP_LED_CNT: 1,
301
+ DP_BUTTON_CNT: 1,
302
+ DP_DIGOUT_CNT: 1,
303
+ DP_UIN_CNT: 4,
304
+ DP_TEMP_CNT: 1,
305
+ DP_RS485_CNT: 1,
306
+ DP_RS232_CNT: 1,
307
+ DP_BLE_CNT: 1,
308
+ DP_LORA_CNT: 1
309
+ },
310
+ usbcaps: {
311
+ // todo rem - replaced by auto detection - rm2mstate_x10:'99v999'
312
+ },
313
+ dlo: {
314
+ compileRestrictions: {
315
+ '-z': 0
316
+ }
317
+ }
318
+ }
319
+ // M3 IoT-Box
320
+ /*m3iotbox: {
321
+ name: 'IoT-Box',
322
+ dpid: 'm3iotbox',
323
+ interface: {
324
+ type: 'usb',
325
+ filter: {
326
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
327
+ vendorId: 0x2544
328
+ },
329
+ fileChunk: 4096 //chunk size of a transmitting file part
330
+ },
331
+ usb_ids: ['rapidM2M IoT-Box HW1.0'],
332
+ alt_ids: [],
333
+ generation: 'M3',
334
+ prog_mem: 256 * 1024,
335
+ data_mem: 256 * 1024,
336
+ total_mem: 256 * 1024,
337
+ hw_reqd: false,
338
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
339
+ auto_inc: {
340
+ ...auto_inc_default,
341
+ DP_LED_CNT: 1,
342
+ DP_BUTTON_CNT: 1,
343
+ DP_GPIO_CNT: 6,
344
+ DP_UIN_CNT: 2,
345
+ DP_I2C_CNT: 2,
346
+ DP_SPI_CNT: 1,
347
+ DP_UART_CNT: 2,
348
+ DP_BLE_CNT: 1
349
+ },
350
+ usbcaps: {
351
+ // todo rem - replaced by auto detection - rm2mstate_x10:'99v999'
352
+ }
353
+ },*/
354
+ // T32x
355
+ /*t32x: {
356
+ name: 'T32x',
357
+ dpid: 't32x',
358
+ interface: {
359
+ type: 'usb',
360
+ filter: {
361
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
362
+ vendorId: 0x2544
363
+ },
364
+ fileChunk: 4096 //chunk size of a transmitting file part
365
+ },
366
+ usb_ids: ['rapidM2M T32 HW1.0'],
367
+ alt_ids: [],
368
+ generation: 'M23',
369
+ prog_mem: 256 * 1024, // max. memory available for prog
370
+ data_mem: 256 * 1024, // max. memory available for data+stack+heap
371
+ total_mem: 256 * 1024, // total memory available for prog+data
372
+ hw_reqd: false,
373
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
374
+ auto_inc: {
375
+ ...auto_inc_default,
376
+ DP_LED_CNT: 1,
377
+ DP_GPIO_CNT: 2,
378
+ DP_I2C_CNT: 1,
379
+ DP_UART_CNT: 1,
380
+ DP_BLE_CNT: 1,
381
+ DP_NBIOT_CNT: 1
382
+ },
383
+ usbcaps: {
384
+ // todo rem - replaced by auto detection - rm2mstate_x10:'99v999'
385
+ },
386
+ dlo: {
387
+ compileRestrictions: {
388
+ '-z': 0
389
+ }
390
+ }
391
+ },*/
392
+ // M22xs - serial communication
393
+ /*m22xs: {
394
+ name: 'M22x Serial',
395
+ dpid: 'm22x',
396
+ interface: {
397
+ type: 'serial',
398
+ filter: {
399
+ // filter used by client's navigator.usb.requestDevice to scan USB for compatible devices
400
+ //todo serial device vendor id's like ftdi or so...
401
+ },
402
+ baudrate: 115200,
403
+ rxBuffer: 1024, //receive buffer of the device.
404
+ fileChunk: 256 //chunk size of a transmitting file part
405
+ },
406
+ usb_ids: ['rapidM2M M2 HW1.0'], // primary USB ID's assigned to this DP
407
+ alt_ids: [], // 'rapidM2M IoT-Box HW1.1' - alternative USB ID's on which this DP works too because hw is a super-set of primary hw
408
+ generation: 'M2',
409
+ prog_mem: 256 * 1024, // max. memory available for prog
410
+ data_mem: 64 * 1024, // max. memory available for data+stack+heap
411
+ total_mem: 256 * 1024, // total memory available for prog+data
412
+ hw_reqd: false, // truthy: can choose this DP only when hw listed in usb_ids is present (otherwise:anytime)
413
+ dde: DDE_CONFIG_Nk1k_4k1k_HISTDATA_1k1k,
414
+ auto_inc: {
415
+ ...auto_inc_default,
416
+ DP_LED_CNT: 1,
417
+ DP_GPIO_CNT: 6,
418
+ DP_IRQ_CNT: 2,
419
+ DP_I2C_CNT: 1,
420
+ DP_SPI_CNT: 1,
421
+ DP_UART_CNT: 2,
422
+ DP_WIFI_CNT: 1 // optional
423
+ },
424
+ // usb dbg itf supports a certain cap since fw version XXvXXX (99v999 = not supported yet)
425
+ // applies to hw listed in .usb_ids, only!
426
+ usbcaps: {
427
+ // todo rem - replaced by auto detection - rm2mstate_x10:'01v014' // \x10rm2mstate (instead at+rm2mstate)
428
+ },
429
+ dlo: {
430
+ compileRestrictions: {
431
+ '-z': 0
432
+ }
433
+ }
434
+ },*/
435
+ };
436
+ //# sourceMappingURL=DeviceProfiles.js.map
package/out/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC"}
package/out/api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultFiles = exports.Diagnostics = exports.Helper = exports.DDE = exports.DDE_Core = exports.Registry = exports.Manifest = exports.Dependencies = void 0;
3
+ exports.Globals = exports.DeviceProfiles = exports.DefaultFiles = exports.Diagnostics = exports.Helper = exports.DDE = exports.DDE_Core = exports.Registry = exports.Manifest = exports.Dependencies = void 0;
4
4
  const dependencies_1 = require("./dependencies");
5
5
  Object.defineProperty(exports, "Dependencies", { enumerable: true, get: function () { return dependencies_1.Dependencies; } });
6
6
  const manifest_1 = require("./manifest");
@@ -17,4 +17,8 @@ const diagnostics_1 = require("./diagnostics");
17
17
  Object.defineProperty(exports, "Diagnostics", { enumerable: true, get: function () { return diagnostics_1.Diagnostics; } });
18
18
  const defaultFiles_1 = require("./defaultFiles");
19
19
  Object.defineProperty(exports, "DefaultFiles", { enumerable: true, get: function () { return defaultFiles_1.DefaultFiles; } });
20
+ const DeviceProfiles_1 = require("./DeviceProfiles");
21
+ Object.defineProperty(exports, "DeviceProfiles", { enumerable: true, get: function () { return DeviceProfiles_1.DeviceProfiles; } });
22
+ const globals_1 = require("./globals");
23
+ Object.defineProperty(exports, "Globals", { enumerable: true, get: function () { return globals_1.Globals; } });
20
24
  //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crc.d.ts","sourceRoot":"","sources":["../src/crc.ts"],"names":[],"mappings":"AAgCA,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,GAAE,MAAU,UAQnE;AAsCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,UAa3C"}