Shop Learn
P2 FlexProp Basic ADC & Comm drivers - Page 3 — Parallax Forums

P2 FlexProp Basic ADC & Comm drivers



  • JRoarkJRoark Posts: 674
    edited 2021-02-10 16:22

    Usually this means the heap size needs to be increased. From my experience, it usually happens during string concatenation or manipulation or printing.

    It is an easy fix: set the const HEAPSIZE to a larger value. Try this:


    EDIT: In earlier versions it was sometimes necessary to force garbage collection using __gc_collect(), but the current version GC works really well, and just giving the heap more space with HEAPSIZE (and letting it manage GC on its own) is a better fix.

    You are using a current version, right? Version 5.0.8 or later?

Sign In or Register to comment.