reduce memory consumption

pull/7/head
Thorsten von Eicken 10 years ago
parent c7c1d510ef
commit 88dc16737b
  1. 6
      Makefile
  2. 3
      httpd/httpd.c
  3. 3
      serial/serbridge.c
  4. 2
      serial/serbridge.h

@ -114,14 +114,14 @@ LIBS = c gcc hal phy pp net80211 wpa main lwip
# compiler flags using during compilation of source files
CFLAGS = -Os -ggdb -std=c99 -Werror -Wpointer-arith -Wundef -Wall -Wl,-EL -fno-inline-functions \
-nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -D_STDINT_H \
-Wno-address -DFIRMWARE_SIZE=$(ESP_FLASH_MAX) \
-nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections \
-D__ets__ -DICACHE_FLASH -D_STDINT_H -Wno-address -DFIRMWARE_SIZE=$(ESP_FLASH_MAX) \
-DMCU_RESET_PIN=$(MCU_RESET_PIN) -DMCU_ISP_PIN=$(MCU_ISP_PIN) \
-DLED_CONN_PIN=$(LED_CONN_PIN) -DLED_SERIAL_PIN=$(LED_SERIAL_PIN) \
"-DVERSION=$(VERSION)"
# linker flags used to generate the main object file
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--gc-sections
# linker script used for the above linker step
LD_SCRIPT := build/eagle.esphttpd.v6.ld

@ -19,7 +19,7 @@ Esp8266 http server - core routines
//Max length of request head
#define MAX_HEAD_LEN 1024
//Max amount of connections
#define MAX_CONN 8
#define MAX_CONN 4
//Max post buffer len
#define MAX_POST 1024
//Max send buffer len
@ -543,4 +543,5 @@ void ICACHE_FLASH_ATTR httpdInit(HttpdBuiltInUrl *fixedUrls, int port) {
os_printf("Httpd init, conn=%p\n", &httpdConn);
espconn_regist_connectcb(&httpdConn, httpdConnectCb);
espconn_accept(&httpdConn);
espconn_tcp_set_max_con_allow(&httpdConn, MAX_CONN);
}

@ -281,6 +281,8 @@ static void ICACHE_FLASH_ATTR serbridgeConnectCb(void *arg) {
espconn_regist_reconcb(conn, serbridgeReconCb);
espconn_regist_disconcb(conn, serbridgeDisconCb);
espconn_regist_sentcb(conn, serbridgeSentCb);
espconn_set_opt(conn, ESPCONN_REUSEADDR|ESPCONN_NODELAY);
}
// callback with a buffer of characters that have arrived on the uart
@ -320,5 +322,6 @@ void ICACHE_FLASH_ATTR serbridgeInit(int port, uint8_t reset_pin, uint8_t isp_pi
espconn_regist_connectcb(&serbridgeConn, serbridgeConnectCb);
espconn_accept(&serbridgeConn);
espconn_tcp_set_max_con_allow(&serbridgeConn, MAX_CONN);
espconn_regist_time(&serbridgeConn, SER_BRIDGE_TIMEOUT, 0);
}

@ -5,7 +5,7 @@
#include <c_types.h>
#include <espconn.h>
#define MAX_CONN 5
#define MAX_CONN 4
#define SER_BRIDGE_TIMEOUT 28799
//Max send buffer len

Loading…
Cancel
Save