Skip to content

ability to predetermine if code.py is too big to run #8780

@schaefer01

Description

@schaefer01

Hi,
I wrote a program that fit in an rp2040 featherwiing, then added features, then got this error:

Running in safe mode! Not running saved code.
You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.

I then stopped calling the added code, but it still crashed, I then started commenting out the code
that wasn't called, and eventually I could again run the program (with limited features).

I'm thinking that some things are known pre-runtime that could be used to let me know ahead of time

whether the program would fit, and

It would be even better if I could know the code space my program took up and how much room

I had to add code in the future or leave a buffer for code growth

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions