forked from M-Labs/artiq
runtime: link against lwip, cleanups
This commit is contained in:
parent
91cd79a8a3
commit
4c6387929b
|
@ -40,7 +40,8 @@ runtime.elf: $(OBJECTS) libs
|
||||||
$(OBJECTS) \
|
$(OBJECTS) \
|
||||||
-L$(MSCDIR)/software/libbase \
|
-L$(MSCDIR)/software/libbase \
|
||||||
-L$(MSCDIR)/software/libcompiler-rt \
|
-L$(MSCDIR)/software/libcompiler-rt \
|
||||||
-lbase -lcompiler-rt
|
-Lliblwip \
|
||||||
|
-lbase -lcompiler-rt -llwip
|
||||||
@chmod -x $@
|
@chmod -x $@
|
||||||
|
|
||||||
ksupport.elf: $(OBJECTS_KSUPPORT)
|
ksupport.elf: $(OBJECTS_KSUPPORT)
|
||||||
|
@ -71,8 +72,10 @@ main.o: main.c
|
||||||
libs:
|
libs:
|
||||||
$(MAKE) -C $(MSCDIR)/software/libcompiler-rt
|
$(MAKE) -C $(MSCDIR)/software/libcompiler-rt
|
||||||
$(MAKE) -C $(MSCDIR)/software/libbase
|
$(MAKE) -C $(MSCDIR)/software/libbase
|
||||||
|
$(MAKE) -C liblwip
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
$(MAKE) -C liblwip clean
|
||||||
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) $(OBJECTS_KSUPPORT) $(OBJECTS_KSUPPORT:.o=.d)
|
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) $(OBJECTS_KSUPPORT) $(OBJECTS_KSUPPORT:.o=.d)
|
||||||
$(RM) runtime.elf runtime.bin runtime.fbi .*~ *~
|
$(RM) runtime.elf runtime.bin runtime.fbi .*~ *~
|
||||||
$(RM) service_table.h ksupport.elf ksupport.bin
|
$(RM) service_table.h ksupport.elf ksupport.bin
|
||||||
|
|
|
@ -32,7 +32,7 @@ CORE4OBJS=$(LWIPDIR)/core/ipv4/icmp.o \
|
||||||
NETIFOBJS=$(LWIPDIR)/netif/etharp.o \
|
NETIFOBJS=$(LWIPDIR)/netif/etharp.o \
|
||||||
netif/liteethif.o
|
netif/liteethif.o
|
||||||
|
|
||||||
# NETIFOBJS: All the above.
|
# LWIPOBJS: All the above.
|
||||||
LWIPOBJS=$(COREOBJS) $(CORE4OBJS) $(NETIFOBJS)
|
LWIPOBJS=$(COREOBJS) $(CORE4OBJS) $(NETIFOBJS)
|
||||||
OBJS_LIB+=$(LWIPOBJS)
|
OBJS_LIB+=$(LWIPOBJS)
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,6 @@ static void liteeth_low_level_init(struct netif *netif)
|
||||||
|
|
||||||
rxbuffer = rxbuffer0;
|
rxbuffer = rxbuffer0;
|
||||||
txbuffer = txbuffer0;
|
txbuffer = txbuffer0;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static err_t liteeth_low_level_output(struct netif *netif, struct pbuf *p)
|
static err_t liteeth_low_level_output(struct netif *netif, struct pbuf *p)
|
||||||
|
@ -70,7 +68,7 @@ static err_t liteeth_low_level_output(struct netif *netif, struct pbuf *p)
|
||||||
|
|
||||||
ethmac_sram_reader_slot_write(txslot);
|
ethmac_sram_reader_slot_write(txslot);
|
||||||
ethmac_sram_reader_length_write(txlen);
|
ethmac_sram_reader_length_write(txlen);
|
||||||
while(!(ethmac_sram_reader_ready_read()));
|
while(!ethmac_sram_reader_ready_read());
|
||||||
ethmac_sram_reader_start_write(1);
|
ethmac_sram_reader_start_write(1);
|
||||||
|
|
||||||
txslot = (txslot + 1) % 2;
|
txslot = (txslot + 1) % 2;
|
||||||
|
@ -108,10 +106,9 @@ void liteeth_input(struct netif *netif)
|
||||||
{
|
{
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
p = liteeth_low_level_input(netif);
|
p = liteeth_low_level_input(netif);
|
||||||
if (p != NULL) {
|
if(p != NULL)
|
||||||
netif->input(p, netif);
|
netif->input(p, netif);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
err_t liteeth_init(struct netif *netif)
|
err_t liteeth_init(struct netif *netif)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue