Forum: Mikrocontroller und Digitale Elektronik TCP/IP Stack Micrchip EEPROM Includen


von sven (Gast)


Lesenswert?

Hallo zusammen, Hallo Stampede :),

ich habe für mein eigenes Board den TCP IP STack von Microchip 
inkludiert und das funktioniert soweit auch. Bis dato habe ich das 
Image.s immer im internen Speicher abgelegt.

Jetzt würde ich gerne mein EEPROM nutzen.

d.h. in der TCPIP MRF.h
1
#define MPFS_USE_EEPROM

In der HWP EX16.h die SPI Leitungen auf meine gegebene Hardware matchen 
(SCK1, SDI1, Chip select usw.)

Beim compilieren kommt nun folgender Fehler:
"You_cannot_call_the_XEEInit_function_without_defining_EEPROM_CS_TRIS_in 
_HardwareProfile_h_first(void);"

mit dem folgenden Hinweis:
"// If you get any of these linker errors, it means that you either have 
an error in your HardwareProfile.h or TCPIPConfig.h definitions.  The 
code is attempting to call a function that can't possibly work because 
you
have not specified what pins and SPI module the physical SPI EEPROM chip
is connected to.  Alternatively, if you don't have an SPI EERPOM chip, 
it
means you have enabled a stack feature that requires SPI EEPROM 
hardware.
In this case, you need to edit TCPIPConfig.h and disable this stack
feature.  The linker error tells you which object file this error was
generated from.  It should be a clue as to what feature you need to
disable."

Ich vermute also dass ich noch etwas in der TCP.h aus- bzw. 
einkommentieren muss.

Vielleicht hat jemand eine Idee:

Meine TCP.h
1
 * V5.36   ---- STACK_USE_MPFS support has been removed 
2
 ********************************************************************/
3
#ifndef __TCPIPCONFIG_H
4
#define __TCPIPCONFIG_H
5
6
#include "GenericTypeDefs.h"
7
#include "Compiler.h"
8
#define GENERATED_BY_TCPIPCONFIG "Version 1.0.3383.23374"
9
10
// =======================================================================
11
//   Application Options
12
// =======================================================================
13
14
// Note: For the PIC24FJ128GA010, due to code memory limitations, the following items
15
//       must be commented out: STACK_USE_ZEROCONF_LINK_LOCAL, STACK_USE_DNS_SERVER,
16
//       STACK_USE_NBNS, STACK_USE_ANNOUNCE, STACK_USE_ICMP_CLIENT, STACK_USE_REBOOT_SERVER
17
18
/* Application Level Module Selection
19
 *   Uncomment or comment the following lines to enable or
20
 *   disabled the following high-level application modules.
21
 *
22
 * If certain compilations are enabled (eg STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE), 
23
 * check whether the files (eg GenericTCPClient.c) are located in folder (eg \TCPIP\WiFi EZConfig).
24
 * You may need to copy such files from the Demo App or WiFi Console folder.
25
 *
26
 */
27
#define STACK_USE_UART          // Application demo using UART for IP address display and stack configuration
28
//#define STACK_USE_UART2TCP_BRIDGE    // UART to TCP Bridge application example
29
//#define STACK_USE_IP_GLEANING
30
#define STACK_USE_ICMP_SERVER      // Ping query and response capability
31
//#define STACK_USE_ICMP_CLIENT      // Ping transmission capability
32
#define STACK_USE_HTTP2_SERVER      // New HTTP server with POST, Cookies, Authentication, etc.
33
//#define STACK_USE_SSL_SERVER      // SSL server socket support (Requires SW300052)
34
//#define STACK_USE_SSL_CLIENT      // SSL client socket support (Requires SW300052)
35
//#define STACK_USE_AUTO_IP               // Dynamic link-layer IP address automatic configuration protocol
36
#define STACK_USE_DHCP_CLIENT      // Dynamic Host Configuration Protocol client for obtaining IP address and other parameters
37
#define STACK_USE_DHCP_SERVER      // Single host DHCP server
38
//#define STACK_USE_FTP_SERVER      // File Transfer Protocol (old)
39
//#define STACK_USE_SMTP_CLIENT      // Simple Mail Transfer Protocol for sending email
40
//#define STACK_USE_SNMP_SERVER      // Simple Network Management Protocol v2C Community Agent
41
//#define STACK_USE_SNMPV3_SERVER      // Simple Network Management Protocol v3 Agent
42
//#define STACK_USE_TFTP_CLIENT      // Trivial File Transfer Protocol client
43
//#define STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE  // HTTP Client example in GenericTCPClient.c. If using EZConfig, need to copy this file from Demo App or WiFi Console.
44
//#define STACK_USE_GENERIC_TCP_SERVER_EXAMPLE  // ToUpper server example in GenericTCPServer.c. If using EZConfig, need to copy this file from Demo App or WiFi Console.
45
//#define STACK_USE_TELNET_SERVER      // Telnet server
46
//#define STACK_USE_ANNOUNCE        // Microchip Embedded Ethernet Device Discoverer server/client
47
#define STACK_USE_DNS          // Domain Name Service Client for resolving hostname strings to IP addresses
48
//#define STACK_USE_DNS_SERVER      // Domain Name Service Server for redirection to the local device
49
//#define STACK_USE_NBNS          // NetBIOS Name Service Server for repsonding to NBNS hostname broadcast queries
50
//#define STACK_USE_REBOOT_SERVER      // Module for resetting this PIC remotely.  Primarily useful for a Bootloader.
51
//#define STACK_USE_SNTP_CLIENT      // Simple Network Time Protocol for obtaining current date/time from Internet
52
//#define STACK_USE_UDP_PERFORMANCE_TEST  // Module for testing UDP TX performance characteristics.  NOTE: Enabling this will cause a huge amount of UDP broadcast packets to flood your network on the discard port.  Use care when enabling this on production networks, especially with VPNs (could tunnel broadcast traffic across a limited bandwidth connection).
53
//#define STACK_USE_TCP_PERFORMANCE_TEST  // Module for testing TCP TX performance characteristics
54
//#define STACK_USE_DYNAMICDNS_CLIENT    // Dynamic DNS client updater module
55
//#define STACK_USE_BERKELEY_API      // Berekely Sockets APIs are available
56
57
//#define STACK_USE_ZEROCONF_LINK_LOCAL  // Zeroconf IPv4 Link-Local Addressing
58
#define STACK_USE_ZEROCONF_MDNS_SD    // Zeroconf mDNS and mDNS service discovery
59
#if defined(CFG_INCLUDE_EX16_MRF24WG) && defined(__C32__)
60
//#define STACK_USE_TCP_MOBILE_APP_SERVER  // This is valid only with Explorer16 eval board and MRF24WG Wi-Fi module
61
#ifdef STACK_USE_TCP_MOBILE_APP_SERVER
62
#ifndef STACK_USE_ZEROCONF_LINK_LOCAL && !defined(__PIC24FJ128GA010__)
63
//#define STACK_USE_ZEROCONF_LINK_LOCAL  // Zeroconf IPv4 Link-Local Addressing
64
#endif
65
#ifndef STACK_USE_ZEROCONF_MDNS_SD
66
#define STACK_USE_ZEROCONF_MDNS_SD    // Zeroconf mDNS and mDNS service discovery
67
#endif
68
#endif /* STACK_USE_TCP_MOBILE_APP_SERVER */
69
#endif  /* CFG_INCLUDE_EX16_MRF24WG  */
70
71
// =======================================================================
72
//   Data Storage Options
73
// =======================================================================
74
75
/* MPFS Configuration
76
 *   MPFS is automatically included when required for other
77
 *   applications.  If your custom application requires it
78
 *   otherwise, uncomment the appropriate selection.
79
 */
80
 #define STACK_USE_MPFS2
81
82
/* MPFS Storage Location
83
 *   If html pages are stored in internal program memory,
84
 *   comment both MPFS_USE_EEPROM and MPFS_USE_SPI_FLASH, then
85
 *   include an MPFS image (.c or .s file) in the project.
86
 *   If html pages are stored in external memory, uncomment the
87
 *   appropriate definition.
88
 *
89
 *   Supported serial flash parts include the SST25VFxxxB series.
90
 */
91
#define MPFS_USE_EEPROM
92
//#define MPFS_USE_SPI_FLASH
93
94
/* EEPROM Addressing Selection
95
 *   If using the 1Mbit EEPROM, uncomment this line
96
 */
97
//#define USE_EEPROM_25LC1024
98
99
/* EEPROM Reserved Area
100
 *   Number of EEPROM bytes to be reserved before MPFS storage starts.
101
 *   These bytes host application configurations such as IP Address,
102
 *   MAC Address, and any other required variables.
103
 *
104
 *   For MPFS Classic, this setting must match the Reserved setting
105
 *   on the Advanced Settings page of the MPFS2 Utility.
106
 */
107
#define MPFS_RESERVE_BLOCK        (205ul)
108
109
/* MPFS File Handles
110
 *   Maximum number of simultaneously open MPFS2 files.
111
 *   For MPFS Classic, this has no effect.
112
 */
113
#define MAX_MPFS_HANDLES        (7ul)
114
115
116
// =======================================================================
117
//   Network Addressing Options
118
// =======================================================================
119
120
/* Default Network Configuration
121
 *   These settings are only used if data is not found in EEPROM.
122
 *   To clear EEPROM, hold BUTTON0, reset the board, and continue
123
 *   holding until the LEDs flash.  Release, and reset again.
124
 */
