I am trying to get my customized module compiled into the firmware, but failed. The main.py response module “hello” not found.
Source code of hello.py
def say():
print(“Hello!”)
Steps:
git clone the latest openmv.
put hello.py into openmv/scripts/libraries/
cd to openmv/src
execute: make TARGET=OPENMV4P -j6
copy build/bin/* into local folder ~/.config/OpenMV/qtcreator/firmware/OPENMV4P/
open openmv ide, and click the label of ‘Firmware Version’ to flash it.
enter the following code into IDE
import hello
hello.say()
and the IDE said no module named “hello”.
I checked twice for the md5 of the output firmware files, one the hello.py exists, and another I removed it. The md5 of binary files are the same, which inferring that the hello.py is not take effect.
Thanks for guiding the proper approach of flashing the firmware.
The tricky question is, no matter whether I put the hello.py in openmv/scripts/libraries/ or not, the md5 of compiled firmware always the same. It should not be that, since I’ve made some changed (adding the new hello module) for the firmware, the output firmware.bin shouldn’t be exactly the same.