NetBurner 3.1
SSH/SecureSerToEthFactoryApp/nbfactory.h
1 /* Revision: 2.8.7 */
2 
3 /******************************************************************************
4 * Copyright 1998-2018 NetBurner, Inc. ALL RIGHTS RESERVED
5 *
6 * Permission is hereby granted to purchasers of NetBurner Hardware to use or
7 * modify this computer program for any use as long as the resultant program
8 * is only executed on NetBurner provided hardware.
9 *
10 * No other rights to use this program or its derivatives in part or in
11 * whole are granted.
12 *
13 * It may be possible to license this or other NetBurner software for use on
14 * non-NetBurner Hardware. Contact sales@Netburner.com for more information.
15 *
16 * NetBurner makes no representation or warranties with respect to the
17 * performance of this computer program, and specifically disclaims any
18 * responsibility for any damages, special or consequential, connected with
19 * the use of this program.
20 *
21 * NetBurner
22 * 5405 Morehouse Dr.
23 * San Diego, CA 92121
24 * www.netburner.com
25 ******************************************************************************/
26 
27 
28 #ifndef _NB_FACTORY_H_
29 #define _NB_FACTORY_H_
30 
31 
32 /*
33  ******************************************************************************
34  *
35  * Factory defaults for this factory application
36  *
37  ******************************************************************************
38  */
39 /* Configuration verify key (increment if data changed, added, reorganized) */
40 #define NB_FACTORY_VERIFY_KEY ( 0x7E545088 )
41 /* STD-EFFS verify key (increment to format file system, required for 1.6-1.9 STD EFFS Upgrade) */
42 #define STD_EFFS_VERIFY_KEY ( 0x15A58101 )
43 
44 /* Version VV.NN.vvvv ( 0xVVNNvvvv ), string must match constant */
45 #define NB_FACTORY_DEFAULTS_VERSION ( DWORD )( 0x02070002 )
46 #define NB_FACTORY_DEFAULTS_VERSION_STRING "02.12"
47 
48 /* Module Base Name */
49 #ifdef SB70
50  #define NB_FACTORY_MODULE_BASE_NAME "SB70"
51 #elif defined SB70B
52  #define NB_FACTORY_MODULE_BASE_NAME "SB70B"
53 #elif defined SB70LC
54  #define NB_FACTORY_MODULE_BASE_NAME "SB70LC"
55 #elif defined MOD5270
56  #define NB_FACTORY_MODULE_BASE_NAME "MOD5270"
57 #elif defined MOD5234
58  #define NB_FACTORY_MODULE_BASE_NAME "MOD5234"
59 #elif defined MOD5282
60  #define NB_FACTORY_MODULE_BASE_NAME "MOD5282"
61 #elif defined CB34EX
62  #define NB_FACTORY_MODULE_BASE_NAME "CB34EX"
63 #elif defined MOD5272
64  #define NB_FACTORY_MODULE_BASE_NAME "MOD5272"
65 #elif defined SB72
66  #define NB_FACTORY_MODULE_BASE_NAME "SB72"
67 #elif defined SB72EX
68  #define NB_FACTORY_MODULE_BASE_NAME "SB72EX"
69 #elif defined SB700EX
70  #define NB_FACTORY_MODULE_BASE_NAME "SB700EX"
71 #elif defined SB800EX
72  #define NB_FACTORY_MODULE_BASE_NAME "SB800EX"
73 #elif defined NANO54415
74  #define NB_FACTORY_MODULE_BASE_NAME "NANO54415"
75 #elif defined PK70
76  #define NB_FACTORY_MODULE_BASE_NAME "PK70"
77  /*
78  * This enables the application to work with the PK70 platform and any one of
79  * the following quad-UART blade boards:
80  *
81  * - NBPKBU-100/232CR - use PK70_QUAD_232 definition
82  * - NBPKBU-485CR - use PK70_QUAD_485 definition
83  * - NBPKBU-MMSCR - use PK70_QUAD_MMS definition
84  *
85  * Only one definition can be un-commented at a time.
86  */
87  #define PK70_QUAD_232 ( 1 )
88  //#define PK70_QUAD_485 ( 1 )
89  //#define PK70_QUAD_MMS ( 1 )
90 #else
91  #error Module not supported
92 #endif
93 
94 /* Module Description */
95 #define NB_FACTORY_BASE_DESC "Network to Serial"
96 
97 /* Feature Name and Description */
98 #define NB_FACTORY_FEATURE_NAME "SX"
99 #define NB_FACTORY_FEATURE_DESC "Securable Network to Serial"
100 
101 
102 // If you are low on flash space on the SB70LC and do not need I2C, you can comment out the #define
103 #if (defined SB70LC ) //|| defined MCF5441X || defined NANO54415)
104 #define SUPPORTED_I2C_PLATFORM
105 #endif
106 
107 /* Number of serial ports */
108 // If you change this to allow other platforms to use more than 2,
109 // a fair bit of logic will need to change
110 #if ( defined NANO54415 || defined PK70 )
111 #define NB_FACTORY_SERIAL_PORTS ( 5 )
112 #else
113 #define NB_FACTORY_SERIAL_PORTS ( 2 )
114 #endif
115 
116 #define NB_FACTORY_I2C_PORTS ( 1 )
117 
118 /* SSL */
119 #define NB_FACTORY_INCLUDE_SSL ( 1 )
120 
121 /* SSH */
122 #define NB_FACTORY_INCLUDE_SSH ( 1 )
123 
124 /*** Network Defaults ***/
125 
126 /* PROTOCOL_TCP_TO_SERIAL is 2 in serialburnerdata.h */
127 #define NB_FACTORY_PROTOCOL_DEFAULT ( 2 )
128 #define NB_FACTORY_LISTEN_PORT_DEFAULT IANA_TELNET_PORT // Port 23
129 #define NB_FACTORY_INACTIVITY_TIMEOUT_DEFAULT ( 60 )
130 #define NB_FACTORY_NEW_CONNECTION_TIMEOUT_DEFAULT ( 30 )
131 
132 /* I2C to Ethernet default port */
133 #define NB_FACTORY_I2C_LISTEN_PORT_DEFAULT ( 26 )
134 
135 /* SERIAL_CONNECT_CONNECT_NEVER is 1 serialburnerdata.h */
136 #define NB_FACTORY_CONNECT_MODE_DEFAULT ( 1 )
137 
138 /* Near the end of well known ports (1023) */
139 #define NB_FACTORY_CONNECT_PORT_DEFAULT ( 1000 )
140 
141 /* IP address 0.0.0.0 is zero */
142 #define NB_FACTORY_CONNECT_ADDRESS ( 0 )
143 
144 #define NB_CONNECT_IDLE_TIMEOUT_DEFAULT ( 60 )
145 #define NB_CONNECT_RETRY_TIMEOUT_DEFAULT ( 360 )
146 #define NB_CONENCT_KEEP_ALIVE_INTERVAL_DEFAULT ( 0 )
147 
148 #define NB_FACTORY_NTPSERVERNAME_DEFAULT "pool.ntp.org"
149 
150 
151 /*** Serial defaults ***/
152 
153 /* SERIAL_MODE_RS232 is 1 serialburnerdata.h */
154 #define NB_FACTORY_SERIAL_MODE_DEFAULT ( 1 )
155 
156 /* Serial mode capability sets */
157 #define NB_FACTORY_SERIAL_CAPABILITY_FULL ( 0 )
158 #define NB_FACTORY_SERIAL_CAPABILITY_RS232 ( 1 )
159 #define NB_FACTORY_SERIAL_CAPABILITY_RS485 ( 2 )
160 #define NB_FACTORY_SERIAL_CAPABILITY_HYBRID ( 3 )
161 #define NB_FACTORY_SERIAL_CAPABILITY_QUAD485 ( 4 )
162 #define NB_FACTORY_SERIAL_CAPABILITY_QUADMMS ( 5 )
163 
164 /*
165  * Serial port fully capable RS-232 & RS-485 and debug default
166  * Assuming default configurations or development boards
167  */
168 #if ( defined SB70 || defined SB70B )
169  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
170  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
171  {\
172  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
173  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
174  }
175 #elif SB70LC
176  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
177  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
178  {\
179  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
180  NB_FACTORY_SERIAL_CAPABILITY_FULL /* Port 1 */ \
181  }
182 #elif MOD5270
183  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
184  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
185  {\
186  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
187  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
188  }
189 #elif MOD5234
190  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
191  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
192  {\
193  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
194  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
195  }
196 #elif MOD5282
197  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
198  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
199  {\
200  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
201  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
202  }
203 #elif CB34EX
204  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
205  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
206  {\
207  NB_FACTORY_SERIAL_CAPABILITY_HYBRID, /* Port 0 */ \
208  NB_FACTORY_SERIAL_CAPABILITY_RS485 /* Port 1 */ \
209  }
210 #elif MOD5272
211  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
212  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
213  {\
214  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
215  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
216  }
217 #elif SB72
218  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
219  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
220  {\
221  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
222  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
223  }
224 #elif SB72EX
225  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
226  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
227  {\
228  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
229  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
230  }
231 #elif SB700EX
232  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
233  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
234  {\
235  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
236  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 1 */ \
237  }
238 #elif SB800EX
239  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 1 )
240  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
241  {\
242  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
243  NB_FACTORY_SERIAL_CAPABILITY_FULL /* Port 1 */ \
244  }
245 // #define WIFI_INSTALLED ( 1 ) // Applies to general wifi functionality
246 
247 #elif NANO54415
248  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
249  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
250  {\
251  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 0 */ \
252  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 1 */ \
253  NB_FACTORY_SERIAL_CAPABILITY_FULL, /* Port 2 */ \
254  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 3 */ \
255  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 4 */ \
256  }
257 #elif PK70_QUAD_232
258  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
259  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
260  {\
261  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 0 */ \
262  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 1 */ \
263  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 2 */ \
264  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 3 */ \
265  NB_FACTORY_SERIAL_CAPABILITY_RS232 /* Port 4 */ \
266  }
267 #elif PK70_QUAD_485
268  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
269  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
270  {\
271  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 0 */ \
272  NB_FACTORY_SERIAL_CAPABILITY_QUAD485, /* Port 1 */ \
273  NB_FACTORY_SERIAL_CAPABILITY_QUAD485, /* Port 2 */ \
274  NB_FACTORY_SERIAL_CAPABILITY_QUAD485, /* Port 3 */ \
275  NB_FACTORY_SERIAL_CAPABILITY_QUAD485 /* Port 4 */ \
276  }
277 #elif PK70_QUAD_MMS
278  #define NB_FACTORY_DEBUG_SERIAL_PORT_DEFAULT ( 0 )
279  #define NB_FACTORY_SERIAL_PORT_MODE_CAPABILITY \
280  {\
281  NB_FACTORY_SERIAL_CAPABILITY_RS232, /* Port 0 */ \
282  NB_FACTORY_SERIAL_CAPABILITY_QUADMMS, /* Port 1 */ \
283  NB_FACTORY_SERIAL_CAPABILITY_QUADMMS, /* Port 2 */ \
284  NB_FACTORY_SERIAL_CAPABILITY_QUADMMS, /* Port 3 */ \
285  NB_FACTORY_SERIAL_CAPABILITY_QUADMMS /* Port 4 */ \
286  }
287 #else
288  #error Module not supported
289 #endif
290 
291 
292 /* Serial data settings defaults */
293 #define NB_FACTORY_SERIAL_DATA_RATE_DEFAULT ( 115200 )
294 #define NB_FACTORY_SERIAL_CUSTOM_DATA_RATE_DEFAULT ( 0 )
295 #define NB_FACTORY_SERIAL_DATA_BITS_DEFAULT ( 8 )
296 #define NB_FACTORY_SERIAL_STOP_BITS_DEFAULT ( 1 )
297 
298 /* I2C data settings defaults */
299 //#ifdef SB70LC
300 #define NB_FACTORY_I2C_IC_DEFAULT ( 0x16 )
301 #define NB_FACTORY_I2C_FREQ_DIVIDER_DEFAULT ( 768 )
302 #define NB_FACTORY_I2C_CUSTOM_DATA_RATE_DEFAULT ( 0 )
303 #define NB_FACTORY_I2C_ADDRESS_DEFAULT ( 0x08 )
304 //#endif
305 
306 /* None is 1 serialburnerdata.h */
307 #define NB_FACTORY_SERIAL_PARITY_DEFAULT ( 1 )
308 
309 /* SERIAL_FLOW_MODE_NONE is 1 serialburnerdata.h */
310 #define NB_FACTORY_SERIAL_FLOW_CONTROL_DEFAULT ( 1 )
311 
312 /* Serial Port Settings jumper page enabled */
313 #ifdef SB72
314  #define NB_FACTORY_SERIAL_JUMPER_PAGE_ENABLED ( 1 )
315 #endif
316 
317 #define NB_FACTORY_BREAK_INTERVAL_DEFAULT ( 20 )
318 #define NB_FACTORY_BREAK_KEY_FLAG_DEFAULT ( 0 )
319 #define NB_FACTORY_BREAK_KEY_VALUE_DEFAULT ( 0x02 )
320 
321 /* SSL */
322 #define NB_FACTORY_SSL_PERMANENT_DESC_DEFAULT "NetBurner Library Default "
323 #define NB_FACTORY_SSL_INCLUDED_DESC_DEFAULT "Default "
324 #define NB_FACTORY_SSL_INSTALLED_DESC_DEFAULT "User Installed "
325 
326 #define NB_FACTORY_SSL_FILE_NAME_CERT "cert.crt"
327 #define NB_FACTORY_SSL_FILE_NAME_KEY "cert.key"
328 
329 /* SSH */
330 #define NB_FACTORY_INACTIVITY_TIMEOUT_SSH_DEFAULT ( 360 )
331 #define NB_FACTORY_NEW_CONNECTION_TIMEOUT_SSH_DEFAULT ( 180 )
332 
333 #define NB_FACTORY_SSH_PERMANENT_KEY_DESC_DEFAULT "NetBurner Library Default "
334 #define NB_FACTORY_SSH_INCLUDED_KEY_DESC_DEFAULT "Default "
335 #define NB_FACTORY_SSH_INSTALLED_KEY_DESC_DEFAULT "User Installed "
336 
337 #define NB_FACTORY_SSH_FILE_NAME_KEY_RSA "rsa.key"
338 #define NB_FACTORY_SSH_FILE_NAME_KEY_DSA "dsa.key"
339 
340 /* UDP */
341 #define NB_FACTORY_ACCUMULATED_CHARS_UDP_DEFAULT ( 32 )
342 #define NB_FACTORY_WAIT_UDP_IN_TICKS_DEFAULT ( 100 )
343 #define NB_FACTORY_TRIGGER_CHAR_UDP_DEFAULT ( 0x00 )
344 #define NB_FACTORY_LEARN_UDP_DEFAULT ( FALSE )
345 #define NB_FACTORY_CHECK_FRAMING_CHAR_UDP_DEFAULT ( FALSE )
346 
347 /* TCP */
348 #define NB_FACTORY_ACCUMULATED_CHARS_TCP_DEFAULT ( 32 )
349 #define NB_FACTORY_WAIT_TCP_IN_TICKS_DEFAULT ( 100 )
350 #define NB_FACTORY_TRIGGER_CHAR_TCP_DEFAULT ( 0x00 )
351 #define NB_FACTORY_CUSTOM_FRAME_TCP_DEFAULT ( FALSE )
352 #define NB_FACTORY_CHECK_FRAMING_CHAR_TCP_DEFAULT ( FALSE )
353 
354 /* DHCP timeout */
355 #define NB_FACTORY_DHCP_TIMEOUT_IN_TICKS ( 10 * TICKS_PER_SECOND )
356 
357 /*
358  * Maximum size of certificate or key files in bytes
359  * Must the maximum of
360  * SERIAL_BURNER_CERTIFICATE_SIZE_MAX
361  * SERIAL_BURNER_RSA_KEY_SIZE_MAX
362  * SERIAL_BURNER_DSA_KEY_SIZE_MAX
363  */
364 #define NB_FACTORY_FILE_SIZE_MAXIMUM ( 4 * 1024 )
365 
366 /*
367  * On-chip file system EFFS-STD
368  * COMPCODEFLAGS end address must be set to file system start
369  * (FIRST_ADDR)
370  */
371 
372 /* Module unique flash parameters */
373 #ifdef SB70
374  /* Flash */
375  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
376  /* Base address */
377  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
378  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
379 
380 #elif defined SB70B
381  /* Flash */
382  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
383  /* Base address */
384  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
385  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
386 
387 #elif defined SB70LC
388  /* Flash */
389  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
390  /* Base address */
391  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
392  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
393 
394 #elif defined MOD5270
395  /* Flash */
396  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
397  /* Base address */
398  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
399  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
400 
401 #elif defined MOD5234
402  /* Flash */
403  #define NB_FACTORY_FLASH_2MB_16KB_SECTORS ( 1 )
404  /* Base address */
405  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
406  /* COMPCODEFLAGS = 0xFFC08000 0xFFD80000 */
407 
408 #elif defined MOD5282
409  /* Flash */
410  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
411  /* Base address */
412  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
413  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
414 
415 #elif defined CB34EX
416  /* Flash */
417  #define NB_FACTORY_FLASH_2MB_16KB_SECTORS ( 1 )
418  /* Base address */
419  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
420  /* COMPCODEFLAGS = 0xFFC08000 0xFFD80000 */
421 
422 #elif defined MOD5272
423  /* Flash */
424  #define NB_FACTORY_FLASH_2MB_16KB_SECTORS ( 1 )
425  /* Base address */
426  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
427  /* COMPCODEFLAGS = 0xFFC08000 0xFFD80000 */
428 
429 #elif defined SB72
430  /* Flash */
431  #define NB_FACTORY_FLASH_500KB_1KB_SECTORS ( 1 )
432  /* Base address */
433  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
434  /* COMPCODEFLAGS = 0xFFC08000 0xFFC70000 */
435 
436 #elif defined SB72EX
437  /* Flash */
438  #define NB_FACTORY_FLASH_2MB_16KB_SECTORS ( 1 )
439  /* Base address */
440  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
441  /* COMPCODEFLAGS = 0xFFC08000 0xFFD80000 */
442 
443 #elif defined SB700EX
444  /* Flash */
445  #define NB_FACTORY_FLASH_2MB_16KB_SECTORS ( 1 )
446  /* Base address */
447  #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 )
448  /* COMPCODEFLAGS = 0xFFC08000 0xFFD80000 */
449 
450 #elif defined SB800EX
451  /* Flash */
452  #define NB_FACTORY_FLASH_SPI_8MB_4KB_SECTORS ( 1 )
453  /* Base address */
454  // #define NB_FACTORY_FS_FLASHBASE ( 0xFFC00000 ) // not used for spi flash
455 /* COMPCODEFLAGS = 0x00004000 0x007F0000 */
456 
457 #elif defined NANO54415
458  /* Flash */
459  #define NB_FACTORY_FLASH_SPI_8MB_4KB_SECTORS ( 1 )
460  /* Base address */
461  //#define NB_FACTORY_FS_FLASHBASE ( 0x040000 ) // not used for spi flash
462 /* COMPCODEFLAGS = 0x00004000 0x007F0000 */
463 
464 #elif defined PK70
465  /* Flash */
466  #define NB_FACTORY_FLASH_4MB_64KB_SECTORS ( 1 )
467  /* Base address */
468  #define NB_FACTORY_FS_FLASHBASE ( 0xFF800000 )
469  /* COMPCODEFLAGS = 0xFF830000 0xFFB80000 */
470 
471 #else
472  #error Module not supported
473 #endif
474 
475 #if (WIFI_INSTALLED)
476 #define SYSTEM_CONFIG_RECORD_KEY_PSK_MAX_SIZE SYSTEM_CONFIG_RECORD_WPA_PSK_SIZE_MAX
477 #endif
478 
479 
480 #endif /* #ifdef _NB_FACTORY_H_ */
481