Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling with "latest" instead of recommended Git pointers / Provide newer firmwares #78

Open
The-Judge opened this issue Feb 17, 2023 · 1 comment

Comments

@The-Judge
Copy link

I know that the README says that one needs to compile against specific Git Hashes because Micropython changes a lot. Anyways: With Micropython 1.19.1 out and 1.20 coming soon, it would be great to have a way to use the camera module and drivers with newer Micropython versions.

I ignored the warnings about the specific Git commit hashes and used this instead:

I tried on MacOS and Linux and both time, I got the same result:

Generating ../../genhdr/moduledefs.h
FAILED: genhdr/moduledefs.h 
cd /home/fresh/esp32-cam/micropython/ports/esp32/build-ESP32_CAM/esp-idf/main && /home/fresh/.espressif/python_env/idf4.3_py3.8_env/bin/python3.8 /home/fresh/esp32-cam/micropython/py/makemoduledefs.py /home/fresh/esp32-cam/micropython/ports/esp32/build-ESP32_CAM/genhdr/moduledefs.collected > /home/fresh/esp32-cam/micropython/ports/esp32/build-ESP32_CAM/genhdr/moduledefs.h
ERROR: Call to MP_REGISTER_MODULE(MP_QSTR_camera, mp_module_camera_system, (1)) should be MP_REGISTER_MODULE(MP_QSTR_camera, mp_module_camera_system)

It would be absolutely great, if you could update this repo and guide to work with latest Micropython once ... I don't know: Once a year or once per Micropython Major/minor release?

Alternatively, release updated firmware from time to time - that would be really great!

tacker66 added a commit to tacker66/micropython-camera-driver that referenced this issue Mar 15, 2023
@matteopiccadaci
Copy link

matteopiccadaci commented Jun 21, 2023

Hi, I'm trying to have the camera module on MicroPython 1.20. I've had the same error The-Judge found and with the modification of tacker66's commit I managed to build the firmware, but when I write "import camera" I get that the module is not installed. Has anyone a solution?

P.S. I also had another problem during the building of the firmware, something like this:

FAILED: esp-idf/main/CMakeFiles/BUILD_FROZEN_CONTENT frozen_content.c /project/micropython/ports/esp32/build-ESP32_CAM/esp-idf/main/CMakeFiles/BUILD_FROZEN_CONTENT /project/micropython/ports/esp32/build-ESP32_CAM/frozen_content.c 

cd /project/micropython/ports/esp32/build-ESP32_CAM/esp-idf/main && /opt/esp/python_env/idf4.4_py3.8_env/bin/python3.8 /project/micropython/tools/makemanifest.py -o /project/micropython/ports/esp32/build-ESP32_CAM/frozen_content.c -v MPY_DIR=/project/micropython -v MPY_LIB_DIR=/project/micropython/lib/micropython-lib -v PORT_DIR=/project/micropython/ports/esp32 -v BOARD_DIR=/project/micropython/ports/esp32/boards/ESP32_CAM 
-b /project/micropython/ports/esp32/build-ESP32_CAM -f-march=xtensawin --mpy-tool-flags=\"/project/micropython/ports/esp32/board/manifest.py\" /boards/manifest.py

freeze error executing "/boards/manifest.py": Error in manifest file: /boards/manifest.py: [Errno 2] No such file or directory: '/boards/manifest.py'

To solve this, I modified the file micropython/py/mkrules.cmake at line 203.
It should be like this:

COMMAND ${Python3_EXECUTABLE} ${MICROPY_DIR}/tools/makemanifest.py -o ${MICROPY_FROZEN_CONTENT} -v "MPY_DIR=${MICROPY_DIR}" -v "MPY_LIB_DIR=${MICROPY_LIB_DIR}" -v "PORT_DIR=${MICROPY_PORT_DIR}" -v "BOARD_DIR=${MICROPY_BOARD_DIR}" -b "${CMAKE_BINARY_DIR}" -f${MICROPY_CROSS_FLAGS} --mpy-tool-flags=${MICROPY_MPY_TOOL_FLAGS} "micropython/ports/esp32/boards/manifest.py"

You have to change the variable ${MICROPY_FROZEN_MANIFEST} to the full path to boards/manifest.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants