Skip to content

Commit

Permalink
Upload ethernet-core-freertos-lwip-mbedtls 2.2.0.99 [2752]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Sep 28, 2024
1 parent 1665d00 commit e0b7d99
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 9 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,27 @@ You should do the following:
DEFINES+=CY_RTOS_AWARE
```
8. If your application uses automatic private IP addressing (Auto IP), enable `LWIP_AUTOIP` and `LWIP_DHCP_AUTOIP_COOP` in *lwipopts.h* like as follows:
8. Add the `CY_DISABLE_XMC7000_DATA_CACHE` macro to the DEFINES in the code example's Makefile to disable data cache. The Makefile entry would look like as follows:
```
DEFINES+=CY_DISABLE_XMC7000_DATA_CACHE
```
9. If your application uses automatic private IP addressing (Auto IP), enable `LWIP_AUTOIP` and `LWIP_DHCP_AUTOIP_COOP` in *lwipopts.h* like as follows:
```
#define AUTOIP 1
#define LWIP_DHCP_AUTOIP_COOP 1
```
9. Add the following to `COMPONENTS` in the code example project's Makefile: `FREERTOS`, `LWIP`, and `MBEDTLS`.
10. Add the following to `COMPONENTS` in the code example project's Makefile: `FREERTOS`, `LWIP`, and `MBEDTLS`.
For example:
```
COMPONENTS=FREERTOS LWIP MBEDTLS
```
10. All the log messages are disabled by default. Do the following to enable log messages:
11. All the log messages are disabled by default. Do the following to enable log messages:
1. Add the `ENABLE_CONNECTIVITY_MIDDLEWARE_LOGS` macro to the *DEFINES* in the code example's Makefile to enable logs for lwIP network interface integration library. The Makefile entry should look like as follows:
```
Expand Down Expand Up @@ -116,4 +122,4 @@ Secure sockets, lwIP, and mbed TLS libraries contain reference and test applicat
- [Ethernet Core FreeRTOS lwIP mbedtls version](./version.xml)
- [ModusToolbox™ cloud connectivity code examples](https://github.com/Infineon?q=mtb-example-anycloud%20NOT%20Deprecated)
- [ModusToolbox™ code examples]( https://github.com/Infineon/Code-Examples-for-ModusToolbox-Software )
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ See the [README.md](./README.md) for a complete description of the [Ethernet Cor

## Changelog

### v2.2.0
- lwipopts.h updated to use macros generated from device configurator

### v2.1.0
- Supports XMC BSP 2.x version

Expand Down
145 changes: 141 additions & 4 deletions configs/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@
* Author: Simon Goldschmidt
*
*/
#include "cycfg.h"

#pragma once

#define MEM_ALIGNMENT (4)

#if defined CYCFG_LWIP_NETIF_HOSTNAME
#define LWIP_NETIF_HOSTNAME (CYCFG_LWIP_NETIF_HOSTNAME)
#endif

#define LWIP_RAW (1)

//
Expand All @@ -43,8 +49,9 @@
/**
* LWIP_AUTOIP==1: Enable AUTOIP module.
*/
// #define LWIP_AUTOIP (1)

#if defined CYCFG_LWIP_AUTOIP
#define LWIP_AUTOIP (CYCFG_LWIP_AUTOIP)
#endif
/**
* LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
* the same interface at the same time.
Expand All @@ -54,7 +61,11 @@
//
// Enable IPV6 networking
//
#if defined CYCFG_LWIP_IPV6
#define LWIP_IPV6 (CYCFG_LWIP_IPV6)
#else
#define LWIP_IPV6 (1)
#endif

#define LWIP_SUPPORT_CUSTOM_PBUF (1)

Expand All @@ -63,10 +74,53 @@
//
// Enable IPV4 networking
//
#if defined CYCFG_LWIP_ICMP
#define LWIP_ICMP (CYCFG_LWIP_ICMP)
#else
#define LWIP_ICMP (1)
#endif

#if defined CYCFG_LWIP_TCP
#define LWIP_TCP (CYCFG_LWIP_TCP)
#else
#define LWIP_TCP (1)
#endif

#if defined CYCFG_LWIP_UDP
#define LWIP_UDP (CYCFG_LWIP_UDP)
#else
#define LWIP_UDP (1)
#endif

#if defined CYCFG_LWIP_IGMP
#define LWIP_IGMP (CYCFG_LWIP_IGMP)
#else
#define LWIP_IGMP (1)
#endif

#if defined CYCFG_IP_OPTIONS_ALLOWED
#define IP_OPTIONS_ALLOWED (CYCFG_IP_OPTIONS_ALLOWED)
#endif

#if defined CYCFG_IP_FRAG
#define IP_FRAG (CYCFG_IP_FRAG)
#endif

#if defined CYCFG_IP_REASSEMBLY
#define IP_REASSEMBLY (CYCFG_IP_REASSEMBLY)
#endif

#if defined CYCFG_IP_DEFAULT_TTL
#define IP_DEFAULT_TTL (CYCFG_IP_DEFAULT_TTL)
#endif

#if defined CYCFG_ARP_TABLE_SIZE
#define ARP_TABLE_SIZE (CYCFG_ARP_TABLE_SIZE)
#endif

#if defined CYCFG_MEM_SIZE
#define MEM_SIZE (CYCFG_MEM_SIZE)
#endif

//
// Use malloc to allocate any memory blocks instead of the
Expand Down Expand Up @@ -123,8 +177,11 @@
//
// TCP Maximum segment size
//

#if defined CYCFG_TCP_MSS
#define TCP_MSS (CYCFG_TCP_MSS)
#else
#define TCP_MSS (1460)
#endif

#define LWIP_CHECKSUM_CTRL_PER_NETIF 1
#define CHECKSUM_GEN_IP 1
Expand All @@ -148,15 +205,27 @@
* TCP_SND_BUF: TCP sender buffer space (bytes).
* To achieve good performance, this should be at least 2 * TCP_MSS.
*/
#if defined CYCFG_TCP_SND_BUF
#define TCP_SND_BUF (CYCFG_TCP_SND_BUF)
#else
#define TCP_SND_BUF (4 * TCP_MSS)
#endif

#if defined CYCFG_TCP_WND
#define TCP_WND (CYCFG_TCP_WND)
#else
#define TCP_WND (4 * TCP_MSS)
#endif

/**
* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
*/
#if defined CYCFG_TCP_SND_QUEUELEN
#define TCP_SND_QUEUELEN (CYCFG_TCP_SND_QUEUELEN)
#else
#define TCP_SND_QUEUELEN ((6 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
#endif


//
Expand All @@ -176,8 +245,18 @@
#define LWIP_NETCONN (1)
#define DEFAULT_TCP_RECVMBOX_SIZE (12)
#define TCPIP_MBOX_SIZE (16)

#if defined CYCFG_TCPIP_THREAD_STACKSIZE
#define TCPIP_THREAD_STACKSIZE (CYCFG_TCPIP_THREAD_STACKSIZE)
#else
#define TCPIP_THREAD_STACKSIZE (4*1024)
#endif
#if defined CYCFG_TCPIP_THREAD_PRIO
#define TCPIP_THREAD_PRIO (CYCFG_TCPIP_THREAD_PRIO)
#else
#define TCPIP_THREAD_PRIO (4)
#endif

#define DEFAULT_RAW_RECVMBOX_SIZE (12)
#define DEFAULT_UDP_RECVMBOX_SIZE (12)
#define DEFAULT_ACCEPTMBOX_SIZE (8)
Expand All @@ -187,25 +266,51 @@
* per active UDP "connection".
* (requires the LWIP_UDP option)
*/
#if defined CYCFG_MEMP_NUM_UDP_PCB
#define MEMP_NUM_UDP_PCB (CYCFG_MEMP_NUM_UDP_PCB)
#else
#define MEMP_NUM_UDP_PCB 8
#endif

/**
* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections.
* (requires the LWIP_TCP option)
*/
#if defined CYCFG_MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB (CYCFG_MEMP_NUM_TCP_PCB)
#else
#define MEMP_NUM_TCP_PCB 8
#endif

/**
* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
* (requires the LWIP_TCP option)
*/
#if defined CYCFG_MEMP_NUM_TCP_PCB_LISTEN
#define MEMP_NUM_TCP_PCB_LISTEN (CYCFG_MEMP_NUM_TCP_PCB_LISTEN)
#else
#define MEMP_NUM_TCP_PCB_LISTEN 1
#endif

#if defined CYCFG_MEMP_NUM_REASSDATA
#define MEMP_NUM_REASSDATA (CYCFG_MEMP_NUM_REASSDATA)
#else
#define MEMP_NUM_REASSDATA 5
#endif

#if defined CYCFG_MEMP_NUM_ARP_QUEUE
#define MEMP_NUM_ARP_QUEUE (CYCFG_MEMP_NUM_ARP_QUEUE)
#endif

/**
* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
* (requires the LWIP_TCP option)
*/
#if defined CYCFG_MEMP_NUM_TCP_SEG
#define MEMP_NUM_TCP_SEG (CYCFG_MEMP_NUM_TCP_SEG)
#else
#define MEMP_NUM_TCP_SEG 27
#endif

/**
* MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts.
Expand All @@ -214,21 +319,48 @@

/**
* PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
* Instead of LWIP_PBUF_MEMPOOL of size PBUF_POOL_SIZE, a LWIP_MEMPOOL is created internally for handling RX data over Ethernet.
* So, PBUF_POOL_SIZE is updated to zero to save memory
*/
#define PBUF_POOL_SIZE 10
#define PBUF_POOL_SIZE 0

#if defined CYCFG_MEMP_NUM_PBUF
#define MEMP_NUM_PBUF (CYCFG_MEMP_NUM_PBUF)
#else
#define MEMP_NUM_PBUF 16
#endif

#if defined CYCFG_MEMP_NUM_RAW_PCB
#define MEMP_NUM_RAW_PCB (CYCFG_MEMP_NUM_RAW_PCB)
#endif

/**
* MEMP_NUM_NETBUF: the number of struct netbufs.
* (only needed if you use the sequential API, like api_lib.c)
*/
#if defined CYCFG_MEMP_NUM_NETBUF
#define MEMP_NUM_NETBUF (CYCFG_MEMP_NUM_NETBUF)
#else
#define MEMP_NUM_NETBUF 8
#endif

/**
* MEMP_NUM_NETCONN: the number of struct netconns.
* (only needed if you use the sequential API, like api_lib.c)
*/
#if defined CYCFG_MEMP_NUM_NETCONN
#define MEMP_NUM_NETCONN (CYCFG_MEMP_NUM_NETCONN)
#else
#define MEMP_NUM_NETCONN 16
#endif

#if defined CYCFG_MEMP_NUM_TCPIP_MSG_API
#define MEMP_NUM_TCPIP_MSG_API (CYCFG_MEMP_NUM_TCPIP_MSG_API)
#endif

#if defined CYCFG_MEMP_NUM_TCPIP_MSG_INPKT
#define MEMP_NUM_TCPIP_MSG_INPKT (CYCFG_MEMP_NUM_TCPIP_MSG_INPKT)
#endif

/* Turn off LWIP_STATS in Release build */
#ifdef DEBUG
Expand Down Expand Up @@ -262,7 +394,12 @@
*/
#define LWIP_NETIF_API 1

#if defined CYCFG_LWIP_DNS
#define LWIP_DNS (1)
#define DNS_MAX_SERVERS (CYCFG_DNS_MAX_SERVERS)
#else
#define LWIP_DNS (1)
#endif

#define LWIP_NETIF_TX_SINGLE_PBUF (1)

Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<version>2.1.0.76</version>
<version>2.2.0.99</version>

0 comments on commit e0b7d99

Please sign in to comment.