125
#define MY_DEFAULT_HOST_NAME      "MCHPBOARD"
126
127
#define MY_DEFAULT_MAC_BYTE1            (0x00)  // Use the default of 00-04-A3-00-00-00
128
#define MY_DEFAULT_MAC_BYTE2            (0x04)  // if using an ENCX24J600, MRF24W, or
129
#define MY_DEFAULT_MAC_BYTE3            (0xA3)  // PIC32MX6XX/7XX internal Ethernet 
130
#define MY_DEFAULT_MAC_BYTE4            (0x00)  // controller and wish to use the 
131
#define MY_DEFAULT_MAC_BYTE5            (0x00)  // internal factory programmed MAC
132
#define MY_DEFAULT_MAC_BYTE6            (0x00)  // address instead.
133
134
#define MY_DEFAULT_IP_ADDR_BYTE1        (169ul)
135
#define MY_DEFAULT_IP_ADDR_BYTE2        (254ul)
136
#define MY_DEFAULT_IP_ADDR_BYTE3        (1ul)
137
#define MY_DEFAULT_IP_ADDR_BYTE4        (1ul)
138
139
#define MY_DEFAULT_MASK_BYTE1           (255ul)
140
#define MY_DEFAULT_MASK_BYTE2           (255ul)
141
#define MY_DEFAULT_MASK_BYTE3           (0ul)
142
#define MY_DEFAULT_MASK_BYTE4           (0ul)
143
144
#define MY_DEFAULT_GATE_BYTE1           (169ul)
145
#define MY_DEFAULT_GATE_BYTE2           (254ul)
146
#define MY_DEFAULT_GATE_BYTE3           (1ul)
147
#define MY_DEFAULT_GATE_BYTE4           (1ul)
148
149
#define MY_DEFAULT_PRIMARY_DNS_BYTE1  (169ul)
150
#define MY_DEFAULT_PRIMARY_DNS_BYTE2  (254ul)
151
#define MY_DEFAULT_PRIMARY_DNS_BYTE3  (1ul)
152
#define MY_DEFAULT_PRIMARY_DNS_BYTE4  (1ul)
153
154
#define MY_DEFAULT_SECONDARY_DNS_BYTE1  (0ul)
155
#define MY_DEFAULT_SECONDARY_DNS_BYTE2  (0ul)
156
#define MY_DEFAULT_SECONDARY_DNS_BYTE3  (0ul)
157
#define MY_DEFAULT_SECONDARY_DNS_BYTE4  (0ul)
158
159
// =======================================================================
160
//   PIC32MX7XX/6XX MAC Layer Options
161
//   If not using a PIC32MX7XX/6XX device, ignore this section.
162
// =======================================================================
163
#define  ETH_CFG_LINK      0    // set to 1 if you need to config the link to specific following parameters
164
                    // otherwise the default connection will be attempted
165
                    // depending on the selected PHY
166
  #define  ETH_CFG_AUTO    1    // use auto negotiation
167
  #define  ETH_CFG_10      1    // use/advertise 10 Mbps capability
168
  #define  ETH_CFG_100      1    // use/advertise 100 Mbps capability
169
  #define  ETH_CFG_HDUPLEX    1    // use/advertise half duplex capability
170
  #define  ETH_CFG_FDUPLEX    1    // use/advertise full duplex capability
171
  #define  ETH_CFG_AUTO_MDIX  1    // use/advertise auto MDIX capability
172
  #define  ETH_CFG_SWAP_MDIX  1    // use swapped MDIX. else normal MDIX
173
174
#define EMAC_TX_DESCRIPTORS    2    // number of the TX descriptors to be created
175
#define EMAC_RX_DESCRIPTORS    8    // number of the RX descriptors and RX buffers to be created
176
177
#define  EMAC_RX_BUFF_SIZE    1536  // size of a RX buffer. should be multiple of 16
178
                    // this is the size of all receive buffers processed by the ETHC
179
                    // The size should be enough to accomodate any network received packet
180
                    // If the packets are larger, they will have to take multiple RX buffers
181
                    // The current implementation does not handle this situation right now and the packet is discarded.
182
183
184
// =======================================================================
185
//   Transport Layer Options
186
// =======================================================================
187
188
/* Transport Layer Configuration
189
 *   The following low level modules are automatically enabled
190
 *   based on module selections above.  If your custom module
191
 *   requires them otherwise, enable them here.
192
 */
193
#define STACK_USE_TCP
194
#define STACK_USE_UDP
195
196
/* Client Mode Configuration
197
 *   Uncomment following line if this stack will be used in CLIENT
198
 *   mode.  In CLIENT mode, some functions specific to client operation
199
 *   are enabled.
200
 */
201
#if defined(STACK_USE_DHCP_CLIENT) || defined(STACK_USE_ICMP_CLIENT)
202
#define STACK_CLIENT_MODE
203
#endif
204
205
/* TCP Socket Memory Allocation
206
 *   TCP needs memory to buffer incoming and outgoing data.  The
207
 *   amount and medium of storage can be allocated on a per-socket
208
 *   basis using the example below as a guide.
209
 */
210
  // Allocate how much total RAM (in bytes) you want to allocate
211
  // for use by your TCP TCBs, RX FIFOs, and TX FIFOs.
212
  #define TCP_ETH_RAM_SIZE          (8192ul)
213
  #define TCP_PIC_RAM_SIZE          (0ul)
214
  #define TCP_SPI_RAM_SIZE          (0ul)
215
  #define TCP_SPI_RAM_BASE_ADDRESS      (0x00)
216
217
  // Define names of socket types
218
  #define TCP_SOCKET_TYPES
219
    #define TCP_PURPOSE_GENERIC_TCP_CLIENT 0
220
    #define TCP_PURPOSE_GENERIC_TCP_SERVER 1
221
    #define TCP_PURPOSE_TELNET 2
222
    #define TCP_PURPOSE_FTP_COMMAND 3
223
    #define TCP_PURPOSE_FTP_DATA 4
224
    #define TCP_PURPOSE_TCP_PERFORMANCE_TX 5
225
    #define TCP_PURPOSE_TCP_PERFORMANCE_RX 6
226
    #define TCP_PURPOSE_UART_2_TCP_BRIDGE 7
227
    #define TCP_PURPOSE_HTTP_SERVER 8
228
    #define TCP_PURPOSE_DEFAULT 9
229
    #define TCP_PURPOSE_BERKELEY_SERVER 10
230
    #define TCP_PURPOSE_BERKELEY_CLIENT 11
231
    #define TCP_PURPOSE_MOBILE_APP_SERVER 12
232
  #define END_OF_TCP_SOCKET_TYPES
233
234
  #if defined(__TCP_C)
235
    // Define what types of sockets are needed, how many of
236
    // each to include, where their TCB, TX FIFO, and RX FIFO
237
    // should be stored, and how big the RX and TX FIFOs should
238
    // be.  Making this initializer bigger or smaller defines
239
    // how many total TCP sockets are available.
240
    //
241
    // Each socket requires up to 56 bytes of PIC RAM and
242
    // 48+(TX FIFO size)+(RX FIFO size) bytes of TCP_*_RAM each.
243
    //
244
    // Note: The RX FIFO must be at least 1 byte in order to
245
    // receive SYN and FIN messages required by TCP.  The TX
246
    // FIFO can be zero if desired.
247
    #define TCP_CONFIGURATION
248
    ROM struct
249
    {
250
      BYTE vSocketPurpose;
251
      BYTE vMemoryMedium;
252
      WORD wTXBufferSize;
253
      WORD wRXBufferSize;
254
    } TCPSocketInitializer[] =
255
    {
256
      {TCP_PURPOSE_GENERIC_TCP_CLIENT, TCP_ETH_RAM, 1024, 20},
257
      {TCP_PURPOSE_GENERIC_TCP_SERVER, TCP_ETH_RAM, 20, 1024},
258
      //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
259
      //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
260
      //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
261
      //{TCP_PURPOSE_FTP_COMMAND, TCP_ETH_RAM, 100, 40},
262
      //{TCP_PURPOSE_FTP_DATA, TCP_ETH_RAM, 0, 128},
263
      //{TCP_PURPOSE_TCP_PERFORMANCE_TX, TCP_ETH_RAM, 200, 1},
264
      //{TCP_PURPOSE_TCP_PERFORMANCE_RX, TCP_ETH_RAM, 40, 1500},
265
      //{TCP_PURPOSE_UART_2_TCP_BRIDGE, TCP_ETH_RAM, 256, 256},
266
      {TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 1000, 1000},
267
      {TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 1000, 1000},
268
#if defined(STACK_USE_TCP_MOBILE_APP_SERVER)
269
      {TCP_PURPOSE_MOBILE_APP_SERVER, TCP_ETH_RAM, 1000, 1000},
270
#endif
271
      //{TCP_PURPOSE_DEFAULT, TCP_ETH_RAM, 1000, 1000},
272
      //{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
273
      //{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
274
      //{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
275
      //{TCP_PURPOSE_BERKELEY_CLIENT, TCP_ETH_RAM, 125, 100},
276
    };
277
    #define END_OF_TCP_CONFIGURATION
278
  #endif
279
280
/* UDP Socket Configuration
281
 *   Define the maximum number of available UDP Sockets, and whether
282
 *   or not to include a checksum on packets being transmitted.
283
 */
284
#define MAX_UDP_SOCKETS     (8u)
285
//#define UDP_USE_TX_CHECKSUM    // This slows UDP TX performance by nearly 50%, except when using the ENCX24J600 or PIC32MX6XX/7XX, which have a super fast DMA and incurs virtually no speed pentalty.
286
287
288
/* Berkeley API Sockets Configuration
289
 *   Note that each Berkeley socket internally uses one TCP or UDP socket
290
 *   defined by MAX_UDP_SOCKETS and the TCPSocketInitializer[] array.
291
 *   Therefore, this number MUST be less than or equal to MAX_UDP_SOCKETS + the
292
 *   number of TCP sockets defined by the TCPSocketInitializer[] array
293
 *   (i.e. sizeof(TCPSocketInitializer)/sizeof(TCPSocketInitializer[0])).
294
 *   This define has no effect if STACK_USE_BERKELEY_API is not defined and
295
 *   Berkeley Sockets are disabled.  Set this value as low as your application
296
 *   requires to avoid waisting RAM.
297
 */
298
#define BSD_SOCKET_COUNT (5u)
299
300
301
// =======================================================================
302
//   Application-Specific Options
303
// =======================================================================
304
305
// -- HTTP2 Server options -----------------------------------------------
306
307
  // Maximum numbers of simultaneous HTTP connections allowed.
308
  // Each connection consumes 2 bytes of RAM and a TCP socket
309
  #define MAX_HTTP_CONNECTIONS  (2u)
310
311
  // Optional setting to use PIC RAM instead of Ethernet/Wi-Fi RAM for
312
  // storing HTTP Connection Context variables (HTTP_CONN structure for each 
313
  // HTTP connection).  Undefining this macro results in the Ethernet/Wi-Fi 
314
  // RAM being used (minimum PIC RAM usage, lower performance).  Defining 
315
  // this macro results in PIC RAM getting used (higher performance, but uses 
316
  // PIC RAM).  This option should not be enabled on PIC18 devices.  The 
317
  // performance increase of having this option defined is only apparent when 
318
  // the HTTP server is servicing multiple connections simultaneously.
319
  //#define HTTP_SAVE_CONTEXT_IN_PIC_RAM
320
321
  // Indicate what file to serve when no specific one is requested
322
  #define HTTP_DEFAULT_FILE    "index.htm"
323
  #define HTTPS_DEFAULT_FILE    "index.htm"
324
  #define HTTP_DEFAULT_LEN    (10u)    // For buffer overrun protection.
325
                        // Set to longest length of above two strings.
326
327
  // Configure MPFS over HTTP updating
328
  // Comment this line to disable updating via HTTP
329
  #define HTTP_MPFS_UPLOAD    "mpfsupload"
330
  //#define HTTP_MPFS_UPLOAD_REQUIRES_AUTH  // Require password for MPFS uploads
331
    // Certain firewall and router combinations cause the MPFS2 Utility to fail
332
    // when uploading.  If this happens, comment out this definition.
333
334
  // Define which HTTP modules to use
335
  // If not using a specific module, comment it to save resources
336
  #define HTTP_USE_POST          // Enable POST support
337
  //#define HTTP_USE_COOKIES        // Enable cookie support
338
  //#define HTTP_USE_AUTHENTICATION      // Enable basic authentication support
339
340
  //#define HTTP_NO_AUTH_WITHOUT_SSL    // Uncomment to require SSL before requesting a password
341
342
    // Define the listening port for the HTTP server
343
    #define HTTP_PORT               (80u)
344
  
345
    // Define the listening port for the HTTPS server (if STACK_USE_SSL_SERVER is enabled)
346
  #define HTTPS_PORT        (443u)
347
  
348
    // Define the maximum data length for reading cookie and GET/POST arguments (bytes)
349
  #define HTTP_MAX_DATA_LEN    (100u)
350
  
351
    // Define the minimum number of bytes free in the TX FIFO before executing callbacks
352
  #define HTTP_MIN_CALLBACK_FREE  (16u)
353
354
  //#define STACK_USE_HTTP_APP_RECONFIG    // Use the AppConfig web page in the Demo App (~2.5kb ROM, ~0b RAM)
355
  //#define STACK_USE_HTTP_MD5_DEMO      // Use the MD5 Demo web page (~5kb ROM, ~160b RAM)
356
  //#define STACK_USE_HTTP_EMAIL_DEMO    // Use the e-mail demo web page
357
358
// -- SSL Options --------------------------------------------------------
359
360
  #define MAX_SSL_CONNECTIONS    (2ul)  // Maximum connections via SSL
361
  #define MAX_SSL_SESSIONS    (2ul)  // Max # of cached SSL sessions
362
  #define MAX_SSL_BUFFERS      (4ul)  // Max # of SSL buffers (2 per socket)
363
  #define MAX_SSL_HASHES      (5ul)  // Max # of SSL hashes  (2 per, plus 1 to avoid deadlock)
364
365
  // Bits in SSL RSA key.  This parameter is used for SSL sever
366
  // connections only.  The only valid value is 512 bits (768 and 1024
367
  // bits do not work at this time).  Note, however, that SSL client
368
  // operations do currently work up to 1024 bit RSA key length.
369
  #define SSL_RSA_KEY_SIZE    (512ul)
370
371
372
// -- Telnet Options -----------------------------------------------------
373
374
  // Number of simultaneously allowed Telnet sessions.  Note that you
375
  // must have an equal number of TCP_PURPOSE_TELNET type TCP sockets
376
  // declared in the TCPSocketInitializer[] array above for multiple
377
  // connections to work.  If fewer sockets are available than this
378
  // definition, then the the lesser of the two quantities will be the
379
  // actual limit.
380
  #define MAX_TELNET_CONNECTIONS  (1u)
381
382
  // Default local listening port for the Telnet server.  Port 23 is the
383
  // protocol default.
384
  #define TELNET_PORT        23
385
386
  // Default local listening port for the Telnet server when SSL secured.
387
  // Port 992 is the telnets protocol default.
388
  #define TELNETS_PORT      992
389
390
  // Force all connecting clients to be SSL secured and connected via
391
  // TELNETS_PORT.  Connections on port TELNET_PORT will be ignored.  If
392
  // STACK_USE_SSL_SERVER is undefined, this entire setting is ignored
393
  // (server will accept unsecured connections on TELNET_PORT and won't even
394
  // listen on TELNETS_PORT).
395
  //#define TELNET_REJECT_UNSECURED
396
397
  // Default username and password required to login to the Telnet server.
398
  #define TELNET_USERNAME      "admin"
399
  #define TELNET_PASSWORD      "microchip"
400
401
402
// -- SNMP Options -------------------------------------------------------
403
404
  // Comment following line if SNMP TRAP support is needed
405
  //#define SNMP_TRAP_DISABLED
406
407
  //#define SNMP_STACK_USE_V2_TRAP
408
  #if defined(STACK_USE_SNMPV3_SERVER)
409
    #define SNMP_V1_V2_TRAP_WITH_SNMPV3
410
  #endif
411
412
  // This is the maximum length for community string.
413
  // Application must ensure that this length is observed.
414
  // SNMP module adds one byte extra after SNMP_COMMUNITY_MAX_LEN
415
  // for adding '\0' NULL character.
416
  #define SNMP_COMMUNITY_MAX_LEN    (8u)
417
  #define SNMP_MAX_COMMUNITY_SUPPORT  (3u)
418
  #define NOTIFY_COMMUNITY_LEN    (SNMP_COMMUNITY_MAX_LEN)
419
420
  // Default SNMPv2C community names.  These can be overridden at run time if
421
  // alternate strings are present in external EEPROM or Flash (actual
422
  // strings are stored in AppConfig.readCommunity[] and
423
  // AppConfig.writeCommunity[] arrays).  These strings are case sensitive.
424
  // An empty string means disabled (not matchable).
425
  // For application security, these default community names should not be
426
  // used, but should all be disabled to force the end user to select unique
427
  // community names.  These defaults are provided only to make it easier to
428
  // start development.  Specifying more strings than
429
  // SNMP_MAX_COMMUNITY_SUPPORT will result in the later strings being
430
  // ignored (but still wasting program memory).  Specifying fewer strings is
431
  // legal, as long as at least one is present.  A string larger than
432
  // SNMP_COMMUNITY_MAX_LEN bytes will be ignored.
433
  #define SNMP_READ_COMMUNITIES    {"public", "read", ""}
434
  #define END_OF_SNMP_READ_COMMUNITIES
435
  #define SNMP_WRITE_COMMUNITIES       {"private", "write", "public"}
436
  #define END_OF_SNMP_WRITE_COMMUNITIES
437
#endif

von Dummschwaetzer (Gast)


Lesenswert?

In this case, you need to edit TCPIPConfig.h and disable this stack
feature.  The linker error tells you which object file this error was
generated from.  It should be a clue as to what feature you need to
disable."

von sven (Gast)


Lesenswert?

Dummschwaetzer schrieb:
> In this case, you need to edit TCPIPConfig.h and disable this
> stack
> feature.  The linker error tells you which object file this error was
> generated from.  It should be a clue as to what feature you need to
> disable."


Danke :)
Der Linker Error ist ja

"You_cannot_call_the_XEEInit_function_without_defining_EEPROM_CS_TRIS_in 
_HardwareProfile_h_first"

Leider sagt mir das nichts über das Object file aus oder was auch immer 
ich in der TCPIP.h ändern muss.

Das EEPROM_CS_TRIS et. habe ich ja bereits in der HWP EX16_MRF24W XC16.h 
definiert!

von sven (Gast)


Lesenswert?

Die HWP EX16_MRF24W XC16.h wird dann auch in der Hardwareprofile.h über
#include "Configs/HWP EX16_MRF24W XC16.h"
inkludiert. Da stehen ja meine ganzen Hardware Deklarationen bzgl. des 
EEPROM Drin. Deswegen verstehe ich die Fehlermeldung nicht ganz!

von Stampede (Gast)


Lesenswert?

Hi,

der Fehler wird von der Datei XEEPROM.h generiert, welche die 
"HardwareProfile.h" einbindet. Die Frage ist nun, welches Hardwareprofil 
wird von "HardwareProfile.h" eingebunden?
"Configs/HWP EX16_MRF24W XC16.h" kann es ja eigentlich nicht sein, da 
sonst das EEPROM_TRIS bekann sein würde. Ebenso macht es eigentlich 
keinen Sinn, das Profil für den Explorer16 auf einem eigenen Board zu 
verwenden.

>>Die HWP EX16_MRF24W XC16.h wird dann auch in der Hardwareprofile.h über
>>#include "Configs/HWP EX16_MRF24W XC16.h"
Sicher?

Gruß
Stampede

von sven (Gast)


Lesenswert?

Hallo Stampede.

Auf dich ist einfach Verlass :)

Ich habe mir halt eine eigene Leiterplatte entwickelt und als 
Grundgerüst das Explorer16 also die HWP EX16_MRF24W XC16.h ausgewählt 
und dann an meine Hardware angeglichen. Wie gesagt läuft der TCP/IP 
Stack auch ohne EEPROM schon mal.

Stampede schrieb:
> Hi,
>
> der Fehler wird von der Datei XEEPROM.h generiert, welche die
> "HardwareProfile.h" einbindet. Die Frage ist nun, welches Hardwareprofil
> wird von "HardwareProfile.h" eingebunden?
> "Configs/HWP EX16_MRF24W XC16.h" kann es ja eigentlich nicht sein...

Doch leider wohl Auszug aus der "HardwareProfile.h":
1
defined(CFG_INCLUDE_EX16_MRF24WB) || defined(CFG_INCLUDE_EX16_MRF24WG)
2
  // DM240001 Explorer 16 board, PIC24FJ128GA010/PIC24FJ256GB110/PIC24FJ256GA110/PIC24FJ256GB210/PIC24HJ256GP610/dsPIC33FJ256GP710/PIC32MX360F512L/PIC32MX460F512L/PIC32MX795F512L/possibly others, AC164136-4 MRF24W Wi-Fi PICtail/PICtail Plus
3
  #if defined(__C30__)
4
    #include "Configs/HWP EX16_MRF24W XC16.h"
5
                
6
  #else
7
    #include "Configs/HWP EX16_MRF24W XC32.h"
8
  #endif
9
        #if defined(CFG_INCLUDE_EX16_MRF24WG)
10
            #define MRF24WG
11
        #endif

Mit <strg> auf die "Configs/HWP EX16_MRF24W XC16.h" komme ich dann 
direkt in die HWP EX16_MRF24W XC16.h, wo ich das EEPROM initialisert 
habe:
1
#if defined MPFS_USE_EEPROM
2
#if defined(__PIC24FJ256GB110__)
3
  // PIC24FJ256GB110 USB PIM has RD12 pin on Explorer 16 schematic 
4
  // remapped and actually connected to PIC24FJ256GB110 pin 90 (RG0).  
5
  #define EEPROM_CS_TRIS    (TRISGbits.TRISG0)
6
  #define EEPROM_CS_IO    (LATGbits.LATG0)
7
#elif defined(__PIC24FJ256GB210__)
8
  // PIC24FJ256GB210 USB PIM has RD12 pin on Explorer 16 schematic 
9
  // remapped and actually connected to PIC24FJ256GB210 pin 90 (RG0) when 
10
  // JP1 on PIM has pins 1-2 shorted (USB).  When JP1 pins 2-3 are shorted 
11
  // (PMP), PIC pin 90 does connect to RD12.  To make the PIM work with 
12
  // either jumper setting, we will drive both RG0 and RD12 simultaneously
13
  // as chip select to the same states.  For an actual application, you'd 
14
  // want to specify only the single necessary pin as this double 
15
  // assignment operation generates inefficient code by the C compiler.
16
  #define EEPROM_CS_TRIS    TRISGbits.TRISG0 = TRISDbits.TRISD12
17
  #define EEPROM_CS_IO    LATGbits.LATG0 = LATDbits.LATD12
18
#else
19
        // so auf Leiterplatte
20
  #define EEPROM_CS_TRIS    (TRISDbits.TRISD13) // CHIPSELECT EE1 an RD13
21
  #define EEPROM_CS_IO    (LATDbits.LATD13)
22
        // so auf Starterkit
23
//  #define EEPROM_CS_TRIS    (TRISDbits.TRISD12)
24
//  #define EEPROM_CS_IO    (LATDbits.LATD12)
25
#endif
26
// ao auf Leiterplatte
27
#define EEPROM_SCK_TRIS    (TRISDbits.TRISD1)  // SCK1 an RD1
28
#define EEPROM_SDI_TRIS    (TRISDbits.TRISD1)  // SDI1 an RD12
29
#define EEPROM_SDO_TRIS    (TRISDbits.TRISD2) // SD01 an RD2
30
#define EEPROM_SPI_IF    (IFS0bits.SPI1IF)
31
#define EEPROM_SSPBUF    (SPI1BUF)
32
#define EEPROM_SPICON1    (SPI1CON1)
33
#define EEPROM_SPICON1bits  (SPI1CON1bits)
34
#define EEPROM_SPICON2    (SPI1CON2)
35
#define EEPROM_SPISTAT    (SPI1STAT)
36
#define EEPROM_SPISTATbits  (SPI1STATbits)


Deswegen ist es ja auch für mich so verwunderlich!!!

von Stampede (Gast)


Lesenswert?

Hallo,

aber das kann ja dann nur noch bedeuten dass "CFG_INCLUDE_EX16_MRF24WB" 
oder "CFG_INCLUDE_EX16_MRF24WG" nicht definiert ist.

von sven (Gast)


Lesenswert?

Es scheint aber definiert zu sein (auch wenn ich nicht sehe wo, sonst 
wäre der folgende Code nach nicht farbig, sondern grau unterlegt und ich 
könnte mit <strg> nicht Configs/HWP EX16_MRF24W XC16.h anklicken:
1
#elif defined(CFG_INCLUDE_EX16_MRF24WB) || defined(CFG_INCLUDE_EX16_MRF24WG)
2
  // DM240001 Explorer 16 board, PIC24FJ128GA010/PIC24FJ256GB110/PIC24FJ256GA110/PIC24FJ256GB210/PIC24HJ256GP610/dsPIC33FJ256GP710/PIC32MX360F512L/PIC32MX460F512L/PIC32MX795F512L/possibly others, AC164136-4 MRF24W Wi-Fi PICtail/PICtail Plus
3
  #if defined(__C30__)
4
    #include "Configs/HWP EX16_MRF24W XC16.h"
5
                
6
  #else
7
    #include "Configs/HWP EX16_MRF24W XC32.h"
8
  #endif
9
        #if defined(CFG_INCLUDE_EX16_MRF24WG)
10
            #define MRF24WG
11
        #endif

Ich hätte viel mehr erwartet, dass die If Anweisung
1
#elif defined(HWP EX16_MRF24W XC16.h)
heissen. Keine Ahnung wo die CFG_INCLUDE_EX16_MRF24WB im Stack herkommt, 
aber es scheint wie gesagt definiert zu sein, da es farbig unterlegt ist 
und ich per anlicken direkt in der HWP EX16_MRF24W XC16.h lande.


EDIT:
[/c]#include "Configs/HWP EX16_MRF24W XC16.h"[/c] ist fabig unterlegt, 
da definiert.
[/c]#include "Configs/HWP EX16_MRF24W XC32.h"[/c] natürlich nicht.

Bin ein wenig ratlos!

von sven (Gast)


Lesenswert?

HMM. Komischerweise wird in der MAINdemo.c der folgende Befehl in Zeile 
1021
1
#if defined(EEPROM_CS_TRIS)
2
    EEPROM_CS_IO = 1;
3
    EEPROM_CS_TRIS = 0;

auch nicht erkannt. Es scheint also ein Problem zwischen der DEfintion 
in der HWP EX16_MRF24W XC16.h und dem Nutzen dieser in den anderen 
Dateien zu geben. Merkwürdig, da ich in der HWP EX16_MRF24W XC16.h auch 
SPI und alle PINs des MRF definiert habe und es da keine Probleme gab!

von sven (Gast)


Lesenswert?

Eine letzte Bemerkung:

ich habe die EEPROM Definitionen in der HWP EX16_MRF24W XC16.h jetzt 
nicht wie VORHER:
1
#elif defined(__PIC24FJ256GB210__)
2
  
3
  //#define EEPROM_CS_TRIS    TRISGbits.TRISG0 = TRISDbits.TRISD12
4
  //#define EEPROM_CS_IO    LATGbits.LATG0 = LATDbits.LATD12
5
#else
6
        // so auf Leiterplatte
7
  #define EEPROM_CS_TRIS    (TRISDbits.TRISD13) // CHIPSELECT EE1 an RD13
8
  #define EEPROM_CS_IO    (LATDbits.LATD13)
9
10
//#endif
11
// so auf Leiterplatte
12
#define EEPROM_SCK_TRIS    (TRISDbits.TRISD1)  // SCK1 an RD1
13
#define EEPROM_SDI_TRIS    (TRISDbits.TRISD1)  // SDI1 an RD12
14
#define EEPROM_SDO_TRIS    (TRISDbits.TRISD2) // SD01 an RD2
15
#define EEPROM_SPI_IF    (IFS0bits.SPI1IF)
16
#define EEPROM_SSPBUF    (SPI1BUF)
17
#define EEPROM_SPICON1    (SPI1CON1)
18
#define EEPROM_SPICON1bits  (SPI1CON1bits)
19
#define EEPROM_SPICON2    (SPI1CON2)
20
#define EEPROM_SPISTAT    (SPI1STAT)
21
#define EEPROM_SPISTATbits  (SPI1STATbits)
22
23
#endif

sondern unter die SPI2 Definition geschrieben:
1
#elif defined(MRF24W_IN_SPI2) && !defined(__32MX460F512L__) && !defined(__32MX795F512L__)
2
  // SPI3 für mein eigenes Board
3
        #define WF_CS_TRIS      (TRISBbits.TRISB11)
4
  #define WF_CS_IO      (LATBbits.LATB11)
5
  #define WF_SDI_TRIS      (TRISBbits.TRISB13) // SDI3 RPI45
6
  #define WF_SCK_TRIS      (TRISFbits.TRISF12)  // SCK3 RP108
7
  #define WF_SDO_TRIS      (TRISFbits.TRISF13) // SDO3 RP109
8
  #define WF_RESET_TRIS                   (TRISBbits.TRISB9)
9
  #define WF_RESET_IO      (LATBbits.LATB9)
10
11
        // so auf Leiterplatte
12
  #define EEPROM_CS_TRIS    (TRISDbits.TRISD13) // CHIPSELECT EE1 an RD13
13
  #define EEPROM_CS_IO    (LATDbits.LATD13)
14
// so auf Leiterplatte
15
#define EEPROM_SCK_TRIS    (TRISDbits.TRISD1)  // SCK1 an RD1
16
#define EEPROM_SDI_TRIS    (TRISDbits.TRISD1)  // SDI1 an RD12
17
#define EEPROM_SDO_TRIS    (TRISDbits.TRISD2) // SD01 an RD2
18
#define EEPROM_SPI_IF    (IFS0bits.SPI1IF)
19
#define EEPROM_SSPBUF    (SPI1BUF)
20
#define EEPROM_SPICON1    (SPI1CON1)
21
#define EEPROM_SPICON1bits  (SPI1CON1bits)
22
#define EEPROM_SPICON2    (SPI1CON2)
23
#define EEPROM_SPISTAT    (SPI1STAT)
24
#define EEPROM_SPISTATbits  (SPI1STATbits)

Kann mir dies bitte Jemand erklären?????????

von Stampede (Gast)


Lesenswert?

Diese defines "defined(CFG_INCLUDE_EX16_MRF24WB) || 
defined(CFG_INCLUDE_EX16_MRF24WG)" kommen irgendwo aus deinen 
Präprozessoreinstellungen bzw. in den Projekteinstellungen.
"MRF24W_IN_SPI2" hingegen steht ja exakt so in dem File selbst drin.
Das ist der Unterschied und daher reusltiert auch bestimmt der Fehler.

von sven (Gast)


Lesenswert?

hmm, OK, danke Dir

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.