Download ESP8266 Book

Transcript
system_set_os_print
Turn on or off logging.
void system_set_os_print(unint8 onOff)
A value of 0 switches it off while a value of 1 switches it on. It was initially thought that this
controlled OS level logging however it seems to control all logging via os_printf().
Includes:
•
user_interface.h
See also:
•
Logging to UART1
system_print_meminfo
Print memory information
void system_print_meminfo()
Memory information for diagnostics is written to the output stream which is commonly UART1.
The format of the data looks as follows:
data :
rodata:
bss
:
heap :
0x3ffe8000
0x3ffe8540
0x3ffe8af0
0x3fff1c18
~
~
~
~
0x3ffe853c,
0x3ffe8af0,
0x3fff1c18,
0x3fffc000,
len:
len:
len:
len:
1340
1456
37160
41960
The .data section is where global and static local initialized variables are kept.
The .rodata section is where read-only global and static data is kept.
The .bss is where un-initialized global and local static data is kept.
The .heap is where the heap of the program can be found.
See also:
•
Wikipedia – .bss
•
Wikipedia – Data segment
system_get_free_heap_size
Get the size of the available memory heap
int system_get_free_heap_size()
For example "40544".
See also:
•
•
os_malloc
os_free
Page 143