NetBurner 3.1
SSL/HttpsUploadCert/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 (uint32_t)(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 SB800EX
30 #define NB_FACTORY_MODULE_BASE_NAME "SB800EX"
31 #elif defined MODM7AE70
32 #define NB_FACTORY_MODULE_BASE_NAME "MODM7AE70"
33 #else
34 #error Module not supported
35 #endif
36 
37 /* Module Description */
38 #define NB_FACTORY_BASE_DESC "SSL/TLS"
39 
40 /* Feature Name and Description */
41 #define NB_FACTORY_FEATURE_NAME "SX"
42 #define NB_FACTORY_FEATURE_DESC "Certificate Upload Example"
43 
44 /* SSL */
45 #define NB_FACTORY_SSL_PERMANENT_DESC_DEFAULT "NetBurner Library Default "
46 #define NB_FACTORY_SSL_INCLUDED_DESC_DEFAULT "Default "
47 #define NB_FACTORY_SSL_INSTALLED_DESC_DEFAULT "User Installed "
48 
49 #define NB_FACTORY_SSL_FILE_NAME_CERT "cert.crt"
50 #define NB_FACTORY_SSL_FILE_NAME_KEY "cert.key"
51 
52 /* DHCP timeout */
53 #define NB_FACTORY_DHCP_TIMEOUT_IN_TICKS (10 * TICKS_PER_SECOND)
54 
55 /*
56  * Maximum size of certificate or key files in bytes
57  * Must the maximum of
58  * SERIAL_BURNER_CERTIFICATE_SIZE_MAX
59  * SERIAL_BURNER_RSA_KEY_SIZE_MAX
60  * SERIAL_BURNER_DSA_KEY_SIZE_MAX
61  */
62 #define NB_FACTORY_FILE_SIZE_MAXIMUM (4 * 1024)
63 
64 /*
65  * On-chip file system EFFS-STD
66  * COMPCODEFLAGS end address must be set to file system start
67  * (FIRST_ADDR)
68  */
69 
70 /* Module unique flash parameters */
71 #if defined MOD5441X
72 /* Flash */
73 #define NB_FACTORY_FLASH_32MB_128KB_SECTORS (1)
74 /* Base address */
75 #define NB_FACTORY_FS_FLASHBASE (0xC0000000)
76 /* COMPCODEFLAGS = 0xC0040000 0xC1EC0000 */
77 
78 #elif defined NANO54415
79 /* Flash */
80 #define NB_FACTORY_FLASH_SPI_8MB_4KB_SECTORS (1)
81 /* Base address */
82 //#define NB_FACTORY_FS_FLASHBASE ( 0x040000 ) // not used for spi flash
83 /* COMPCODEFLAGS = 0x7F0000 0x040000 */
84 
85 #elif defined MODM7AE70
86 /* Flash */
87 #define NB_FACTORY_FLASH_2MB_8KB_SECTORS (1)
88 /* Base address */
89 #define NB_FACTORY_FS_FLASHBASE (0x00400000)
90 /* COMPCODEFLAGS = 0x00406004 0x005A0000 */
91 
92 #else
93 #error Module not supported
94 #endif
95 
96 #endif /* #ifdef _NB_FACTORY_H_ */