endif
export CROSS_COMPILE
+# By default, optimization for size (-Os) is enabled, set below option
+# to n or remove it if you want only basic optimization (-O/-O1)
+# BUILD_OPTIMIZED = n
+
+ifneq ($(BUILD_OPTIMIZED), n)
+ BUILD_OPTIMIZED = y
+endif
+export BUILD_OPTIMIZED
+
# ==========================================================================
# =======================
#if defined(CONFIG_CMD_HTTPD)
-#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
-
void NetSendHttpd(void){
volatile uchar *tmpbuf = NetTxPacket;
int i;
}
void NetReceiveHttpd(volatile uchar * inpkt, int len){
+ struct uip_eth_hdr *eth_hdr = (struct uip_eth_hdr *)uip_buf;
+
memcpy(uip_buf, (const void *)inpkt, len);
uip_len = len;
- if(BUF->type == htons(UIP_ETHTYPE_IP)){
+ if(eth_hdr->type == htons(UIP_ETHTYPE_IP)){
uip_arp_ipin();
uip_input();
uip_arp_out();
NetSendHttpd();
}
- } else if(BUF->type == htons(UIP_ETHTYPE_ARP)){
+ } else if(eth_hdr->type == htons(UIP_ETHTYPE_ARP)){
uip_arp_arpin();
if(uip_len > 0){