Good evening. I am using MicroPython on a Raspberry Pi Pico. As my .py script grew too big (+3000 lines) and I still need to add features, I find myself in trouble since I can’t use the MicroPython interpreter anymore; it keeps throwing many errors.
I found that freezing my routine into the firmware by compiling it with the rest of the MicroPython modules allows me to keep going. So, I setup a Docker container that builds all the neccesary tools, and I can generate the .UF2 firmware with the required modifications, including the single module “mymodule.py” on /ports/rp2/modules that gets compiled and can be imported and run, so far so good.
Thing is, as expected, every single modification to “mymodule.py” involves generating ALL the modules that make up MicroPython, even though none of them have changed, except for my single file. This takes a very long amount of time to process; I was able to reduce it somehow by using a multi-stage container; in which the first stage generates up to mpy-cross
; and the second stage takes from there and generates the .UF2. But even this is rather time consuming.
Is there any way of configuring CMake to stop right when it finished generating all the .obj files pertinent to MicroPython, ideally on the first stage; then compile my single file, and finally linking all together to generate the .UF2? I am confused as there are literally HUNDREDS of CMake scripts, and I don’t know which to customize, and how to do it. Any help will be much appreciated. Sincerely,
Ricardo.
List item