Arduino Portenta H7 Part 4: Linux IDE Setup

Arduino Portenta H7 Box

The Arduino Portenta H7 is Arduino’s latest line of industry-focused devices.  With it’s dual-core STM32H747XIH6 processor, Murata LBEE5KL1DX wireless radio, Ethernet and High-Definition Multimedia Interface (HDMI) capabilities, its easily the most powerful Arduino currently available.  Despite this, you can develop Potenta H7 applications (called “sketches”) using the common, free Arduino Integrated Development Environment (IDE).

In this walkthrough, we’ll cover how to install the Arduino IDE and Portenta H7 drivers for the Ubuntu Linux 20.04 Long Term Support (LTS) environment.  If you already have Arduino IDE version 1.8.10 or later installed for Linux, feel free to skip ahead to the driver installation.

Notice of Non-Affiliation and Disclaimer: As of the publication date, we are not affiliated with, associated with, authorized with, endorsed by, compensated by, or in any way officially connected with Arduino, Microchip Technology Inc., Canonical, or their owners, subsidiaries or affiliates.  The names Arduino, Portena H7, AVR, mBed, Arm, and Ubuntu, as well as related names, marks, emblems, and images are trademarks of their respective owners.

External Links: Links to external web pages have been provided as a convenience and for informational purposes only. Unboxing Tomorrow and Voxidyne Media bear no responsibility for the accuracy, legality or content of the external site or for that of subsequent links. Contact the external site for answers to questions regarding its content.

Objectives

  • Visit the official Arduino website
  • Download the latest Arduino IDE
  • Extract Arduino IDE as a tar.xz file
  • Run the Arduino IDE
  • Install Portena H7 drivers
  • Address the “Can’t open device / Permission denied” error
Figure 1: Features of the Arduino Portenta H7

Material Requirements

  • Arduino Portena H7
  • USB-C Cable
  • Recommended: Anti-Static Workstation

Software Requirements

  • Ubuntu Linux (version 20.04 LTS 64-bit used here)
  • Super user privileges

Step 1: Visit the Arduino Web Site

First, go to the official website and download the latest Arduino IDE.  Typically this comes as a .tar.xz file.

Official Arduino Website: https://www.arduino.cc/en/software (an external link)

In today’s example, my downloaded version is named…

arduino-1.8.13-linux64.tar.xz

If your downloaded version has a different name, substitute “arduino-1.8.13-linux64.tar.xz” with the filename you have downloaded.  Bear in mind that all Linux commands and filenames are case-sensitive.

Step 2: Extract and Install

Open the terminal.

My first step will be to create a new directory (folder) on the home directory called “Projects.”

mkdir ~/Projects

Assuming your web browser has downloaded the file to the /home/Downloads folder, you will need to change (cd) to the Downloads folder first.  From there, I will move the file from /home/Downloads to /home/Projects, and then extract it.

cd Downloads
mv arduino-1.8.13-linux64.tar.xz ~/Projects/FILE
cd ~/Projects
tar xvf arduino-1.8.13-linux64.tar.xz
rm arduino-1.8.13-linux64.tar.xz
cd arduino-1.8.13
sudo ./install.sh

Step 3: Launch the Arduino Application

Atmel AVR-based Arduinos are already supported by this IDE upon installation, but the Portenta H7 requires an additional installation via the Arduino IDE Boards Manager.

To launch, simple type “arduino” in the terminal.

Figure 2: Alternatively, the Graphical User Interface Provides an Arduino IDE Icon

Step 4: Install Drivers

Inside the Arduino IDE, you will need to install hardware drivers for the Portenta H7.  As of February 2020, these are labelled “Ardino mbed-enabled Boards” and there are deprecated and non-deprecated versions.

Open the Boards Manager at Tools –> Board –> Boards Manager…

In the window that appears, filter the search results by typing “mbed” in the search board.  Then locate the Arduino mbed-enabled Boards version, and avoid the DEPRECATED version unless you have a specific need for it.

Optional: Avoiding “can’t open device “/dev/ttyUSB0”: Permission denied”

If you encounter this error at any time, you may be able to avoid it by adding your username to the dialout group.

With your Portena H7 plugged into a USB port, enter the following command to check its visibility…

ls -l /dev/ttyACM*

In my case, this returned…

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The “0” at the end of ACM might be a different number, or multiple entries might be returned. The data we need is “dialout” (which is the group owner of the file).

Now you need to add yourself to the dialout group.  Get your own username using the command…

whoami

Now add yourself to the dialout group using…

sudo usermod -a -G dialout <username>

References

[1]Arduino, “Portenta H7,” Arduino, [Online]. Available: https://www.arduino.cc/pro/hardware/product/portenta-h7. [Accessed 8 Feb. 2021].
[2]Arduino, “Arduino Portenta H7: Product Reference Manual Rev 1,” 18 Dec 2019. [Online]. Available: https://content.arduino.cc/assets/Datasheet-Portenta-H7.pdf. [Accessed 8 Feb. 2021].
[3]Arduino, “Software | Arduino,” Arduino, 29 Jan. 2021. [Online]. Available: https://www.arduino.cc/en/software. [Accessed 8 Feb. 2021].

Important Notice: This article and its contents (the “Information”) belong to Unboxing-tomorrow.com and Voxidyne Media LLC. No license is granted for the use of it other than for information purposes. No license of any intellectual property rights is granted.  The Information is subject to change without notice. The Information supplied is believed to be accurate, but Voxidyne Media LLC assumes no responsibility for its accuracy or completeness, any error in or omission from it or for any use made of it.  Liability for loss or damage resulting from any reliance on the Information or use of it (including liability resulting from negligence or where Voxidyne Media LLC was aware of the possibility of such loss or damage arising) is excluded.