Code: Select all
(2048 * 1024) / 4096 = 512MB
As the esp32 wroom and esp32-thing both 4MB of flash space, how much can I safely define ?
If I correctly understand, this would be 2MB ?
Code: Select all
SEC_SIZE = 4096
MB1 = 2 ## Megabytes
bdev = FlashBdev(((MB1 * 4096) * 1024) // FlashBdev.SEC_SIZE)
Code: Select all
>>> MB1 = 2 ## Megabytes
>>> SEC_SIZE = 4096
>>> ((MB1 * 4096) * 1024) // SEC_SIZE
2048
>>>
Code: Select all
>>> import os
>>> s = os.statvfs('//')
>>> ('{0} MB'.format((s[0]*s[3])/1048576))
'7.972656 MB'
>>>