Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
66a96410
Commit
66a96410
authored
8 years ago
by
Deomid Ryabkov
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ESP8266: Add RTOS SDK port (MGOS_ESP8266_RTOS=1)
PUBLISHED_FROM=ca5332e63700274ed9aeea9d9d1802e89fa788fa
parent
d4b23f08
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
5 deletions
+16
-5
Makefile
examples/ESP8266_RTOS/Makefile
+2
-0
build.sh
examples/ESP8266_RTOS/build.sh
+1
-1
sdk.version
examples/ESP8266_RTOS/sdk.version
+1
-1
user_main.c
examples/ESP8266_RTOS/user/user_main.c
+4
-0
mongoose.c
mongoose.c
+3
-3
mongoose.h
mongoose.h
+5
-0
No files found.
examples/ESP8266_RTOS/Makefile
View file @
66a96410
...
@@ -116,3 +116,5 @@ sinclude $(SDK_PATH)/Makefile
...
@@ -116,3 +116,5 @@ sinclude $(SDK_PATH)/Makefile
.PHONY
:
FORCE
.PHONY
:
FORCE
FORCE
:
FORCE
:
clean
:
rm
-rf
user/.output .bin
This diff is collapsed.
Click to expand it.
examples/ESP8266_RTOS/build.sh
View file @
66a96410
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
docker run
\
docker run
\
--rm
-i
-v
$(
realpath
${
PWD
}
/../..
)
:/src
\
--rm
-i
-v
$(
realpath
${
PWD
}
/../..
)
:/src
\
--entrypoint
=
/bin/bash
$(
cat
sdk.version
)
-l
-c
-x
'
--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;
export BIN_PATH=./bin;
cd /src/examples/ESP8266_RTOS &&
cd /src/examples/ESP8266_RTOS &&
mkdir -p ./bin && make clean &&
mkdir -p ./bin && make clean &&
...
...
This diff is collapsed.
Click to expand it.
examples/ESP8266_RTOS/sdk.version
View file @
66a96410
docker.cesanta.com/esp8266-build
-rtos:1.4.0-r2
docker.cesanta.com/esp8266-build
:2.0.0-1.5.0-r1
This diff is collapsed.
Click to expand it.
examples/ESP8266_RTOS/user/user_main.c
View file @
66a96410
...
@@ -107,3 +107,7 @@ void user_init(void) {
...
@@ -107,3 +107,7 @@ void user_init(void) {
xTaskCreate
(
mg_task
,
(
const
signed
char
*
)
"mongoose"
,
MG_TASK_STACK_SIZE
,
xTaskCreate
(
mg_task
,
(
const
signed
char
*
)
"mongoose"
,
MG_TASK_STACK_SIZE
,
NULL
,
MGOS_TASK_PRIORITY
,
&
s_mg_task_handle
);
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. */
}
This diff is collapsed.
Click to expand it.
mongoose.c
View file @
66a96410
...
@@ -13801,7 +13801,7 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
...
@@ -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
)
{
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
;
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
));
tpcb
->
remote_port
,
err
));
if
(
nc
==
NULL
)
{
if
(
nc
==
NULL
)
{
tcp_abort
(
tpcb
);
tcp_abort
(
tpcb
);
...
@@ -14042,8 +14042,8 @@ void mg_lwip_accept_conn(struct mg_connection *nc, struct tcp_pcb *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
)
{
static
err_t
mg_lwip_accept_cb
(
void
*
arg
,
struct
tcp_pcb
*
newtpcb
,
err_t
err
)
{
struct
mg_connection
*
lc
=
(
struct
mg_connection
*
)
arg
;
struct
mg_connection
*
lc
=
(
struct
mg_connection
*
)
arg
;
(
void
)
err
;
(
void
)
err
;
DBG
((
"%p conn %p from %s:%u"
,
lc
,
newtpcb
,
IPADDR_NTOA
(
&
newtpcb
->
remote_ip
),
DBG
((
"%p conn %p from %s:%u"
,
lc
,
newtpcb
,
newtpcb
->
remote_port
));
IPADDR_NTOA
(
ipX_2_ip
(
&
newtpcb
->
remote_ip
)),
newtpcb
->
remote_port
));
struct
mg_connection
*
nc
=
mg_if_accept_new_conn
(
lc
);
struct
mg_connection
*
nc
=
mg_if_accept_new_conn
(
lc
);
if
(
nc
==
NULL
)
{
if
(
nc
==
NULL
)
{
tcp_abort
(
newtpcb
);
tcp_abort
(
newtpcb
);
...
...
This diff is collapsed.
Click to expand it.
mongoose.h
View file @
66a96410
...
@@ -1615,6 +1615,11 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
...
@@ -1615,6 +1615,11 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
int
interval
,
int
count
);
int
interval
,
int
count
);
#endif
#endif
/* For older version of LWIP */
#ifndef ipX_2_ip
#define ipX_2_ip(x) (x)
#endif
#endif
/* MG_LWIP */
#endif
/* MG_LWIP */
#endif
/* CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_ */
#endif
/* CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_ */
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment