I have loaded the code and have a fairly simple boot.py, with no other files loaded on the board at this moment. When I load and run MicroPython.mem_info() I see that the max free sz: 6764. This seems to be very low and I only assumed this is due to fragmentation. But I have followed the guidance on this forum and the Micropython wiki to no avail.
Below I will attach my boot.py and the response from getting the men_info:
Code: Select all
def do_connect():
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
print('connecting to network...')
wlan.connect('*****', '*****')
while not wlan.isconnected():
pass
print('network config:', wlan.ifconfig())
do_connect()
import gc
gc.collect()
Code: Select all
>>> import micropython
>>> micropython.mem_info()
stack: 704 out of 15360
GC: total: 111168, used: 1760, free: 109408
No. of 1-blocks: 29, 2-blocks: 10, max blk sz: 18, max free sz: 6764
>>> gc.collect()
>>> micropython.mem_info()
stack: 704 out of 15360
GC: total: 111168, used: 1552, free: 109616
No. of 1-blocks: 19, 2-blocks: 10, max blk sz: 18, max free sz: 6764