Device Tree overlay for Cortex-M7 in Verdin iMX8MP

Hi,
as I also use the CSI camera, I first followed the guide in AR0521 Camera to create a custom Torizon 6.5.0 image with camera drivers.

Then I tried to follow the guide in to enable a custom device tree overlay for the Cortex M7.
I ran this command command to unpack my previously built image:

torizoncore-builder images unpack torizon-core-docker-verdin-imx8mp-Tezi_6.5.0-devel-20241225134819+build.0.tar

Afterwards any command I run in torizoncore-builder (e.g. dto deploy, image download) causes the following exception:

An unexpected Exception occurred. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 230, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/images.py", line 86, in do_images_download
    images.download_tezi(r_ip, args.remote_username, args.remote_password,
  File "/builder/tcbuilder/backend/images.py", line 223, in download_tezi
    prod, yocto, build_type, build_number, module_name, kernel_type,
UnboundLocalError: local variable 'build_type' referenced before assignment

I tried both the normal and early access version.

Do I need to take a different path to import the device tree overlay, as I have custom built Torizon OS? If yes how?

The article (link) which I followed to create the image with the camera drivers only mentions creating custom yocto layers. But I hope there is a easier way to create a single device overlay?

I saw also that the device tree overlay which is shown in the article How to Run Hello World on the Cortex-M | Toradex Developer Center is quite different from the one in the git repository verdin-imx8mp_hmp_overlay.dts « overlays - device-tree-overlays.git - Sources for Device Tree Overlays.
Which of those should I use and why are they so different?

Regards
Johannes

Greetings @j.kugele,

The dto deploy and images download commands both work by first downloading a Torizon OS image from the Toradex servers, that matches the image running on the device IP address you provide to the commands.

If you custom built this image yourself via Yocto, then obviously there wouldn’t be a matching OS image on our servers. So this result would be expected.

The question is why are you running these commands when you have already ran images unpack? The images unpack command provides the TorizonCore Builder tool your OS image already, you do not need to run images download anymore.

If your ultimate goal is to work with device tree overlays, then please reference this article here: Device Tree Overlays on Torizon | Toradex Developer Center

Again, since you have a custom built image disregard any instructions/methods that use dto deploy as this will not work in your case. When cloning overlay and Linux sources please take care to clone the branch/version that matches the kernel in your OS image.

Best Regards,
Jeremias