Commit 66a96410 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

ESP8266: Add RTOS SDK port (MGOS_ESP8266_RTOS=1)

PUBLISHED_FROM=ca5332e63700274ed9aeea9d9d1802e89fa788fa
parent d4b23f08
......@@ -116,3 +116,5 @@ sinclude $(SDK_PATH)/Makefile
.PHONY: FORCE
FORCE:
clean:
rm -rf user/.output .bin
......@@ -3,7 +3,7 @@
docker run \
--rm -i -v $(realpath ${PWD}/../..):/src \
--entrypoint=/bin/bash $(cat sdk.version) -l -c -x '
export SDK_PATH=/opt/Espressif/ESP8266_SDK;
export SDK_PATH=/opt/Espressif/ESP8266_RTOS_SDK;
export BIN_PATH=./bin;
cd /src/examples/ESP8266_RTOS &&
mkdir -p ./bin && make clean &&
......
docker.cesanta.com/esp8266-build-rtos:1.4.0-r2
docker.cesanta.com/esp8266-build:2.0.0-1.5.0-r1
......@@ -107,3 +107,7 @@ void user_init(void) {
xTaskCreate(mg_task, (const signed char *) "mongoose", MG_TASK_STACK_SIZE,
NULL, MGOS_TASK_PRIORITY, &s_mg_task_handle);
}
uint32_t user_rf_cal_sector_set(void) {
return 0xfb; /* 0xfb000, just before system data for 8Mbit flash. */
}
......@@ -13801,7 +13801,7 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
static err_t mg_lwip_tcp_conn_cb(void *arg, struct tcp_pcb *tpcb, err_t err) {
struct mg_connection *nc = (struct mg_connection *) arg;
DBG(("%p connect to %s:%u = %d", nc, IPADDR_NTOA(&tpcb->remote_ip),
DBG(("%p connect to %s:%u = %d", nc, IPADDR_NTOA(ipX_2_ip(&tpcb->remote_ip)),
tpcb->remote_port, err));
if (nc == NULL) {
tcp_abort(tpcb);
......@@ -14042,8 +14042,8 @@ void mg_lwip_accept_conn(struct mg_connection *nc, struct tcp_pcb *tpcb) {
static err_t mg_lwip_accept_cb(void *arg, struct tcp_pcb *newtpcb, err_t err) {
struct mg_connection *lc = (struct mg_connection *) arg;
(void) err;
DBG(("%p conn %p from %s:%u", lc, newtpcb, IPADDR_NTOA(&newtpcb->remote_ip),
newtpcb->remote_port));
DBG(("%p conn %p from %s:%u", lc, newtpcb,
IPADDR_NTOA(ipX_2_ip(&newtpcb->remote_ip)), newtpcb->remote_port));
struct mg_connection *nc = mg_if_accept_new_conn(lc);
if (nc == NULL) {
tcp_abort(newtpcb);
......
......@@ -1615,6 +1615,11 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
int interval, int count);
#endif
/* For older version of LWIP */
#ifndef ipX_2_ip
#define ipX_2_ip(x) (x)
#endif
#endif /* MG_LWIP */
#endif /* CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment