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 ?