Freezing modules on SF2W

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Freezing modules on SF2W

Post by pythoncoder » Fri Nov 01, 2019 3:41 pm

This can fail if there are too many files to fit in the chip flash. The solution is to put them in external SPI flash, but the previous instruction for doing this no longer works: frozen_mpy.o should now read frozen_content.o. The diff relative to the file in the source tree is now:

Code: Select all

--- a/ports/stm32/boards/PYBD_SF2/f722_qspi.ld
+++ b/ports/stm32/boards/PYBD_SF2/f722_qspi.ld
@@ -48,6 +48,7 @@ SECTIONS
     .text_ext :
     {
         . = ALIGN(4);
+        *frozen_content.o(.text* .rodata*)
         *lib/mbedtls/*(.text* .rodata*)
         . = ALIGN(512);
         *(.big_const*)
Peter Hinch
Index to my micropython libraries.

gcp
Posts: 5
Joined: Wed Jan 19, 2022 6:18 am

Re: Freezing modules on SF2W

Post by gcp » Wed Mar 09, 2022 7:07 am

Hi,
I am new to frozen code for the SF2W. I have run out of memory for my Micropython code and would like to compile the code and run it from 2MiB external QSPI flash. Is there any guide on how to do this?


thanks,
Glen.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Freezing modules on SF2W

Post by pythoncoder » Wed Mar 09, 2022 8:48 am

My instructions above are still valid: you need to edit the file f722_qspi.ld as described before you compile.
Peter Hinch
Index to my micropython libraries.

gcp
Posts: 5
Joined: Wed Jan 19, 2022 6:18 am

Re: Freezing modules on SF2W

Post by gcp » Wed Mar 09, 2022 10:31 pm

Thankyou for your help.

Post Reply