-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
MicroPython v1.20.0 on 2023-04-26; ESP module with ESP8266
I want to enforce the heap size check at compilation time.
I tried with the two Python tools:
- mpy-cross-v6.1
- mpy-cross==1.20
Invoking mpy-cross with -X heapsize=65536, both fail with
MemoryError: memory allocation failed, allocating 832 bytes
Without the argument, they create the .mpy files.
Uploaded the files to the esp8266, the program is running.
One thing that is perhaps a bit surprising about mpy-cross is that it's actually just a regular MicroPython port. It loads and compiles your code as if it were about to execute it, like any other port would do, but then has an extra piece of code that dumps out the generated bytecode to disk.
Hmm we have something different between the mpy-cross calculations and the firmware ones.
BTW... why do exist two tools for the exact same purpose?
They have the same options.
They have the same error messages (sometimes a little cryptic).
Isn't it better for the community to have just one mpy-cross?
IHMO if the authors pool their work, they have more resources to improve it.
Sorry if I'm missing some particular reason... or if I'm pissing out of my pot!