Zephyr on Portenta H7 - USB Display? OTA program updates?

Sorry, not sure where, who to ask these types of questions, as probably most of them can only be answered by Arduino or Zephyr developers, but...

I recently noticed that there that in the Portenta H7 documentation that there is the ability to plug a USB display into it as well as probably some other USB devices.
There are a couple of previous threads asking about the ANX762 display using MBED, such as:

Connecting display via USB-C.._gaMTY0MjQ3NTAzNS4xNzkyOTMzNDk4*_ga_NEXN8H46L5*czE3OTI5MzM0OTckbzEkZzAkdDE3OTI5MzM0OTckajYwJGwwJGg0MzIxMTUxMTE.

Portenta H7 : USB-C display - any examples?.._gaMTY0MjQ3NTAzNS4xNzkyOTMzNDk4*_ga_NEXN8H46L5*czE3OTI5MzM0OTckbzEkZzAkdDE3OTI5MzM0OTckajYwJGwwJGg0MzIxMTUxMTE.

Which are now closed and never were really answered.

So wondering, with Zephyr, can I plug in a display? I know that there is currently one or move active Pull Requests, along this line including:

variant: portentah7: support both the ANX7625 and the Display Shield by iabdalkader · Pull Request #715 · arduino/ArduinoCore-zephyr

Which relies on:

Assuming pieces are in place, can one use one of the USB Host powered Hubs that we have for the UNO Q?

What also got me curious was this Pull Request:
Add CameraDisplay example and framebuffer drawing API by dani-clo · Pull Request #34 · arduino-libraries/Arduino_Video
Which talks about displaying a camera image either on the Giga Display Shield or USB display.

Secondary question, if the Portenta H7 can use either type of display, can this be done as well with the GIGA?

Side question: If one plugs in a USB Host hub into the USB-C slot, what is the typical way to update the program on the Portenta? Unplug the hub, plug into PC update, unplug and go back to adapter.

Or it looks like the current ArduinoCore-zephyr sources has:

Will be interesting to try it out? (Once I figure it out). Assuming this works, then question will, be how to do this practically? Build this into your current sketch. To do the download reboot and update during the reboot?

Will probably try manually pulling in several of these to try out, but any hints, would be greatly appreciated!

To answer part of my questions,

I pulled in the Arduino Video PR for the Camera example sketch:

D:\github\Arduino_Video>git fetch origin pull/34/head:pull_34

D:\github\Arduino_Video>git checkout pull_34

Loaded up the new example sketch, which I first verified worked on a Giga with Giga Display Shield. I then loaded it on to a Portenta H7 with a Mid Carrier board where I have the GC2145 Camera mounted on it, and then connected up a UGreen USB Hub, with an HDMI cable connected to a secondary video display:


And it worked.

Note image is grainy as left it at 320x240 image and the sketch then displays it at 1024x768

EDIT: If I try to define the camera for 1024x768 - The camera fails to start.
Probably not enough memory with current configurations.

If I try to go a 512x384 it builds, but get no images, hooked up USB to serial to the USART on the H7 and ended up with endless errors:

[00:01:51.076,000] <err> dma_stm32_v1: FiFo error.
[00:01:51.147,000] <err> dma_stm32_v1: FiFo error.
[00:01:51.219,000] <err> dma_stm32_v1: FiFo error.
[00:01:51.290,000] <err> dma_stm32_v1: FiFo error.

Which is my issue:
Camera: Current ArduinoCore-zephyr - dma_stm32_v1: FiFo error. · Issue #675 · arduino/ArduinoCore-zephyr
Which was closed out two weeks ago.

Probably mostly mumbling to myself here, but next update:

I thought it might be interesting to try out the Weather app, that a few of have played with on other boards like GIGA, Uno R4, Teensy...

That it might be fun to see what it would take to run it on H7 with the USB display...
On the GIGA with the Giga display I was using the Arduino_GigaDisplay_GFX library to
output to the screen. It is hard coded to the display, for this experiment, I made a copy of it and changed just a few things:

The display type passed into the Arduino_Video constructor
display = new Arduino_Video(1024, 768, USBCVideo);
And the size of the display in a few places like: the above call.
(I also renamed the file and class...)
First question, should we Update the Arduino_GigaDisplay_GFX library to allow it to work properly on both?

That part appears to be working:

2) What happens to Serial.print output? I assume probably tossed?

3) How to use OTA with Zephyr? I ran the storage Flash format and it did create a OTA: ... Tried the examples, which failed to find something... Are there hooks setup to
add the network connection as an option in IDE2? ...

4) How to input data to sketch? The sketch on other boards/displays was using touch screen and Serial.read... Do we support USB HID Keyboard input on Zephyr?

Next up figure out why it faulted when connected to PC and or see why it is not getting the weather data when connected to display.

I am mainly doing this as a way to do some random testing of different things with the ArduinoCore-zephyr, to see what I can break :wink:

More mumbling. The good thing about playing with this, is I ran into a Fault in the almost to be released ArduinoCore-zephyr in SocketWrapper, and yesterday we tracked it down and and a fix was merged in. :smiley:

And it was able to read the weather information over Wifi and display the data
on the USBCVideo monitor:

The layout could be cleaned up and lots more space. The layout here was setup
to display on the GIGA display...

Also good news: Arduino this morning released ArduinoCore-zephyr 1.1.0
Both the UNOs and the Arduino others boards... Which I have updated now on both
the IDE and Applab.

I am guessing that @ptillisch will be posting more about the new release soon.
So far I have only tried a few things.

Like this is the first time I tried using Ethernet on my H7 in the Mid Carrier and it worked to ping Google...

Still wondering about:

The OTA examples that were added in this release, run but don't appear to do anything except:

Full OTA update (loader + sketch) over Ethernet
Waiting for link...
IP: 192.168....
Downloading http://10.10.10.10:8000/UPDATE.bin
Connection failed
Download failed

I am guessing there is some other piece that needs to be installed?
The OTA examples and header file and readme don't give many clues:

Example header:

/*
 * Copyright (c) Arduino s.r.l. and/or its affiliated companies
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

/*
 * This function is used to make a sketch ota file ready to be applied on the next reboot.
 * Under the hood this function currently renames the ota file to what the loader is going to be
 * looking for. This avoids unwanted ota starting when the ota file is not ready yet
 */
int ota_sketch_ready(void);

/*
 * This function is used to trigger an ota procedure for the sketch. You need to mark the sketch as
 * ready with `ota_sketch_ready` in order for it to be applied.
 */
int ota_sketch_start(void);

/*
 * This function is used to make a loader ota file ready to be applied on the next reboot.
 * Under the hood this function currently renames the ota file to what the bootloader is going to be
 * looking for. This avoids unwanted ota starting when the ota file is not ready yet
 */
int ota_loader_ready(void);

/*
 * This function is used to trigger an ota procedure for the loader. You need to mark the loader as
 * ready with `ota_loader_ready` in order for it to be applied.
 */
int ota_loader_start(void);

#ifdef __cplusplus
}
#endif

The build maybe gives some hints:

File does not have an ELF header, adding empty space
File C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.bin saved as C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.bin-zsk.bin
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\zephyr-sketch-tool\\0.4.2/zephyr-sketch-tool" -ota -ota-loader "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\zephyr_main\\1.1.0/firmwares/zephyr-arduino_portenta_h7_stm32h747xx_m7.bin" -ota-sketch "C:\\Users\\kurte\\AppData\\Local\\arduino\\sketches\\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin" -ota-offset 0x000a0000 -ota-magic 0x2341025B -output "C:\\Users\\kurte\\AppData\\Local\\arduino\\sketches\\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino"
Inputs: loader 590304 bytes, sketch 55048 bytes, merged 710408 bytes
OTA: C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin.ota (55068 bytes, sketch)
OTA: C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin.lzss.ota (24183 bytes, sketch (LZSS))
OTA: C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin-bundle.bin (710408 bytes, loader+sketch)
OTA: C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin-bundle.ota (710428 bytes, loader+sketch)
OTA: C:\Users\kurte\AppData\Local\arduino\sketches\ECABD28210AEA959D6D57E1919FBB53D/OTAFullEthernet.ino.elf-zsk.bin-bundle.lzss.ota (498512 bytes, loader+sketch (LZSS))
Bootloader file specified but missing: C:\Users\kurte\AppData\Local\Arduino15\packages\arduino\hardware\zephyr_main\1.1.0\bootloaders\zephyr-arduino_portenta_h7_stm32h747xx_m7.bin
Using library SocketWrapper at version 1.0.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\arduino\hardware\zephyr_main\1.1.0\libraries\SocketWrapper 
Using library Ethernet at version 0.1.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\arduino\hardware\zephyr_main\1.1.0\libraries\Ethernet 

But for now back to other diversions.

One note: I am finding that after I download a new sketch, I may be losing some of the first several lines of output:

That is I ran the example twice. First time it ran after I uploaded, I ran it again by pressing the reset button:

IP: 192.168....
Downloading http://10.10.10.10:8000/UPDATE.bin
Connection failed
Download failed
Full OTA update (loader + sketch) over Ethernet
Waiting for link...
IP: 192.168....
Downloading http://10.10.10.10:8000/UPDATE.bin
Connection failed
Download failed

EDIT - I meant to mention that the sketch has in it:

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10);
  }

  Serial.println("Full OTA update (loader + sketch) over Ethernet");

Quick update in case anyone is interested...

I split off the OTA off to it's own thread:

Zephyr: Over The Air(OTA) programming of GIGA/PortentaH7/...) - Mega / GIGA R1 WiFi - Arduino Forum

And from it, created and issue in ArduinoCore-zephyr:
OTA: Examples and/or Readme procedure needs additional documentation and maybe update procedure · Issue #737 · arduino/ArduinoCore-zephyr

I have the OTA working pretty well for myself, From the sketch I mentioned in the other thread, I copied my OTA_Support.ino file and modified it some and then added triggers in the main sketch to do updates.

Currently using a Sparkfun Quiic Button, as a trigger.

So in this case the workflow is I download the sketch once by USB.
See where Arduino builds the sketch into. and launch the http server:

C:\Users\kurte>cd  C:\Users\kurte\AppData\Local\arduino\sketches\7D0A89328C6E48A250A116FFF42FABA1

C:\Users\kurte\AppData\Local\arduino\sketches\7D0A89328C6E48A250A116FFF42FABA1>python3 -m http.server
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
::ffff:192.168.2.214 - - [05/Nov/2026 07:28:16] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:35:23] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:41:40] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:45:12] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:47:45] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:52:00] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.214 - - [05/Nov/2026 07:59:22] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.128 - - [05/Nov/2026 08:42:12] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -
::ffff:192.168.2.128 - - [05/Nov/2026 11:36:07] "GET /portenta_usb_display_weather_display.ino.elf-zsk.bin-bundle.bin HTTP/1.1" 200 -

As you can see here I have downloaded a few times.
I simply edit the sketch in the IDE, and do a verify in the IDE.
Then click the Qwiic button, to launch the update. I have it doing outputs to the USBCVideo display, like:

Pardon my clean and well organized table... :laughing:

Now back to Portenta H7 USBCVideo:

It took me awhile to discovered that this USBC Video is only supported on the full Portenta H7, i.e. not the Lite (and I assume Lite Connected). I tried plugging the adapter into the Portenta H7 Lite and it would not even boot. It also would not boot if I directly plugged in an RPI like USB power adapter directly into the USB port.

Questions to Self:
What happens to the Serial object when you care connected the USB Hub for Output?
I am assuming the Serial output is probably tossed.

This Monitor does not have touch support, so how this done in other versions of the sketch that uses the touch screen.

Currently in this case I am using Sparkfun Keypad, where if I press 0 key - it shows main display 1-5 shows the daily, which is good enough for here, but how do I enter a new city? The others either allow you to enter over USB Serail or a Keyboard shown on the display. I have started porting over some of this code, but will probably either use the keypad or The Arduino Modulino Joystick to move cursor around...

The actual Apps (this one and Camera one) are not end product related but more for learning about different capabilities of the processors and Zephyr...

Back to playing

Another quick update - Probably the last, unless others are interested. I have most of the stuff working good enough for what I was curious about.

I hacked on the On screen keyboard code we have used on some of the other Weather display apps that was Originally written by:

// The Keyboard code is a modified version of:
// https://github.com/KrisKasprzak/ILI9341_t3_Keypad

@Merlin513 - did most of the updates on this for several of the other versions this for some of the other displays/systems with touch screens...

However the USBVideo of the Portenta H7 does not have touch support. So this one is totally hacked up to use the input from a Sparkfun Qwiic Keypad:
As mentioned in previous update: in Normal mode:
0- Main display, 1-5 - daily display and * takes you to the keyboard code.

In this version, the Keypad does:

2 - Move selection up one row
4 - Move left 
5 - Act like the selected button is pressed
6 - Move Right
8 - Move down one row
* - bails from keypad (like selecting Cancel button
# - Cycles through Normal character, Upper case characters, special characters:

In case anyone is curious, current code:
portenta_usb_display_weather_display-261107a.zip (128.6 KB)
Note: this is just experimental code, which could use cleanup, better comments, etc.

Some of the things included here are:

a) Weather code, where we query details from open-meteo.com, and parse the returned JSON data. Display icons for the different weather conditions...

b) Keyboard code (GFX_Keyboard.h/cpp)

c) Saving/Restoring Network information (Wifi SSID and Password), and later on location information about the selected city. (weatherJSONSecurityLocation.ino). the file is saved in the Storage location: /storage/security.jsn

d) A GFX wrapper for the USBCVideo driver. As mentioned in earlier post, this is more or less identical to the Arduino_GigaDisplay_GFX, except for a parameter and size of screen.

e) OTA support for either Wifi or Ethernet and either full or Sketch only
This is in the file OTA_Support.ino

@KurtE

@GolamMostafa - Sorry for the long winded answer :laughing:


Arduino Portenta Family: High-Performance Industrial Boards

Specifically this test setup (the one sort of in center of this image)is a:
Portenta Mid Carrier

Which has a Portenta H7 plugged into it.

Also connected to the Mid Carrier and/or H7 in this Phot:
GC2145 Camera plugged into the Carrier. I am not currently seeing them available on the Arduino website.

USB to Serial connector hooked up to the Serial1 pins. Used to see Zephyr debug output including printk statements. (There are probably 3 maybe 4 USB to Serial connectors currently hooked up on my computer)

Qwiic Cable hooked up to Wire object, with:
Sparkfun Qwiic button - Used in the sketch of this thread, to start an OTA update

And Sparkfun Qwiic keypad - Used in this sketch to choose which data to display and move around in logical Keyboard display...

Edit: I should mention, this photo was taken without the USB Hub connect to it. For the sketch in this thread I am using the UGreen one I purchased for the Q from Amazon.

There are three versions of the H7

Portenta H7: which is on this board, which has all the stuff on it, wifi, USB Display support ...

Portenta H7 Lite: Has the basics, no Wifi no USBC Video support, ...
I have one of these it is in board farther left with Yellow pins soldered in.
Which is plugged into a Portenta Breakout board:

@ptillish - product page link on the family page is not working.

404 Not Found — Arduino Official Store

Portenta H7 Lite Connected: The lite plus Wifi... (I don't have one of these)

They also have other Portenta Processor boards:
Portenta X8 - Has two processors on it... Don't have one of these.

Portenta C33 - lower end, same family processor as UNO R4 boards.
I have one, shown in the photo above the Breakout board. It is the one with blue pins soldered in, and it is plugged into a to a Hat Carrier

And if you are interested in picking up some of this hardware, Arduino is having a nice Black Friday sale. For example here the H7 is normally about $114 but is for sale for $74.10 Although I am not sure I currently need anything...

To be complete, in this photo to the left of the Hat Carrier is a first generation Vision Shield
Currently I do not have in Portenta processor boards plugged into it.

@ptillish I think that link is not working now either.

Other Arduino boards in the above photo:
Arduino Giga with display shield.
Uno Q

It is a great pleasure to see the hardware setup of such an enthusiastic and active member of the Arduino Forum. I guess you are mostly interested in the software side of a project rather than hardware development, as I don’t see a prototyping breadboard with lots of jumpers and components around. Thank you so much for your elaborate response to my small inquiry.

You are welcome, and yes I am a retired software developer...

As for breadboards, and components, it depends on what I am working on at the time.
I have several bins on shelf and lots below, like:

Most of that is Teensy level stuff. And also it depends on what stage I am in playing with certain things.

For example I (as well as @Merlin513 ) have played a lot with cameras and displays and ... on several different boards.


Most of the time start off with going to a breadboard, like the T4.1 which still has the
jumpers going over for probably a display with the ILI9341 pin layout (like the one PJRC sold). The same pinout is good for several displays.
After I got tired of doing wiring like this, I assembled my own carrier boards to reduce the time I have to spend each time I wish to experiment with cameras and displays...

Now back to playing

Thanks for your report. I notified the team at Arduino responsible for this content.

The correct links:

I am so happy to see your component bins. Yes, hardware and software must go together.

Thank you.

The broken links have now been fixed. Thanks again for bringing this to our attention @KurtE!