Skip to content

variants: Add new Arduino boards (STM32 boards)#199

Open
soburi wants to merge 7 commits into
zephyrproject-rtos:nextfrom
soburi:stm32-boards
Open

variants: Add new Arduino boards (STM32 boards)#199
soburi wants to merge 7 commits into
zephyrproject-rtos:nextfrom
soburi:stm32-boards

Conversation

@soburi

@soburi soburi commented Jul 4, 2026

Copy link
Copy Markdown
Member

Add support for Giga R1, Portenta H7, Opta, and Nicla Vision.

We have confirmed that these compiles when used in combination with
https://github.com/arduino/zephyr/tree/zephyr-arduino-v4.2.0.
We will incorporate the changes for the migration to version 4.4 separately in the near future.
arduino#522 (comment)

Wi-Fi and relocation have been disabled compared to the original.

The functionality of analog pins to which no GPIO function has been assigned is incomplete in some boards; needs to fix separately.

As I do not have the actual boards, I have only verified the compilation.

soburi and others added 2 commits July 4, 2026 14:17
Since SPI<n> might be defined externally, we undefine it to
avoid conflicts.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Allows compatibility with a broad set of libraries, like Adafruit's NeoPixel

Note: Cherry-picked only under variants/common/.

Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Copilot AI review requested due to automatic review settings July 4, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds new STM32H747 M7-based Arduino board variants (GIGA R1, Portenta H7, Opta, Nicla Vision) to ArduinoCore-zephyr, including variant sources, Zephyr devicetree overlays, and per-board Kconfig fragments to enable required peripherals and pin mappings.

Changes:

  • Introduces new STM32 variants with board-specific variant.{h,cpp}, overlays (.overlay), and Zephyr config (.conf) for Portenta H7, Opta, Nicla Vision, and GIGA R1.
  • Adds “pure analog pin” wrappers for boards where some analog pins must not be used as digital pins.
  • Adjusts SPI declarations by undefining SPI1..SPI8 in libraries/SPI/SPI.h to avoid macro collisions.

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
variants/common/gpio_lowlevel_stm32.h Adds STM32 low-level GPIO compatibility macros for Arduino-style APIs.
variants/arduino_portenta_h7_stm32h747xx_m7/variant.h Defines Portenta variant pin constants and includes pure-analog handling.
variants/arduino_portenta_h7_stm32h747xx_m7/variant.cpp Implements Portenta variant init and 1200-bps reset hook.
variants/arduino_portenta_h7_stm32h747xx_m7/skip_these_examples.txt Variant-specific example exclusions for Portenta.
variants/arduino_portenta_h7_stm32h747xx_m7/pure_analog_pins.h Portenta analog-only pin type wrapper.
variants/arduino_portenta_h7_stm32h747xx_m7/pure_analog_pins.cpp Portenta analogRead overload for analog-only pins.
variants/arduino_portenta_h7_stm32h747xx_m7/known_example_issues.txt Variant-specific known failing examples list for Portenta.
variants/arduino_portenta_h7_stm32h747xx_m7/arduino_portenta_h7_stm32h747xx_m7.overlay Portenta devicetree overlay for peripherals/pins/partitions.
variants/arduino_portenta_h7_stm32h747xx_m7/arduino_portenta_h7_stm32h747xx_m7.conf Portenta Zephyr config enabling required subsystems.
variants/arduino_opta_stm32h747xx_m7/variant.h Adds Opta variant header stub.
variants/arduino_opta_stm32h747xx_m7/variant.cpp Implements Opta 1200-bps reset hook.
variants/arduino_opta_stm32h747xx_m7/skip_these_examples.txt Variant-specific example exclusions for Opta.
variants/arduino_opta_stm32h747xx_m7/known_example_issues.txt Variant-specific known failing examples list for Opta.
variants/arduino_opta_stm32h747xx_m7/arduino_opta_stm32h747xx_m7.overlay Opta devicetree overlay for peripherals/pins/partitions.
variants/arduino_opta_stm32h747xx_m7/arduino_opta_stm32h747xx_m7.conf Opta Zephyr config enabling required subsystems.
variants/arduino_nicla_vision_stm32h747xx_m7/variant.h Defines Nicla Vision variant constants and includes pure-analog handling.
variants/arduino_nicla_vision_stm32h747xx_m7/variant.cpp Implements Nicla variant init and 1200-bps reset hook.
variants/arduino_nicla_vision_stm32h747xx_m7/skip_these_examples.txt Variant-specific example exclusions for Nicla Vision.
variants/arduino_nicla_vision_stm32h747xx_m7/pure_analog_pins.h Nicla Vision analog-only pin type wrapper.
variants/arduino_nicla_vision_stm32h747xx_m7/pure_analog_pins.cpp Nicla Vision analogRead overload for analog-only pins.
variants/arduino_nicla_vision_stm32h747xx_m7/known_example_issues.txt Variant-specific known failing examples list for Nicla Vision.
variants/arduino_nicla_vision_stm32h747xx_m7/arduino_nicla_vision_stm32h747xx_m7.overlay Nicla Vision devicetree overlay for peripherals/pins/partitions.
variants/arduino_nicla_vision_stm32h747xx_m7/arduino_nicla_vision_stm32h747xx_m7.conf Nicla Vision Zephyr config enabling required subsystems.
variants/arduino_giga_r1_stm32h747xx_m7/variant.h Defines GIGA R1 variant constants and includes STM32 GPIO low-level header.
variants/arduino_giga_r1_stm32h747xx_m7/variant.cpp Implements GIGA R1 1200-bps reset hook.
variants/arduino_giga_r1_stm32h747xx_m7/skip_these_examples.txt Variant-specific example exclusions for GIGA R1.
variants/arduino_giga_r1_stm32h747xx_m7/pure_analog_pins.h GIGA R1 analog-only pin type wrapper (A8–A11).
variants/arduino_giga_r1_stm32h747xx_m7/pure_analog_pins.cpp GIGA R1 analogRead overload for analog-only pins.
variants/arduino_giga_r1_stm32h747xx_m7/known_example_issues.txt Variant-specific known failing examples list for GIGA R1.
variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.overlay GIGA R1 devicetree overlay for peripherals/pins/partitions.
variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf GIGA R1 Zephyr config enabling required subsystems.
libraries/SPI/SPI.h Avoids SPIx macro collisions by undefining SPI1..SPI8 before extern declarations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread variants/common/gpio_lowlevel_stm32.h
Comment thread variants/arduino_portenta_h7_stm32h747xx_m7/pure_analog_pins.h
Comment thread variants/arduino_giga_r1_stm32h747xx_m7/pure_analog_pins.h
Comment thread variants/arduino_nicla_vision_stm32h747xx_m7/pure_analog_pins.h
Comment thread variants/arduino_portenta_h7_stm32h747xx_m7/variant.h
iabdalkader and others added 5 commits July 8, 2026 17:50
Provides a common file system configuration, fstab entries,
disks and partitions that can just be included by overlays
to enable file system support.

