First of all, I need to send a big respect to the project’s authors.
I have one question, and I will be so glad to get even an any advice if not solution by anyone.
I need to have in omv’s micropython a few another python libraries. I won’t post them now 'cause it could be look not like a “please, explain” question but “give me step-by-step solution” question.
Them are C-modules for micropython, they doing smth that will be not so effectively to do on micropython/python by itself. For example, generating big QR-codes, for example - some cryptography (not implemented in native mpy, elliptic curves cryptography as example).
There are a few instructions how to compile mpy with C-modules, they can look like this:
compile mpy-cross with just make in mpy-cross directory
move to the needed port (ports/unix or ports/stm32) dir and do make USER_C_MODULES=dir/with/modules
No problems. But let’s see omv’s instructions how to compile the whole project (it will quote be from official github):
We recommend you use VS Code to edit the firmware. VS Code includes a code explorer, excellent code editor, and a built-in terminal. You should install VS Code on your Linux system.
Once you’ve installed VS Code please launch it and then go to
File->Open Folder...and select your cloned
openmvrepository. Next, to compile firmware open a terminal inside VS Code and do:
cd src/micropython/mpy-cross make
This will build the MicroPython Cross Compilier which we use to include frozen bytecode modules into the OpenMV Cam firmware. This only needs to be done once (or if mpy-cross changes). Next:
cd ../../ make
To build the latest OpenMV Cam firmware. You make target building the firmware for particular OpenMV Cam models by passing
make TARGET=OPENMV2 # To build the OpenMV Cam M4 Firmware ...
So what is my question, how to do it? Make for omv compiles micropython by itself? so why in this case I need to compile mpy-cross by myself? Do I need to compile mpy-cross, then compile ports/stm32/, and only after that compile openmv/ ?
It could be not any logical problem, it could be understanding not native lang problem - in this way I will be very appreciate if you can explain me what I misunderstood there. Big thanks to all and authors especially.