NetBurner 3.1
SSL/VerifyPeerEffs/src/nbfactory.h
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
5 #ifndef _NB_FACTORY_H_
6 #define _NB_FACTORY_H_
7 
8 /*
9  ******************************************************************************
10  *
11  * Factory defaults for this factory application
12  *
13  ******************************************************************************
14  */
15 /* Configuration verify key (increment if data changed, added, reorganized) */
16 #define NB_FACTORY_VERIFY_KEY (0x7E545085)
17 /* STD-EFFS verify key (increment to format file system, required for 1.6-1.9 STD EFFS Upgrade) */
18 #define STD_EFFS_VERIFY_KEY (0x15A58101)
19 
20 /* Version VV.NN.vvvv ( 0xVVNNvvvv ), string must match constant */
21 #define NB_FACTORY_DEFAULTS_VERSION (DWORD)(0x01000000)
22 #define NB_FACTORY_DEFAULTS_VERSION_STRING "01.00.0000"
23 
24 /* Module Base Name */
25 #if defined MOD5441X
26 #define NB_FACTORY_MODULE_BASE_NAME "MOD5441X"
27 #elif defined NANO54415
28 #define NB_FACTORY_MODULE_BASE_NAME "NANO54415"
29 #elif defined MODM7AE70
30 #define NB_FACTORY_MODULE_BASE_NAME "MODM7AE70"
31 #else
32 #error Module not supported
33 #endif
34 
35 /* Module Description */
36 #define NB_FACTORY_BASE_DESC "SSL/TLS"
37 
38 /* Feature Name and Description */
39 #define NB_FACTORY_FEATURE_NAME "SX"
40 #define NB_FACTORY_FEATURE_DESC "Verify Peer Effs Example"
41 
42 /* SSL */
43 #define NB_FACTORY_INCLUDE_SSL (1)
44 
45 /* SSL */
46 #define NB_FACTORY_SSL_PERMANENT_DESC_DEFAULT "NetBurner Library Default "
47 #define NB_FACTORY_SSL_INCLUDED_DESC_DEFAULT "Default "
48 #define NB_FACTORY_SSL_INSTALLED_DESC_DEFAULT "User Installed "
49 
50 #define NB_FACTORY_SSL_FILE_NAME_CERT "cert.crt"
51 #define NB_FACTORY_SSL_FILE_NAME_KEY "cert.key"
52 
53 /* DHCP timeout */
54 #define NB_FACTORY_DHCP_TIMEOUT_IN_TICKS (10 * TICKS_PER_SECOND)
55 
56 /*
57  * Maximum size of certificate or key files in bytes
58  * Must the maximum of
59  * SERIAL_BURNER_CERTIFICATE_SIZE_MAX
60  * SERIAL_BURNER_RSA_KEY_SIZE_MAX
61  * SERIAL_BURNER_DSA_KEY_SIZE_MAX
62  */
63 #define NB_FACTORY_FILE_SIZE_MAXIMUM (5 * 1024)
64 
65 /*
66  * On-chip file system EFFS-STD
67  * COMPCODEFLAGS end address must be set to file system start
68  * (FIRST_ADDR)
69  */
70 
71 /* Module unique flash parameters */
72 
73 #if defined MOD5441X
74 /* Flash */
75 #define NB_FACTORY_FLASH_32MB_128KB_SECTORS (1)
76 /* Base address */
77 #define NB_FACTORY_FS_FLASHBASE (0xC0000000)
78 /* COMPCODEFLAGS = 0xC0040000 0xC1EC0000 */
79 
80 #elif defined NANO54415
81 /* Flash */
82 #define NB_FACTORY_FLASH_SPI_8MB_4KB_SECTORS (1)
83 /* Base address */
84 //#define NB_FACTORY_FS_FLASHBASE ( 0x040000 ) // not used for spi flash
85 /* COMPCODEFLAGS = 0x7F0000 0x040000 */
86 
87 #elif defined MODM7AE70
88 /* Flash */
89 #define NB_FACTORY_FLASH_2MB_8KB_SECTORS (1)
90 /* Base address */
91 #define NB_FACTORY_FS_FLASHBASE (0x00400000)
92 /* COMPCODEFLAGS = 0x00406004 0x005A0000 */
93 
94 #else
95 #error Module not supported
96 #endif
97 
98 #endif /* #ifdef _NB_FACTORY_H_ */