Co-authored-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add configuration files for Arduino Giga R1.

Wi-Fi and relocation have been disabled compared to the original.

We have confirmed that it compiles when used in combination with
https://github.com/arduino/zephyr/tree/zephyr-arduino-v4.2.0.

Co-authored-by: Bogdan Ivanus <b.ivanus@arduino.cc>
Co-authored-by: Daniele Cloralio <d.cloralio@arduino.cc>
Co-authored-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
Co-authored-by: Mattia Pennasilico <m.pennasilico@arduino.cc>
Co-authored-by: bogdanf132 <bogdan_ivanus@yahoo.com>
Co-authored-by: iabdalkader <i.abdalkader@gmail.com>
Co-authored-by: kurte <kurte@rockisland.com>
Co-authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add configuration files for Arduino Opta.

Wi-Fi and relocation have been disabled compared to the original.

We have confirmed that it compiles when used in combination with
https://github.com/arduino/zephyr/tree/zephyr-arduino-v4.2.0.

Co-authored-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
Co-authored-by: Bogdan Ivanus <b.ivanus@arduino.cc>
Co-authored-by: Daniele Cloralio <d.cloralio@arduino.cc>
Co-authored-by: Gilberto Conti <g.conti@arduino.cc>
Co-authored-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
Co-authored-by: Mattia Pennasilico <m.pennasilico@arduino.cc>
Co-authored-by: bogdanf132 <bogdan_ivanus@yahoo.com>
Co-authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add configuration files for Arduino Portenta H7.

Wi-Fi and relocation have been disabled compared to the original.

The functionality of analog pins to which no GPIO function has been
assigned is incomplete; needs to fix separately.

We have confirmed that it compiles when used in combination with
https://github.com/arduino/zephyr/tree/zephyr-arduino-v4.2.0.

Co-authored-by: Mike S <5366213+mjs513@users.noreply.github.com>
Co-authored-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
Co-authored-by: Bogdan Ivanus <b.ivanus@arduino.cc>
Co-authored-by: Daniele Cloralio <d.cloralio@arduino.cc>
Co-authored-by: Gilberto Conti <g.conti@arduino.cc>
Co-authored-by: Kurt Eckhardt <kurte@rockisland.com>
Co-authored-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: Mattia Pennasilico <m.pennasilico@arduino.cc>
Co-authored-by: bogdanf132 <bogdan_ivanus@yahoo.com>
Co-authored-by: iabdalkader <i.abdalkader@gmail.com>
Co-authored-by: kurte <kurte@rockisland.com>
Co-authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add configuration files for Arduino Nicla Vision.

Wi-Fi and relocation have been disabled compared to the original.

The functionality of analog pins to which no GPIO function has been
assigned is incomplete; needs to fix separately.

We have confirmed that it compiles when used in combination with
https://github.com/arduino/zephyr/tree/zephyr-arduino-v4.2.0.

Co-authored-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
Co-authored-by: Daniele Cloralio <d.cloralio@arduino.cc>
Co-authored-by: Luca Burelli <l.burelli@arduino.cc>
Co-authored-by: Mattia Pennasilico <m.pennasilico@arduino.cc>
Co-authored-by: Sebastian Romero <s.romero.zh@gmail.com>
Co-authored-by: bogdanf132 <bogdan_ivanus@yahoo.com>
Co-authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants