Page 1 of 1

Freezing modules on SF2W

Posted: Fri Nov 01, 2019 3:41 pm
by pythoncoder
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*)

Re: Freezing modules on SF2W

Posted: Wed Mar 09, 2022 7:07 am
by gcp
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.

Re: Freezing modules on SF2W

Posted: Wed Mar 09, 2022 8:48 am
by pythoncoder
My instructions above are still valid: you need to edit the file f722_qspi.ld as described before you compile.

Re: Freezing modules on SF2W

Posted: Wed Mar 09, 2022 10:31 pm
by gcp
Thankyou for your help.