boards: arduino_due: Convert to HWMv2

Port the board to HWMv2.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke
2024-02-09 22:24:05 +01:00
committed by Carles Cufi
parent 37dfacbf9e
commit 3c72fe863c
11 changed files with 16 additions and 31 deletions

View File

@@ -1,8 +1,5 @@
# Arduino Due Board configuration
# Copyright (c) 2017 Justin Watson
# SPDX-License-Identifier: Apache-2.0
config BOARD_ARDUINO_DUE
bool "Arduino Due Board"
depends on SOC_PART_NUMBER_SAM3X8E
select SOC_SAM3X8E

View File

@@ -2,14 +2,14 @@ identifier: arduino_due
name: Arduino Due
type: mcu
arch: arm
ram: 96
flash: 512
toolchain:
- zephyr
- gnuarmemb
- xtools
flash: 512
ram: 96
supported:
- watchdog
- gpio
- arduino_i2c
- gpio
- watchdog
vendor: arduino

View File

@@ -1,14 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_SAM3X=y
CONFIG_SOC_PART_NUMBER_SAM3X8E=y
CONFIG_BOARD_ARDUINO_DUE=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_WDT_DISABLE_AT_BOOT=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y
CONFIG_WDT_DISABLE_AT_BOOT=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -0,0 +1,5 @@
board:
name: arduino_due
vendor: arduino
socs:
- name: sam3x8e

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -56,7 +56,7 @@ See `Arduino Due website`_ and `Atmel SAM3X8E Datasheet`_ for a complete
list of Arduino Due board hardware features.
The default configuration can be found in the Kconfig
:zephyr_file:`boards/arm/arduino_due/arduino_due_defconfig`.
:zephyr_file:`boards/arduino/arduino_due/arduino_due_defconfig`.
.. note::
For I2C, pull-up resistors are required for using SCL1 and SDA1 (near IO13).

View File

@@ -1,11 +0,0 @@
# Arduino Due Board configuration
# Copyright (c) 2017 Justin Watson
# SPDX-License-Identifier: Apache-2.0
if BOARD_ARDUINO_DUE
config BOARD
default "arduino_due"
endif # BOARD_ARDUINO_DUE

View File

@@ -70,14 +70,13 @@
#include <zephyr/drivers/gpio.h>
#include <string.h>
#if defined(CONFIG_SOC_PART_NUMBER_SAM3X8E)
#if defined(CONFIG_SOC_SAM3X8E)
#define GPIO_NODE DT_NODELABEL(pioc)
#else
#error "Unsupported GPIO driver"
#endif
#if defined(CONFIG_SOC_PART_NUMBER_SAM3X8E)
#if defined(CONFIG_SOC_SAM3X8E)
/* Define GPIO OUT to LCD */
#define GPIO_PIN_PC12_D0 12 /* PC12 - pin 51 */
#define GPIO_PIN_PC13_D1 13 /* PC13 - pin 50 */