Firmware build error via docker desktop

HI !

I want to build my own firmware, but I’ve never worked with Linux and docker desktop before. I have experience working with Windows only. I installed Docker Desktop, built an Linux image, and it appeared in Docker Desktop. Then I executed the following commands:

1.git clone GitHub - openmv/openmv: OpenMV Camera Module · GitHub .git --depth=50

2.cd openmv/docker

3.make TARGET=openmv_n6

# make TARGET=openmv_n6    
docker build \
        -t firmware-builder:latest \
        -f Dockerfile .
make: docker: No such file or directory
make: *** [Makefile:32: build-image] Error 127
# dir -s
total 16
4 Dockerfile  4 Makefile  4 README.md  4 build.sh
# 

The first and second commands are executed, but the third command returns an error

What am I doing wrong?

Why is the 3rd firmware build command not executed?

How should I spell it correctly?

Did you follow this? openmv/docker at master · openmv/openmv · GitHub

The TARGET needs to be TARGET=OPENMV_N6

Capitals matter.

It’s working now, but new errors occurred during the build process:

gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
gcc: error: unrecognized command-line option ‘-mthumb’
gcc: error: unrecognized command-line option ‘-mfpu=fpv5-d16’
gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
gcc: error: unrecognized command-line option ‘-mcmse’
gcc: error: unrecognized command-line option ‘-mthumb’
gcc: error: unrecognized command-line option ‘-mfpu=fpv5-d16’
gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
gcc: error: unrecognized command-line option ‘-mfp16-format=ieee’
gcc: error: unrecognized command-line option ‘-mcmse’

full log:

root@e980c6c6bfd8:/workspace/openmv# make SDK_DIR=/root/openmv-sdk-1.4.0 TARGET=OPENMV_N6
/bin/sh: 1: arm-none-eabi-gcc: not found
/bin/sh: 1: arithmetic expression: expecting primary: " * 100 + "
/bin/sh: 1: test: -lt: unexpected operator
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Including User C Module from /workspace/openmv/modules
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pins.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pybcdc.inf
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pybcdc_inf.h
GEN stmconst /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/modstm_const.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/mpversion.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstr.i.last
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstr.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstrdefs.collected.h
QSTR updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstrdefs.generated.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.collected
Module registrations updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.collected
Root pointer registrations updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.collected
Compressed data updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.data.h
AS ../../shared/runtime/gchelper_thumb2.s
AS resethandler_iram.s
CC /workspace/openmv/modules/py_clock.c
CC /workspace/openmv/modules/py_crc.c
CC /workspace/openmv/modules/py_csi.c
CC /workspace/openmv/modules/py_csi_ng.c
CC /workspace/openmv/modules/py_display.c
CC /workspace/openmv/modules/py_display_data.c
CC /workspace/openmv/modules/py_fir.c
CC /workspace/openmv/modules/py_ft5x06.c
CC /workspace/openmv/modules/py_gif.c
CC /workspace/openmv/modules/py_helper.c
CC /workspace/openmv/modules/py_image.c
CC /workspace/openmv/modules/py_imageio.c
CC /workspace/openmv/modules/py_imu.c
CC /workspace/openmv/modules/py_mjpeg.c
CC /workspace/openmv/modules/py_ml.c
CC /workspace/openmv/modules/py_omv.c
CC /workspace/openmv/modules/py_protocol.c
CC /workspace/openmv/modules/py_spi_display.c
CC /workspace/openmv/modules/py_tfp410.c
CC /workspace/openmv/modules/py_tof.c
CC /workspace/openmv/modules/py_tv.c
CC /workspace/openmv/modules/py_umalloc.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_audio.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_cpufreq.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_display.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_winc.c
CC /workspace/openmv/modules/ulab/code/scipy/integrate/integrate.c
CC /workspace/openmv/modules/ulab/code/scipy/linalg/linalg.c
CC /workspace/openmv/modules/ulab/code/scipy/optimize/optimize.c
CC /workspace/openmv/modules/ulab/code/scipy/signal/signal.c
CC /workspace/openmv/modules/ulab/code/scipy/special/special.c
CC /workspace/openmv/modules/ulab/code/ndarray_operators.c
CC /workspace/openmv/modules/ulab/code/ulab_tools.c
CC /workspace/openmv/modules/ulab/code/ndarray.c
CC /workspace/openmv/modules/ulab/code/numpy/ndarray/ndarray_iter.c
CC /workspace/openmv/modules/ulab/code/ndarray_properties.c
CC /workspace/openmv/modules/ulab/code/numpy/approx.c
CC /workspace/openmv/modules/ulab/code/numpy/bitwise.c
CC /workspace/openmv/modules/ulab/code/numpy/compare.c
CC /workspace/openmv/modules/ulab/code/numpy/carray/carray.c
CC /workspace/openmv/modules/ulab/code/numpy/carray/carray_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/create.c
CC /workspace/openmv/modules/ulab/code/numpy/fft/fft.c
CC /workspace/openmv/modules/ulab/code/numpy/fft/fft_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/filter.c
CC /workspace/openmv/modules/ulab/code/numpy/io/io.c
CC /workspace/openmv/modules/ulab/code/numpy/linalg/linalg.c
CC /workspace/openmv/modules/ulab/code/numpy/linalg/linalg_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/numerical.c
CC /workspace/openmv/modules/ulab/code/numpy/poly.c
CC /workspace/openmv/modules/ulab/code/numpy/random/random.c
CC /workspace/openmv/modules/ulab/code/numpy/stats.c
CC /workspace/openmv/modules/ulab/code/numpy/transform.c
CC /workspace/openmv/modules/ulab/code/numpy/vector.c
CC /workspace/openmv/modules/ulab/code/numpy/numpy.c
CC /workspace/openmv/modules/ulab/code/scipy/scipy.c
CC /workspace/openmv/modules/ulab/code/user/user.c
CC /workspace/openmv/modules/ulab/code/utils/utils.c
CC /workspace/openmv/modules/ulab/code/ulab.c
CC ../../py/mpstate.c
CC ../../py/nlr.c
CC ../../py/nlrx86.c
CC ../../py/nlrx64.c
CC ../../py/nlrthumb.c
CC ../../py/nlraarch64.c
CC ../../py/nlrmips.c
CC ../../py/nlrpowerpc.c
CC ../../py/nlrxtensa.c
CC ../../py/nlrrv32.c
CC ../../py/nlrrv64.c
CC ../../py/nlrsetjmp.c
CC ../../py/malloc.c
CC ../../py/gc.c
CC ../../py/pystack.c
CC ../../py/qstr.c
CC ../../py/vstr.c
CC ../../py/mpprint.c
CC ../../py/unicode.c
CC ../../py/mpz.c
CC ../../py/reader.c
CC ../../py/lexer.c
CC ../../py/parse.c
CC ../../py/scope.c
CC ../../py/compile.c
CC ../../py/emitcommon.c
CC ../../py/emitbc.c
CC ../../py/asmbase.c
CC ../../py/asmx64.c
CC ../../py/emitnx64.c
CC ../../py/asmx86.c
CC ../../py/emitnx86.c
CC ../../py/asmthumb.c
CC ../../py/emitnthumb.c
CC ../../py/emitinlinethumb.c
CC ../../py/asmarm.c
CC ../../py/emitnarm.c
CC ../../py/asmxtensa.c
CC ../../py/emitnxtensa.c
CC ../../py/emitinlinextensa.c
CC ../../py/emitnxtensawin.c
CC ../../py/asmrv32.c
CC ../../py/emitnrv32.c
CC ../../py/emitinlinerv32.c
CC ../../py/emitndebug.c
CC ../../py/formatfloat.c
CC ../../py/parsenumbase.c
CC ../../py/parsenum.c
CC ../../py/emitglue.c
CC ../../py/persistentcode.c
CC ../../py/runtime.c
CC ../../py/runtime_utils.c
CC ../../py/scheduler.c
CC ../../py/nativeglue.c
CC ../../py/pairheap.c
CC ../../py/ringbuf.c
CC ../../py/cstack.c
CC ../../py/stackctrl.c
CC ../../py/argcheck.c
CC ../../py/warning.c
CC ../../py/profile.c
CC ../../py/map.c
CC ../../py/obj.c
CC ../../py/objarray.c
CC ../../py/objattrtuple.c
CC ../../py/objbool.c
CC ../../py/objboundmeth.c
CC ../../py/objcell.c
CC ../../py/objclosure.c
CC ../../py/objcode.c
CC ../../py/objcomplex.c
CC ../../py/objdeque.c
CC ../../py/objdict.c
CC ../../py/objenumerate.c
CC ../../py/objexcept.c
CC ../../py/objfilter.c
CC ../../py/objfloat.c
CC ../../py/objfun.c
CC ../../py/objgenerator.c
CC ../../py/objgetitemiter.c
CC ../../py/objint.c
CC ../../py/objint_longlong.c
CC ../../py/objint_mpz.c
CC ../../py/objlist.c
CC ../../py/objmap.c
CC ../../py/objmodule.c
CC ../../py/objobject.c
CC ../../py/objpolyiter.c
CC ../../py/objproperty.c
CC ../../py/objnone.c
CC ../../py/objnamedtuple.c
CC ../../py/objrange.c
CC ../../py/objreversed.c
CC ../../py/objringio.c
CC ../../py/objset.c
CC ../../py/objsingleton.c
CC ../../py/objslice.c
CC ../../py/objstr.c
CC ../../py/objstrunicode.c
CC ../../py/objstringio.c
CC ../../py/objtemplate.c
CC ../../py/objtuple.c
CC ../../py/objtype.c
CC ../../py/objzip.c
CC ../../py/opmethods.c
CC ../../py/sequence.c
CC ../../py/stream.c
CC ../../py/binary.c
CC ../../py/builtinimport.c
CC ../../py/builtinevex.c
CC ../../py/builtinhelp.c
CC ../../py/modarray.c
CC ../../py/modbuiltins.c
CC ../../py/modcollections.c
CC ../../py/modgc.c
CC ../../py/modio.c
CC ../../py/modmath.c
CC ../../py/modcmath.c
CC ../../py/modmicropython.c
CC ../../py/modstring.c
CC ../../py/modstruct.c
CC ../../py/modsys.c
CC ../../py/moderrno.c
CC ../../py/modthread.c
gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
gcc: error: unrecognized command-line option '-mthumb'
gcc: error: unrecognized command-line option '-mfpu=fpv5-d16'
gcc: error: unrecognized command-line option '-mfloat-abi=hard'
gcc: error: unrecognized command-line option '-mcmse'
gcc: error: unrecognized command-line option '-mthumb'
gcc: error: unrecognized command-line option '-mfpu=fpv5-d16'
gcc: error: unrecognized command-line option '-mfloat-abi=hard'
gcc: error: unrecognized command-line option '-mfp16-format=ieee'
gcc: error: unrecognized command-line option '-mcmse'
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make[2]: *** [../py/mkrules.mk:101: /workspace/openmv/build/OPENMV_N6/lib/micropython/py/mpstate.o] Error 1
make[1]: *** [../../py/mkrules.mk:194: ../../mpy-cross/build/mpy-cross] Error 2
make: *** [common/micropy.mk:232: /workspace/openmv/build/OPENMV_N6/lib/libmicropython.a] Error 2
root@e980c6c6bfd8:/workspace/openmv#

How can I fix this?

It sounds like you are using desktop gcc and not arm-none-eabi-gcc.

Can you try make sdk first before make TARGET=OPENMV_N6?

Hi kwagyeman !

I’ve figured out how to install gcc-arm-none-eabi. Now, when I’m building the firmware, I’m getting a new error:

root@cd3b78e637e0:/workspace/openmv# make SDK_DIR=/root/openmv-sdk-1.4.0 TARGET=OPENMV_N6                                                                                                    
/workspace/openmv/common/check_toolchain.mk:12: *** ERROR ***                                                                                                                                
/workspace/openmv/common/check_toolchain.mk:13: GCC 13.2 has known issues with Cortex-M55
/workspace/openmv/common/check_toolchain.mk:14: Upgrade to GCC 14.3+ for proper CM55 support
/workspace/openmv/common/check_toolchain.mk:15: *** .  Stop.
root@cd3b78e637e0:/workspace/openmv#

I started to deal with this error and found out that Ubuntu 24.04 (Noble Numbat) is installed in the OpenMV docker, uses GCC 13 by default, and version 14 is available in the repositories. The last available version of GCC in Ubuntu 24.04 is 14.2.0. and there is no way to update it to version 14.3 (this is the minimum version at which the firmware for OpenMV (is built check_toolchain.mk)).

Can I ask you to update the Ubuntu build in Docker to a newer version, such as the latest version of Ubuntu 26.04 LTS (Resolute Raccoon), so that it supports GCC version 14.3 or even newer, which is necessary for building the firmware ? It is very important for me to continue building the firmware, and I believe it is also important for other OpenMV users.

Does this /root/openmv-sdk-1.4.0 actually contain the the SDK? The build uses tools from the SDK DIR it shouldn’t use system gcc unless it’s missing from there.

Note, I just merged a PR with fixes and improvements to docker build, and I’ve tested again on Linux and it’s working fine. Just pull and follow: openmv/docker/README.md at master · openmv/openmv · GitHub

Hi iabdalkader !

I’m following the instructions, but I can’t figure out where I’m going wrong and why the firmware isn’t building.

I downloaded the latest OpenMV from github today :

1: created an image using the docker build -t openmv . command

2: I launched a container built from the image and ran git clone --recursive GitHub - openmv/openmv: OpenMV Camera Module · GitHub

3: After installation, I ran the command cd openmv/docker and the command make install-sdk

4: I ran the command make build-firmware-dev TARGET=OPENMV_N6 and make build-firmware-dev SDK_DIR=/root/openmv-sdk-1.4.0/ TARGET=OPENMV_N6, but I got an error

root@16c9744f45d1:/workspace/openmv/docker# make install-sdk
OpenMV SDK 1.4.0 already installed.
root@16c9744f45d1:/workspace/openmv/docker# make build-firmware-dev TARGET=OPENMV_N6
ERROR: SDK_DIR=/workspace/sdk does not exist.
Run 'make install-sdk' to fetch the SDK pinned in SDK_VERSION,
or pass SDK_DIR=<path> on the make command line.
make: *** [Makefile:104: _check-sdk-dev] Error 1
root@16c9744f45d1:/workspace/openmv/docker# make build-firmware-dev SDK_DIR=/root/openmv-sdk-1.4.0/ TARGET=OPENMV_N6
docker build \
        -t firmware-builder:latest \
        -f Dockerfile .
make: docker: No such file or directory
make: *** [Makefile:32: build-image] Error 127
root@16c9744f45d1:/workspace/openmv/docker#

https://files.fm/f/4a9ry9rrax screenshot

ERROR: SDK_DIR=/workspace/sdk does not exist.

But after running the command make install-sdk, the SDK is installed in a different directory /root/openmv-sdk-1.4.0/

How can I install the SDK in the correct /workspace/sdk directory ?

I’m really not sure, it might be because you’re running as root. I’ve tested the build on 3 different machines and it works fines.

Hi, iabdalkader !

I want to thank you for not abandoning this problem and continuing to help me deal with it.

I confirm that if you create an Ubuntu image in VirtualBox according to your instructions, it will really work - the firmware is going fine!

But it seems to me that working in Windows via Docker Desktop is much more convenient and familiar for Windows users. Today I once again collected the latest docker image and the most up-to-date Openmv from Github. Then I did all the steps that I described in my last post.

Then, using mv /root/openmv-sdk-1.5.0 /workspace/sdk/ I moved the SDK to the correct path and restarted the firmware build.

Please take a look at this screenshot:

Screen

After starting the firmware build, there were no more errors about the lack of an SDK and the firmware build started, but at some stage it gave another error.

root@6717e02db07f:/workspace/openmv# make TARGET=OPENMV_N6
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Including User C Module from /workspace/openmv/modules
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pins.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pybcdc.inf
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/pybcdc_inf.h
GEN stmconst /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/modstm_const.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/mpversion.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstr.i.last
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstr.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstrdefs.collected.h
QSTR updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/qstrdefs.generated.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.collected
Module registrations updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/moduledefs.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.collected
Root pointer registrations updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/root_pointers.h
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.split
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.collected
Compressed data updated
GEN /workspace/openmv/build/OPENMV_N6/lib/micropython/genhdr/compressed.data.h
AS ../../shared/runtime/gchelper_thumb2.s
AS resethandler_iram.s
CC /workspace/openmv/modules/py_clock.c
CC /workspace/openmv/modules/py_crc.c
CC /workspace/openmv/modules/py_csi.c
CC /workspace/openmv/modules/py_csi_ng.c
CC /workspace/openmv/modules/py_display.c
CC /workspace/openmv/modules/py_display_data.c
CC /workspace/openmv/modules/py_fir.c
CC /workspace/openmv/modules/py_ft5x06.c
CC /workspace/openmv/modules/py_gif.c
CC /workspace/openmv/modules/py_helper.c
CC /workspace/openmv/modules/py_image.c
CC /workspace/openmv/modules/py_imageio.c
CC /workspace/openmv/modules/py_imu.c
CC /workspace/openmv/modules/py_mjpeg.c
CC /workspace/openmv/modules/py_ml.c
CC /workspace/openmv/modules/py_omv.c
CC /workspace/openmv/modules/py_protocol.c
CC /workspace/openmv/modules/py_spi_display.c
CC /workspace/openmv/modules/py_tfp410.c
CC /workspace/openmv/modules/py_tof.c
CC /workspace/openmv/modules/py_tv.c
CC /workspace/openmv/modules/py_umalloc.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_audio.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_cpufreq.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_display.c
CC /workspace/openmv/modules/../ports/stm32/modules/py_winc.c
CC /workspace/openmv/modules/ulab/code/scipy/integrate/integrate.c
CC /workspace/openmv/modules/ulab/code/scipy/linalg/linalg.c
CC /workspace/openmv/modules/ulab/code/scipy/optimize/optimize.c
CC /workspace/openmv/modules/ulab/code/scipy/signal/signal.c
CC /workspace/openmv/modules/ulab/code/scipy/special/special.c
CC /workspace/openmv/modules/ulab/code/ndarray_operators.c
CC /workspace/openmv/modules/ulab/code/ulab_tools.c
CC /workspace/openmv/modules/ulab/code/ndarray.c
CC /workspace/openmv/modules/ulab/code/numpy/ndarray/ndarray_iter.c
CC /workspace/openmv/modules/ulab/code/ndarray_properties.c
CC /workspace/openmv/modules/ulab/code/numpy/approx.c
CC /workspace/openmv/modules/ulab/code/numpy/bitwise.c
CC /workspace/openmv/modules/ulab/code/numpy/compare.c
CC /workspace/openmv/modules/ulab/code/numpy/carray/carray.c
CC /workspace/openmv/modules/ulab/code/numpy/carray/carray_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/create.c
CC /workspace/openmv/modules/ulab/code/numpy/fft/fft.c
CC /workspace/openmv/modules/ulab/code/numpy/fft/fft_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/filter.c
CC /workspace/openmv/modules/ulab/code/numpy/io/io.c
CC /workspace/openmv/modules/ulab/code/numpy/linalg/linalg.c
CC /workspace/openmv/modules/ulab/code/numpy/linalg/linalg_tools.c
CC /workspace/openmv/modules/ulab/code/numpy/numerical.c
CC /workspace/openmv/modules/ulab/code/numpy/poly.c
CC /workspace/openmv/modules/ulab/code/numpy/random/random.c
CC /workspace/openmv/modules/ulab/code/numpy/stats.c
CC /workspace/openmv/modules/ulab/code/numpy/transform.c
CC /workspace/openmv/modules/ulab/code/numpy/vector.c
CC /workspace/openmv/modules/ulab/code/numpy/numpy.c
CC /workspace/openmv/modules/ulab/code/scipy/scipy.c
CC /workspace/openmv/modules/ulab/code/user/user.c
CC /workspace/openmv/modules/ulab/code/utils/utils.c
CC /workspace/openmv/modules/ulab/code/ulab.c
CC ../../py/mpstate.c
CC ../../py/nlr.c
CC ../../py/nlrx86.c
CC ../../py/nlrx64.c
CC ../../py/nlrthumb.c
CC ../../py/nlraarch64.c
CC ../../py/nlrmips.c
CC ../../py/nlrpowerpc.c
CC ../../py/nlrxtensa.c
CC ../../py/nlrrv32.c
CC ../../py/nlrrv64.c
CC ../../py/nlrsetjmp.c
CC ../../py/malloc.c
CC ../../py/gc.c
CC ../../py/pystack.c
CC ../../py/qstr.c
CC ../../py/vstr.c
CC ../../py/mpprint.c
CC ../../py/unicode.c
CC ../../py/mpz.c
CC ../../py/reader.c
CC ../../py/lexer.c
CC ../../py/parse.c
CC ../../py/scope.c
CC ../../py/compile.c
CC ../../py/emitcommon.c
CC ../../py/emitbc.c
CC ../../py/asmbase.c
CC ../../py/asmx64.c
CC ../../py/emitnx64.c
CC ../../py/asmx86.c
CC ../../py/emitnx86.c
CC ../../py/asmthumb.c
CC ../../py/emitnthumb.c
CC ../../py/emitinlinethumb.c
CC ../../py/asmarm.c
CC ../../py/emitnarm.c
CC ../../py/asmxtensa.c
CC ../../py/emitnxtensa.c
CC ../../py/emitinlinextensa.c
CC ../../py/emitnxtensawin.c
CC ../../py/asmrv32.c
CC ../../py/emitnrv32.c
CC ../../py/emitinlinerv32.c
CC ../../py/emitndebug.c
CC ../../py/formatfloat.c
CC ../../py/parsenumbase.c
CC ../../py/parsenum.c
CC ../../py/emitglue.c
CC ../../py/persistentcode.c
CC ../../py/runtime.c
CC ../../py/runtime_utils.c
CC ../../py/scheduler.c
CC ../../py/nativeglue.c
CC ../../py/pairheap.c
CC ../../py/ringbuf.c
CC ../../py/cstack.c
CC ../../py/stackctrl.c
CC ../../py/argcheck.c
CC ../../py/warning.c
CC ../../py/profile.c
CC ../../py/map.c
CC ../../py/obj.c
CC ../../py/objarray.c
CC ../../py/objattrtuple.c
CC ../../py/objbool.c
CC ../../py/objboundmeth.c
CC ../../py/objcell.c
CC ../../py/objclosure.c
CC ../../py/objcode.c
CC ../../py/objcomplex.c
CC ../../py/objdeque.c
CC ../../py/objdict.c
CC ../../py/objenumerate.c
CC ../../py/objexcept.c
CC ../../py/objfilter.c
CC ../../py/objfloat.c
CC ../../py/objfun.c
CC ../../py/objgenerator.c
CC ../../py/objgetitemiter.c
CC ../../py/objint.c
CC ../../py/objint_longlong.c
CC ../../py/objint_mpz.c
CC ../../py/objlist.c
CC ../../py/objmap.c
CC ../../py/objmodule.c
CC ../../py/objobject.c
CC ../../py/objpolyiter.c
CC ../../py/objproperty.c
CC ../../py/objnone.c
CC ../../py/objnamedtuple.c
CC ../../py/objrange.c
CC ../../py/objreversed.c
CC ../../py/objringio.c
CC ../../py/objset.c
CC ../../py/objsingleton.c
CC ../../py/objslice.c
CC ../../py/objstr.c
CC ../../py/objstrunicode.c
CC ../../py/objstringio.c
CC ../../py/objtemplate.c
CC ../../py/objtuple.c
CC ../../py/objtype.c
CC ../../py/objzip.c
CC ../../py/opmethods.c
CC ../../py/sequence.c
CC ../../py/stream.c
CC ../../py/binary.c
CC ../../py/builtinimport.c
CC ../../py/builtinevex.c
CC ../../py/builtinhelp.c
CC ../../py/modarray.c
CC ../../py/modbuiltins.c
CC ../../py/modcollections.c
CC ../../py/modgc.c
CC ../../py/modio.c
CC ../../py/vm.c
CC ../../py/bc.c
CC ../../py/showbc.c
CC ../../py/repl.c
CC ../../py/smallint.c
CC ../../py/frozenmod.c
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC ../py/mpstate.c
gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
gcc: error: unrecognized command-line option '-mthumb'
gcc: error: unrecognized command-line option '-mfpu=fpv5-d16'
gcc: error: unrecognized command-line option '-mfloat-abi=hard'
gcc: error: unrecognized command-line option '-mcmse'
gcc: error: unrecognized command-line option '-mthumb'
gcc: error: unrecognized command-line option '-mfpu=fpv5-d16'
gcc: error: unrecognized command-line option '-mfloat-abi=hard'
gcc: error: unrecognized command-line option '-mfp16-format=ieee'
gcc: error: unrecognized command-line option '-mcmse'
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make[2]: *** [../py/mkrules.mk:101: /workspace/openmv/build/OPENMV_N6/lib/micropython/py/mpstate.o] Error 1
make[1]: *** [../../py/mkrules.mk:194: ../../mpy-cross/build/mpy-cross] Error 2
make: *** [common/micropy.mk:232: /workspace/openmv/build/OPENMV_N6/lib/libmicropython.a] Error 2
root@6717e02db07f:/workspace/openmv#

There may be quite a bit left before the fix and it can be collected already in Docker Desktop. Would you have a chance to look again at what needs to be fixed or which command to apply? I can give you remote access to my computer If you send me your email or reply in private messages. I really hope for your help, maybe there is only one step left to victory!

Maybe I need to force the path to the compiler somehow? I haven’t worked with Linux before, so it’s difficult for me to troubleshoot this error on my own

I must have missed this. I only tested on macOS, Arch and Ubuntu, this has never been tested on Windows as far as I know. I assume you’re running this on WSL, correct?

You’re not really supposed to move the SDK anywhere, the default path is $(HOME)/openmv-sdk-$(SDK_VERSION). Running make sdk installs it where it needs to be and the docker command mounts it on workspace/sdk.

All those errors are the same, somehow MicroPython builds with the host gcc instead of the cross-compiler, which should be impossible unless you’re overriding CROSS_COMPILE ?= arm-none-eabi-

You could try to debug this by adding this in micropython/ports/stm32/Makefile near the top:

$(info "CORSS_COMPILE $(CROSS_COMPILE)")
$(info $(shell which arm-none-eabi-gcc))

Running make sdk installs it where it needs to be and the docker command mounts it on workspace/sdk

In my previous post, I wrote and attached a screenshot showing that when I run the make sdk command, the SDK is not installed in the workspace/sdk folder, but instead is installed in the /root/openmv-sdk-1.5.0/ folder. I don’t know why this is happening, so I used the mv /root/openmv-sdk-1.5.0/ /workspace/sdk/ command to move the SDK from the /root/openmv-sdk-1.5.0/ folder to the workspace/sdk folder. I don’t know how to install it directly in the workspace/sdk folder, and the make sdk command doesn’t do it.

which should be impossible unless you’re overriding CROSS_COMPILE ?= arm-none-eabi-

No, I don’t do that.

$(info “CORSS_COMPILE $(CROSS_COMPILE)”)
$(info $(shell which arm-none-eabi-gcc))

I’ll check it out tomorrow, as I have a computer at work and my workday has ended. I’ll do it in the morning and write it here.

It’s not, docker mounts it there.

It’s not, docker mounts it there.

I understand you. I’m running the make sdk. And if it is not moved to the workspace/sdk/ folder later, an error about the missing SDK will appear. But if I do not move the SDK folder, when starting the firmware build (make TARGET=<TARGET_NAME>) , an error about the absence of the SDK immediately appears. Tomorrow I won’t make any moves and will take a screenshot of the error.

root@16c9744f45d1:/workspace/openmv/docker# make install-sdk
OpenMV SDK 1.4.0 already installed.
root@16c9744f45d1:/workspace/openmv/docker# make build-firmware-dev TARGET=OPENMV_N6
ERROR: SDK_DIR=/workspace/sdk does not exist.
Run 'make install-sdk' to fetch the SDK pinned in SDK_VERSION,
or pass SDK_DIR=<path> on the make command line.

I just copied the log from my previous message, which I wrote last week

ERROR: SDK_DIR=/workspace/sdk does not exist.

It says that the SDK is installed. But when I run the firmware build, it gives me this error. So I forcefully move the SDK from /root/openmv-sdk-1.5.0/ to the workspace/sdk/ folder

That seems to be the main issue then. I don’t have a Windows machine to test this and I tried UTM + Windows Arm but Docker is not working. Perhaps @kwagyeman can help.

Btw, you could just bypass Docker completely and build directly on WSL. It should work if you are on an x86_64 machine. This is a viable option, worth a shot.

Sure, I can check it out today. I do all my development on WSL on windows. I don’t think windows directly is a viable path.

HI iabdalkader, kwagyeman !

Thank you so much for your work and for your help ! Since I haven’t worked with Linux before, I don’t have any experience or knowledge of Linux-related software. I’ve read about WSL and it’s fantastic ! The seamless integration with Windows is probably the best and most convenient solution for building the OpenMV firmware ! It’s also much more interesting than Docker Desktop ! I’m going to try installing WSL on Windows 11 and configuring Ubuntu to build the OpenMV firmware ! You are the best! !!! Thank you for the tip !

I’ll write back after I’ve tested it !

Yeah, WSL is so much easier. Then you just install vscode on it and you can work from that. You get native terminal access and you can just install stuff like it’s linux. Everything just works. You can even launch gui apps and they appear rendered right next to windows apps.

HI iabdalkader, kwagyeman !

WSL is a bomb ! It’s very cool !

It’s very easy, it’s very fast, and it’s very, very convenient!

I’ve tested it, and it works flawlessly on Windows 11. Seamless integration with Windows allows me to access all the necessary files without any additional steps.

Please add to the documentation openmv/docs/firmware.md at master · openmv/openmv · GitHub in the “Build for Windows” section a way to build the firmware yourself via WSL and mark it as the fastest, most convenient and simple! This is much more convenient than VMware Player or VirtualBox.

I’m going to try to install vscode and the Remote - WSL access plugin.

Thank you again for helping me with this issue, and now I can quickly and easily build OpenMV firmware!

I used these commands according to your instructions, and the firmware built perfectly from the sources.

sudo apt-get update
sudo apt-get install git build-essential

git clone --recursive https://github.com/openmv/openmv.git

cd openmv
make sdk

make -j$(nproc) -C lib/micropython/mpy-cross
make -j$(nproc) TARGET=OPENMV_N6

I noticed an error, but it may not be important. I encountered the same issue when building the firmware in VirtualBox.

make: *** [/home/user/openmv/ports/stm32/port_config.mk:187: /home/user/openmv/build/OPENMV_N6/bin/romfs.stamp] Error 1

full log:

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/home/user/openmv-sdk-1.5.0/python/lib/python3.12/concurrent/futures/process.py", line 258, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/openmv/tools/mkromfs.py", line 100, in process_entry
    stedge_compile(file_path, build_dir, entry["profile"], stedge_args.split())
  File "/home/user/openmv/tools/modelc.py", line 99, in stedge_compile
    raise(e)
  File "/home/user/openmv/tools/modelc.py", line 94, in stedge_compile
    result = subprocess.run(generate_command, check=True, text=True, env=env,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/openmv-sdk-1.5.0/python/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['stedgeai', 'generate', '--target', 'stm32n6', '--model', '/home/user/openmv/lib/models/yolo_lc_192.tflite', '--relocatable', '--st-neural-art', 'default@/home/user/openmv/lib/stai/scripts/neuralart.json', '--workspace', '/home/user/openmv/build/OPENMV_N6/lib/models/yolo_lc_192/workspace', '--output', '/home/user/openmv/build/OPENMV_N6/lib/models/yolo_lc_192/gen', '--verbosity', '1']' died with <Signals.SIGABRT: 6>.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user/openmv/tools/mkromfs.py", line 238, in <module>
    main()
  File "/home/user/openmv/tools/mkromfs.py", line 232, in main
    romfs_build(romfs_cfg, p, args)
  File "/home/user/openmv/tools/mkromfs.py", line 145, in romfs_build
    results[idx] = future.result()
                   ^^^^^^^^^^^^^^^
  File "/home/user/openmv-sdk-1.5.0/python/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/openmv-sdk-1.5.0/python/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
subprocess.CalledProcessError: Command '['stedgeai', 'generate', '--target', 'stm32n6', '--model', '/home/user/openmv/lib/models/yolo_lc_192.tflite', '--relocatable', '--st-neural-art', 'default@/home/user/openmv/lib/stai/scripts/neuralart.json', '--workspace', '/home/user/openmv/build/OPENMV_N6/lib/models/yolo_lc_192/workspace', '--output', '/home/user/openmv/build/OPENMV_N6/lib/models/yolo_lc_192/gen', '--verbosity', '1']' died with <Signals.SIGABRT: 6>.
make: *** [/home/user/openmv/ports/stm32/port_config.mk:187: /home/user/openmv/build/OPENMV_N6/bin/romfs.stamp] Error 1
user@DESKTOP-DQIQTLT:~/openmv$