I have been building the esp8266 version of MicroPython for some time now and have noticed some limitations of how much I can fit before it fails to build. I am at a point now where I have to choose between two important apps and was wondering if I can trim elsewhere to get them both to fit. Is everything else in the Modules folder fair game? Is there anything obviously "extra weight"?
Thanks!
Saving Space for Frozen Code
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Saving Space for Frozen Code
I change the irom0 size with the following command (on linux, run on an unmodified file, you can edit the file manually though):
sed -i 's/irom0_0_seg : org = 0x40209000, len = 0x8f000/irom0_0_seg : org = 0x40209000, len = 0xe7000/' ~/micropython/ports/esp8266/esp8266.ld
For manually editing:
search for the string: irom0_0_seg : org = 0x40209000, len = 0x8f000
and replace it with: irom0_0_seg : org = 0x40209000, len = 0xe7000
This gives me plenty of flash size for frozen modules.
sed -i 's/irom0_0_seg : org = 0x40209000, len = 0x8f000/irom0_0_seg : org = 0x40209000, len = 0xe7000/' ~/micropython/ports/esp8266/esp8266.ld
For manually editing:
search for the string: irom0_0_seg : org = 0x40209000, len = 0x8f000
and replace it with: irom0_0_seg : org = 0x40209000, len = 0xe7000
This gives me plenty of flash size for frozen modules.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Saving Space for Frozen Code
Thanks for that!
I will give a try when I get home.
Tell me, does this take space away from the integrated flash file system?
I will give a try when I get home.
Tell me, does this take space away from the integrated flash file system?
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Saving Space for Frozen Code
It probably does.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode