Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit074402e

Browse files
authored
Merge pull requestesp8266#4150 from d-a-v/lwip
restore zalloc() + lower lwip2 ram and flash footprint
2 parents12f336f +de2a382 commit074402e

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed

‎tools/sdk/include/mem.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ bool ICACHE_FLASH_ATTR check_memleak_debug_enable(void)
4343
#defineos_malloc malloc
4444
#defineos_calloc calloc
4545
#defineos_realloc realloc
46-
#defineos_zalloc zalloc
46+
#defineos_zalloc(s) calloc(1,s)
47+
#definezalloc(s) calloc(1,s)
4748

4849
#ifndefMEMLEAK_DEBUG
4950
#defineMEMLEAK_DEBUG_ENABLE0

‎tools/sdk/lib/liblwip2.a‎

-4.78 KB
Binary file not shown.

‎tools/sdk/lib/liblwip2_1460.a‎

-4.78 KB
Binary file not shown.

‎tools/sdk/lwip2/README.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
```make install```: download, compile, install lwip2
12

2-
makeinstalldownload, compile, install lwip2
3-
make downloaddownload lwIP-2 builder
4-
make cleanclean builder only
3+
```make download```: download lwIP-2 builder
4+
5+
```make clean```:clean builder only
56

67
glue and lwIP debug options are in builder/glue/gluedebug.h
8+
79
MSS values are in builder/Makefile.arduino
10+
811
MSS values in boards.txt are only informative
912

1013
current lwip2 submodule repository:https://github.com/d-a-v/esp82xx-nonos-linklayer/tree/arduino-2.4.0

‎tools/sdk/lwip2/builder‎

‎tools/sdk/lwip2/include/gluedebug.h‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// this is needed separately from lwipopts.h
99
// because it is shared by both sides of glue
1010

11+
#defineUNDEBUG1// 0 or 1 (1: uassert removed)
1112
#defineUDEBUG0// 0 or 1 (glue debug)
1213
#defineUDUMP0// 0 or 1 (glue / dump packet)
1314
#defineUDEBUGINDEX0// 0 or 1 (show debug line number)
@@ -81,8 +82,22 @@ int doprint_minus (const char* format, ...) __attribute__ ((format (printf, 1, 2
8182
#defineuprint(x...)do { (void)0; } while (0)
8283
#endif
8384

85+
#ifUNDEBUG
86+
#defineuassert(assertion...) do { (void)0; } while (0)
87+
#else// !defined(UNDEBUG)
88+
#defineuassert(assertion...)\
89+
do { if ((assertion) == 0) { \
90+
static const char assrt[] ICACHE_RODATA_ATTR STORE_ATTR = #assertion " wrong@"; \
91+
os_printf_plus(assrt); \
92+
static const char assrt_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \
93+
os_printf_plus(assrt_file); \
94+
static const char assrt_line[] ICACHE_RODATA_ATTR STORE_ATTR = ":%d\n"; \
95+
os_printf_plus(assrt_line, __LINE__); \
96+
uhalt(); \
97+
} } while (0)
98+
#endif// !defined(UNDEBUG)
99+
84100
#defineuerror(x...)do { doprint(x); } while (0)
85-
#defineuassert(assertion...)do { if ((assertion) == 0) { os_printf_plus("assert fail: " #assertion " @%s:%d\n", __FILE__, __LINE__); uhalt(); } } while (0)
86101
#defineuhalt() do { *((int*)0) = 0;/* this triggers gdb */ }while (0)
87102
#definenl()do { uprint("\n"); } while (0)
88103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp