Firmware build error via docker desktop

Oh, that just fails randomly for the N6. It also sometimes passes. Vela compiler is perfect and never fails for the AE3. Not clear why st-edge-ai has issues for the N6. It might be related to running out of memory or etc. As mentioned, it sometimes passes for me or fails. Like, of the processes kicked off most may pass and one fails killing the romfs compile. Or sometimes all pass.

To make things go faster we kick off all the stedge-ai builds in parallel. So, it’s probably some memory or resource conflict issue. That said, even when they were being kicked off serially they still pass/failed randomly.

I always update ROMFS from the IDE so I ignore that. The ROMFS is built after the firmware build competes. Once you see the memory stats table appear with flash usage, ram, and etc. you are good.

Will do about using WSL for the docs.

kwagyeman Thanks !

I installed VSCODE and the plugin - it’s a very convenient solution ! Now I can edit code directly from Windows !

Thank you so much for suggesting this method !

Install Claude code in vscode and then it does the work for you.

iabdalkader, kwagyeman !!!

Guys - you are so cool !!!

You have amazing developments ! And you are so communicative, help and give great advice ! I have never worked with Claude code, now I will install it in VSCode, please tell me a simple example how I can use it for OpenMV ?

You just ask it literally whatever you want to do and it can do it. Ask it to compile the code for a board and it will figure it out. Ask it to write you a python script to do what you want and it will get you almost all the way there. It may generate bugs, but they you just tell it what’s wrong and it fixes them (sometimes).

Great ! I’ll try to do that !

I’m glad it works!

I agree, WSL should be the only documented build method for Windows. Regarding the intermittent stedgeai failure, I never see that on linux or macos and I build 10s of times a day. This might be a good reason for us to upgrade the SDK with stedgeai 4.0 (we’re on 3.0).

Great!

Can you tell me how to update the SDK to stedgeai 4.0?

It’s not that easy because you’re on Windows but you’re using the Linux SDK in WSL, you’d have to install stedge ai core 4.0 on Linux VM, and then replace ~/openmv-sdk-1.5.0/stedgeai/* with the contents of the 4.0. I’d just keep what’s working for now until we release a new SDK. I might be able to do that soon, this week or the next.

Great !

I’ll be waiting for you to update this SDK!

FYI we now have the latest ST EdgeAI core in SDK 1.6.0.

Super ! I’ll check the firmware build with the new SDK today ! Thank you so much !

HI iabdalkader !

I tested it using the new SDK. During the firmware build, I received the following messages:

GEN linker script
Memory region         Used Size  Region Size  %age Used
            DTCM:        128 KB       128 KB    100.00%
            ITCM:        6256 B        64 KB      9.55%
           SRAM1:     1040288 B         1 MB     99.21%
           SRAM2:          1 MB         1 MB    100.00%
           SRAM3:       1792 KB      1792 KB    100.00%
           SRAM7:          1 KB        32 KB      3.12%
            DRAM:         56 MB        64 MB     87.50%
      FLASH_TEXT:     1892216 B      3584 KB     51.56%
GEN romfs image
stedgeai command failed with exit code -6
stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/force_int_quant.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen --verbosity 1
stedgeai command failed with exit code -6
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
stedgeai command failed with exit code -6
stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/person_detect.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/person_detect/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/person_detect/gen --verbosity 1
stedgeai command failed with exit code -6
stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/fomo_face_detection.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/fomo_face_detection/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/fomo_face_detection/gen --verbosity 1

Then there were several messages with tables of models, the last one being : Model: movenet_singlepose_192

Then this message:

concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/user/openmv-sdk-1.6.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.6.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/force_int_quant.tflite', '--relocatable', '--st-neural-art', 'default@/home/user/openmv/lib/stai/scripts/neuralart.json', '--workspace', '/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace', '--output', '/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/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.6.0/python/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/openmv-sdk-1.6.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/force_int_quant.tflite', '--relocatable', '--st-neural-art', 'default@/home/user/openmv/lib/stai/scripts/neuralart.json', '--workspace', '/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace', '--output', '/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/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-87N36PP:~/openmv$ 

the .img file was not created

Hi Frank, with the new SDK the failure rate of compiling for me went to 0. I get this output:

Memory region         Used Size  Region Size  %age Used
            DTCM:        128 KB       128 KB    100.00%
            ITCM:        6256 B        64 KB      9.55%
           SRAM1:     1039968 B         1 MB     99.18%
           SRAM2:          1 MB         1 MB    100.00%
           SRAM3:       1792 KB      1792 KB    100.00%
           SRAM7:          1 KB        32 KB      3.12%
            DRAM:         56 MB        64 MB     87.50%
      FLASH_TEXT:     1892288 B      3584 KB     51.56%
GEN romfs image
Cascade:                       haarcascade_smile                                 
Format:                        Old                                               
Size:                          36x18                                             
Number of Stages:              20                                                
Number of Features:            569                                               
Number of Rectangles:          1245                                              

Cascade:                       haarcascade_eye                                   
Format:                        Old                                               
Size:                          20x20                                             
Number of Stages:              24                                                
Number of Features:            1066                                              
Number of Rectangles:          2299                                              

Cascade:                       haarcascade_frontalface                           
Format:                        Old                                               
Size:                          24x24                                             
Number of Stages:              25                                                
Number of Features:            2913                                              
Number of Rectangles:          6383                                              

Model: force_int_quant
XIP size             = 4,992      data(596)+got(52)+bss(4288) sections
COPY size            = 16,512     +ro(11520) sections
extra sections       = 220        got:52(1.0%) header+rel:168(1.5%)
params size          = 6,865
acts size            = 180
binary file size     = 19,104
params file size     = 0

+--------------------------+----------------------------------+------+------------+------+
| name (addr)              | flags                            | foff | dst        | size |
+--------------------------+----------------------------------+------+------------+------+
| xSPI2 (0x20001b58)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 6865 |
| AXISRAM5 (0x20001b5e)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 180  |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0    |
+--------------------------+----------------------------------+------+------------+------+
Table: mempool c-descriptors (off=40000218, 3 entries, from RAM)


Model: yolo_lc_192
XIP size             = 34,560     data(596)+got(52)+bss(33856) sections
COPY size            = 75,776     +ro(41216) sections
extra sections       = 228        got:52(0.2%) header+rel:176(0.4%)
params size          = 275,905
acts size            = 258,048
binary file size     = 317,848
params file size     = 0

+--------------------------+----------------------------------+------+------------+--------+
| name (addr)              | flags                            | foff | dst        | size   |
+--------------------------+----------------------------------+------+------------+--------+
| xSPI2 (0x20001b69)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 275905 |
| AXISRAM5 (0x20001b6f)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 258048 |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0      |
+--------------------------+----------------------------------+------+------------+--------+
Table: mempool c-descriptors (off=40000218, 3 entries, from RAM)


Model: fomo_face_detection
XIP size             = 29,440     data(596)+got(56)+bss(28736) sections
COPY size            = 72,008     +ro(42568) sections
extra sections       = 240        got:56(0.2%) header+rel:184(0.4%)
params size          = 20,753
acts size            = 138,240
binary file size     = 64,064
params file size     = 0

+--------------------------+----------------------------------+------+------------+--------+
| name (addr)              | flags                            | foff | dst        | size   |
+--------------------------+----------------------------------+------+------------+--------+
| xSPI2 (0x2000344c)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 20753  |
| AXISRAM5 (0x20003452)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 138240 |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0      |
+--------------------------+----------------------------------+------+------------+--------+
Table: mempool c-descriptors (off=40000218, 3 entries, from RAM)


Model: person_detect
XIP size             = 48,384     data(548)+got(56)+bss(47744) sections
COPY size            = 110,216    +ro(61832) sections
extra sections       = 236        got:56(0.1%) header+rel:180(0.3%)
params size          = 211,745
acts size            = 55,296
binary file size     = 274,272
params file size     = 0

+--------------------------+----------------------------------+------+------------+--------+
| name (addr)              | flags                            | foff | dst        | size   |
+--------------------------+----------------------------------+------+------------+--------+
| xSPI2 (0x2000352f)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 211745 |
| AXISRAM5 (0x20003535)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 55296  |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0      |
+--------------------------+----------------------------------+------+------------+--------+
Table: mempool c-descriptors (off=400001e8, 3 entries, from RAM)


Model: blazeface_front_128
XIP size             = 88,704     data(5696)+got(756)+bss(82240) sections
COPY size            = 193,216    +ro(104512) sections
extra sections       = 1,444      got:756(0.9%) header+rel:688(0.7%)
params size          = 108,673
acts size            = 540,672
binary file size     = 220,232
params file size     = 0

+--------------------------+----------------------------------+------+------------+--------+
| name (addr)              | flags                            | foff | dst        | size   |
+--------------------------+----------------------------------+------+------------+--------+
| xSPI2 (0x20003eea)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 108673 |
| AXISRAM5 (0x20003ef0)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 425984 |
| AXISRAM4 (0x20003ef9)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34270000 | 114688 |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0      |
+--------------------------+----------------------------------+------+------------+--------+
Table: mempool c-descriptors (off=400015f0, 4 entries, from RAM)


Model: hand_landmarks_full_224
XIP size             = 128,320    data(968)+got(64)+bss(127232) sections
COPY size            = 265,856    +ro(137536) sections
extra sections       = 304        got:64(0.0%) header+rel:240(0.2%)
params size          = 3,182,977
acts size            = 1,781,248
binary file size     = 3,321,688
params file size     = 0

+--------------------------+----------------------------------+------+------------+---------+
| name (addr)              | flags                            | foff | dst        | size    |
+--------------------------+----------------------------------+------+------------+---------+
| xSPI1 (0x20002407)       | 0x01020601 RELOC.ACTIV.1.WCACHED | 0    | 0x00000000 | 802816  |
| xSPI2 (0x2000240d)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 3182977 |
| AXISRAM5 (0x20002413)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 451584  |
| AXISRAM4 (0x2000241c)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34270000 | 451584  |
| AXISRAM3 (0x20002425)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34200000 | 75264   |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0       |
+--------------------------+----------------------------------+------+------------+---------+
Table: mempool c-descriptors (off=40000350, 6 entries, from RAM)


Model: movenet_singlepose_192
XIP size             = 143,360    data(924)+got(92)+bss(142336) sections
COPY size            = 302,480    +ro(159120) sections
extra sections       = 312        got:92(0.1%) header+rel:220(0.1%)
params size          = 2,638,753
acts size            = 1,327,104
binary file size     = 2,799,016
params file size     = 0

+--------------------------+----------------------------------+------+------------+---------+
| name (addr)              | flags                            | foff | dst        | size    |
+--------------------------+----------------------------------+------+------------+---------+
| xSPI2 (0x20003d07)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 2638753 |
| AXISRAM5 (0x20003d0d)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 442368  |
| AXISRAM4 (0x20003d16)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34270000 | 425984  |
| AXISRAM3 (0x20003d1f)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34200000 | 458752  |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0       |
+--------------------------+----------------------------------+------+------------+---------+
Table: mempool c-descriptors (off=40000338, 5 entries, from RAM)


Model: face_landmarks_192
XIP size             = 146,304    data(2336)+got(220)+bss(143744) sections
COPY size            = 303,488    +ro(157184) sections
extra sections       = 608        got:220(0.2%) header+rel:388(0.2%)
params size          = 616,577
acts size            = 737,280
binary file size     = 776,616
params file size     = 0

+--------------------------+----------------------------------+------+------------+--------+
| name (addr)              | flags                            | foff | dst        | size   |
+--------------------------+----------------------------------+------+------------+--------+
| xSPI2 (0x20002e6a)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 616577 |
| AXISRAM5 (0x20002e70)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 442368 |
| AXISRAM4 (0x20002e79)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34270000 | 294912 |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0      |
+--------------------------+----------------------------------+------+------------+--------+
Table: mempool c-descriptors (off=400008d0, 4 entries, from RAM)


Model: palm_detection_full_192
XIP size             = 323,200    data(2112)+got(220)+bss(320832) sections
COPY size            = 666,192    +ro(342992) sections
extra sections       = 596        got:220(0.1%) header+rel:376(0.1%)
params size          = 1,122,641
acts size            = 1,506,496
binary file size     = 1,468,248
params file size     = 0

+--------------------------+----------------------------------+------+------------+---------+
| name (addr)              | flags                            | foff | dst        | size    |
+--------------------------+----------------------------------+------+------------+---------+
| xSPI2 (0x20004e75)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 1122641 |
| AXISRAM6 (0x20004e7b)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34350000 | 294912  |
| AXISRAM5 (0x20004e84)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 457920  |
| AXISRAM4 (0x20004e8d)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34270000 | 294912  |
| AXISRAM3 (0x20004e96)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x34200000 | 458752  |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0       |
+--------------------------+----------------------------------+------+------------+---------+
Table: mempool c-descriptors (off=400007c8, 6 entries, from RAM)


Model: yolov8n_192
XIP size             = 195,648    data(5148)+got(252)+bss(190208) sections
COPY size            = 415,816    +ro(220168) sections
extra sections       = 1,192      got:252(0.1%) header+rel:940(0.4%)
params size          = 3,006,993
acts size            = 276,480
binary file size     = 3,233,408
params file size     = 0

+--------------------------+----------------------------------+------+------------+---------+
| name (addr)              | flags                            | foff | dst        | size    |
+--------------------------+----------------------------------+------+------------+---------+
| xSPI2 (0x200064e7)       | 0x01010500 RELOC.PARAM.0.RCACHED | 0    | 0x00000000 | 3006993 |
| AXISRAM5 (0x200064ed)    | 0x03020200 RESET.ACTIV.WRITE     | 0    | 0x342e0000 | 276480  |
| <undefined> (0x00000000) | 0x00000000 UNUSED                | 0    | 0x00000000 | 0       |
+--------------------------+----------------------------------+------+------------+---------+
Table: mempool c-descriptors (off=400013e0, 3 entries, from RAM)


romfs image: "romfs0.img" usage: 12282.3KiB / 24576.0KiB (50.0%)
 -size: 64064    alignment: 32   path: /rom/fomo_face_detection.tflite
 -size: 15       alignment: 4    path: /rom/fomo_face_detection.txt
 -size: 19104    alignment: 32   path: /rom/force_int_quant.tflite
 -size: 274272   alignment: 32   path: /rom/person_detect.tflite
 -size: 17       alignment: 4    path: /rom/person_detect.txt
 -size: 317848   alignment: 32   path: /rom/yolo_lc_192.tflite
 -size: 8        alignment: 4    path: /rom/yolo_lc_192.txt
 -size: 3233408  alignment: 32   path: /rom/yolov8n_192.tflite
 -size: 8        alignment: 4    path: /rom/yolov8n_192.txt
 -size: 220232   alignment: 32   path: /rom/blazeface_front_128.tflite
 -size: 776616   alignment: 32   path: /rom/face_landmarks_192.tflite
 -size: 1468248  alignment: 32   path: /rom/palm_detection_full_192.tflite
 -size: 3321688  alignment: 32   path: /rom/hand_landmarks_full_224.tflite
 -size: 2799016  alignment: 32   path: /rom/movenet_singlepose_192.tflite
 -size: 19041    alignment: 4    path: /rom/haarcascade_eye.cascade
 -size: 10280    alignment: 4    path: /rom/haarcascade_smile.cascade
 -size: 52396    alignment: 4    path: /rom/haarcascade_frontalface.cascade

   text    data     bss     dec     hex filename
  46284      32   22320   68636   10c1c /home/kwagyeman/github/openmv/build/OPENMV_N6/bin/bootloader.elf
   text    data     bss     dec     hex filename
1884792    7496 62759520        64651808        3da8220 /home/kwagyeman/github/openmv/build/OPENMV_N6/bin/firmware.elf
(.venv) kwagyeman@KWALAPTOP:~/github/openmv$ 

It looks like the commands failed for some other reason. Can you try copying the line that failed and manually running it?

./stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/force_int_quant.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen --verbosity 1

I’m probably doing it wrong, please tell me how to do it correctly. This is my first experience with Linux

user@DESKTOP-87N36PP:~/openmv$ ./stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/force_int_quant.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen --verbosity 1
bash: ./stedgeai: No such file or directory
user@DESKTOP-87N36PP:~/openmv$

I started it from another folder

user@DESKTOP-87N36PP:~/openmv-sdk-1.6.0/stedgeai/Utilities/linux$ ./stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/force_int_quant.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen --verbosity 1
ST Edge AI Core v4.0.0-20500 359356bb0
 >>>> EXECUTING NEURAL ART COMPILER                                                                                                                                   
   /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/atonn -i "/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen/force_int_quant_OE_3_3_1.onnx" --json-quant-file "/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen/force_int_quant_OE_3_3_1_Q.json" -g "network.c" --load-mdesc "/home/user/openmv-sdk-1.6.0/stedgeai/Utilities/configs/stm32n6.mdesc" --load-mpool "/home/user/openmv/lib/stai/scripts/stm32n6.mpool" --load-cdesc /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/configs/cortex-m55.cdesc --save-mpool-file "/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/neural_art__network/stm32n6.mpool" --out-dir-prefix "/home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/neural_art__network/" --network-name "network" --native-float --cache-maintenance --Ocache-opt --enable-virtual-mem-pools --Os --optimization 3 --Oauto-sched --all-buffers-info --csv-file "network.csv" --enable-epoch-controller --output-info-file "c_info.json"
 <<<< DONE EXECUTING NEURAL ART COMPILER                                                                                                                              
 >>>> EXECUTING EPOCH_CONTROLLER POST_PROCESSING                                                                                                                      
 <<<< DONE EXECUTING EPOCH_CONTROLLER POST_PROCESSING                                                                                                                 
                                                                                                                                                                      
 Exec/report summary (generate)
 ------------------------------------------------------------------------------------------------
 model file         :   /home/user/openmv/lib/models/force_int_quant.tflite                      
 type               :   tflite                                                                   
 c_name             :   network                                                                  
 compression        :   lossless                                                                 
 options            :   allocate-inputs, allocate-outputs, relocatable                           
 optimization       :   balanced                                                                 
 target/series      :   stm32n6npu                                                               
 workspace dir      :   /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace   
 output dir         :   /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen         
 model_fmt          :   float                                                                    
 model_name         :   force_int_quant                                                          
 model_hash         :   0x3b7ce6dc2f0a44ef4b4a2051312b0c28                                       
 params #           :   6,945 items (7.23 KiB)                                                   
 ------------------------------------------------------------------------------------------------
 input 1/1          :   'Input_0_out_0', f32(1x36), 144 Bytes, activations                       
 output 1/1         :   'Dequantize_17_out_0', f32(1x1), 4 Bytes, activations                    
 macc               :   6,944                                                                    
 weights (ro)       :   6,865 B (6.70 KiB) (1 segment) / -20,915(-75.3%) vs float model          
 activations (rw)   :   180 B (180 B) (1 segment) *                                              
 ram (total)        :   180 B (180 B) = 180 + 0 + 0                                              
 ------------------------------------------------------------------------------------------------
 (*) 'input'/'output' buffers are allocated in the activations buffer
                                                                                                                                                                      
  Neural ART - Package for runtime loadable model - v 1.4.1                                                                                                           
                                                                                                                                                                      
   STM32 series        : stm32n6npu                                                                                                                                   
   scripts directory   : /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/../../scripts/N6_reloc                                                                  
   python executable   : /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/python                                                                                  
   cwd                 : /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux                                                                                         
   output directory    : /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen                                                                             
   workspace directory : /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace                                                                       
   c-name              : network                                                                                                                                      
   user options        : []                                                                                                                                           
   custom file         : None                                                                                                                                         
                                                                                                                                                                      
                                                                                                                                                                      
   >>> Shell execution has FAILED (returned code = 255)
   $ /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/python /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/../../scripts/N6_reloc/npu_driver.py --input /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen/network.c --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/network_npu_reloc_build --log /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/network_npu_reloc_build/npu_driver.log --json /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/network_npu_reloc_build/network_generate_rel.json --no-color
                                                                                                                                                                      
    NPU Utility - Relocatable model generator (version 1.4)                                                                                                           
    Creating date : Sat May  9 12:04:43 2026                                                                                                                          
    Input file         : /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen/network.c                                                                   
    Output/build dir   : /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace/network_npu_reloc_build                                               
    clang mode         : False                                                                                                                                        
    compatible mode    : False                                                                                                                                        
    custom             : no-file                                                                                                                                      
   [E]    E701(ExecutableNotFoundError): Unable to find a valid lib in Middlewares/ST/AI/Lib/GCC/ARMCortexM55                                                         
   <<<                                                                                                                                                                
                                                                                                                                                                      
E102(RelocExecError): Script /home/user/openmv-sdk-1.6.0/stedgeai/Utilities/linux/../../scripts/N6_reloc/npu_driver.py failed with return code -1
user@DESKTOP-87N36PP:~/openmv-sdk-1.6.0/stedgeai/Utilities/linux$ 

Can you verify that:

ls -al ~/openmv-sdk-1.6.0/stedgeai/Middlewares/ST/AI/Lib/GCC/ARMCortexM55/

Has this in it?

total 2612
drwxr-xr-x  2 kwagyeman kwagyeman    4096 Feb 16 12:29 .
drwxr-xr-x 12 kwagyeman kwagyeman    4096 Feb 16 12:29 ..
-rwxr-xr-x  1 kwagyeman kwagyeman 1287492 Feb 16 11:39 NetworkRuntime1200_CM55_GCC.a
-rwxr-xr-x  1 kwagyeman kwagyeman 1372602 Feb 16 11:41 NetworkRuntime1200_CM55_GCC_PIC.a

user@DESKTOP-87N36PP:~/openmv-sdk-1.6.0/stedgeai/Utilities/linux$ ls -al ~/openmv-sdk-1.6.0/stedgeai/Middlewares/ST/AI/Lib/GCC/ARMCortexM55/
total 2612
drwxr-xr-x 2 user user 4096 Feb 17 03:29 .
drwxr-xr-x 12 user user 4096 Feb 17 03:29 ..
-rwxr-xr-x 1 user user 1287492 Feb 17 02:39 NetworkRuntime1200_CM55_GCC.a
-rwxr-xr-x 1 user user 1372602 Feb 17 02:41 NetworkRuntime1200_CM55_GCC_PIC.a
user@DESKTOP-87N36PP:~/openmv-sdk-1.6.0/stedgeai/Utilities/linux$

If you need to check something, I can give you access to my PC, for example, via AnyDesk

Mmm, not sure, the only think I can think of is that it’s something in my path making it work.

Can you try running source ~/openmv/tools/ci.sh and then:

~/openmv-sdk-1.6.0/stedgeai/Utilities/linux/stedgeai generate --target stm32n6 --model /home/user/openmv/lib/models/force_int_quant.tflite --relocatable --st-neural-art default@/home/user/openmv/lib/stai/scripts/neuralart.json --workspace /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/workspace --output /home/user/openmv/build/OPENMV_N6/lib/models/force_int_quant/gen --verbosity 1

Running the ci.sh will add some variables to your path for the terminal session.