diff --git a/artiq/runtime/liblwip/Makefile b/artiq/runtime/liblwip/Makefile index f687a77c6..88de6a717 100644 --- a/artiq/runtime/liblwip/Makefile +++ b/artiq/runtime/liblwip/Makefile @@ -21,17 +21,17 @@ COREFILES=core/mem.c \ core/tcp_out.c \ core/udp.c \ core/inet_chksum.c \ - core/timers.c \ + core/timeouts.c \ core/init.c -CORE4FILES=core/ipv4/icmp.c \ +CORE4FILES=core/ipv4/etharp.c \ + core/ipv4/icmp.c \ core/ipv4/ip4.c \ core/ipv4/ip4_addr.c \ - core/ipv4/ip_frag.c + core/ipv4/ip4_frag.c # NETIFFILES: Files implementing various generic network interface functions. -NETIFFILES=netif/etharp.c \ - netif/ethernet.c +NETIFFILES=netif/ethernet.c PPPFILES=netif/ppp/auth.c \ netif/ppp/fsm.c \ diff --git a/artiq/runtime/liblwip/arch/cc.h b/artiq/runtime/liblwip/arch/cc.h index e1c4c42ab..fffd246ff 100644 --- a/artiq/runtime/liblwip/arch/cc.h +++ b/artiq/runtime/liblwip/arch/cc.h @@ -6,33 +6,8 @@ #define __ARCH_CC_H__ /* Include some files for defining library routines */ -#include -#include -#include - #define BYTE_ORDER BIG_ENDIAN -/* Define generic types */ -typedef unsigned char u8_t; -typedef signed char s8_t; -typedef unsigned short u16_t; -typedef signed short s16_t; -typedef unsigned long u32_t; -typedef signed long s32_t; - -typedef u32_t mem_ptr_t; - -/* Define (sn)printf formatters for these types */ -#define U8_F "c" -#define S8_F "c" -#define X8_F "x" -#define U16_F "u" -#define S16_F "d" -#define X16_F "x" -#define U32_F "u" -#define S32_F "d" -#define X32_F "x" - /* Compiler hints for packing structures */ #define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_STRUCT __attribute__((packed)) diff --git a/artiq/runtime/liblwip/arch/sys_arch.h b/artiq/runtime/liblwip/arch/sys_arch.h deleted file mode 100644 index a9e2503e2..000000000 --- a/artiq/runtime/liblwip/arch/sys_arch.h +++ /dev/null @@ -1,20 +0,0 @@ -// This file is Copyright (c) 2015 Florent Kermarrec -// LiteETH lwIP port for ARTIQ -// License: BSD - -#ifndef __ARCH_SYS_ARCH_H__ -#define __ARCH_SYS_ARCH_H__ - -#define SYS_MBOX_NULL NULL -#define SYS_SEM_NULL NULL - -typedef void * sys_prot_t; - -typedef void * sys_sem_t; - -typedef void * sys_mbox_t; - -typedef void * sys_thread_t; - -#endif /* __ARCH_SYS_ARCH_H__ */ - diff --git a/artiq/runtime/liblwip/lwipopts.h b/artiq/runtime/liblwip/lwipopts.h index 1dc945e96..36ebf7234 100644 --- a/artiq/runtime/liblwip/lwipopts.h +++ b/artiq/runtime/liblwip/lwipopts.h @@ -40,6 +40,8 @@ #define LWIP_CALLBACK_API 1 +#define SYS_LIGHTWEIGHT_PROT 0 + /* -------- TCP Timer Intervals ------- */ #define TCP_TMR_INTERVAL 1 /* The TCP timer interval in milliseconds. */ diff --git a/artiq/runtime/lwip b/artiq/runtime/lwip index 33955c636..216bf8949 160000 --- a/artiq/runtime/lwip +++ b/artiq/runtime/lwip @@ -1 +1 @@ -Subproject commit 33955c636d17bee230cde746a92e1cff11a7a177 +Subproject commit 216bf89491815029aa15463a18744afa04df58fe diff --git a/artiq/runtime/main.c b/artiq/runtime/main.c index c9f6f0951..30c130830 100644 --- a/artiq/runtime/main.c +++ b/artiq/runtime/main.c @@ -9,13 +9,10 @@ #include #include -#include #include -#include #include -#include +#include #include -#include #ifdef CSR_ETHMAC_BASE #include #include @@ -32,6 +29,7 @@ static struct netif netif; static ppp_pcb *ppp; #endif +void lwip_service(void); void lwip_service(void) { sys_check_timeouts(); @@ -107,6 +105,7 @@ static void fsip_or_default(struct ip4_addr *d, char *key, int i1, int i2, int i #endif } +void network_init(void); void network_init(void) { struct ip4_addr local_ip; @@ -169,14 +168,17 @@ extern void _fheap, _eheap; extern void rust_main(); +u16_t tcp_sndbuf_(struct tcp_pcb *pcb); u16_t tcp_sndbuf_(struct tcp_pcb *pcb) { return tcp_sndbuf(pcb); } +u8_t* tcp_so_options_(struct tcp_pcb *pcb); u8_t* tcp_so_options_(struct tcp_pcb *pcb) { return &pcb->so_options; } +void tcp_nagle_disable_(struct tcp_pcb *pcb); void tcp_nagle_disable_(struct tcp_pcb *pcb) { tcp_nagle_disable(pcb); }