Features enabled by this commit: * M7 core available with or without the Arduino MCU-based bootloader by correctly initializing the external clock source. * All LEDs, relays and the user button are mapped into the device tree (samples/common/blinky works out of the box). * USB can be used in ACM mode (samples/subsys/usb/cdc_acm works without changes). The default Zephyr console is configured to use cdc_acm_uart0 that in turn is assigned to the only USB port available. Also enable USB stack to make sure that the console is available by default and twister builds don't fail with missing device and added the default USB vendor (0x35d1 Finder SpA) and product (0x0164) numbers to match the ones used in the original product. Signed-off-by: Federico Di Gregorio <fog@dndg.it>
18 lines
No EOL
828 B
CMake
18 lines
No EOL
828 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
board_runner_args(dfu-util "--pid=2341:0364" "--alt=0" "--dfuse")
|
|
|
|
if(CONFIG_BOARD_ARDUINO_OPTA_STM32H747XX_M7)
|
|
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_opta_stm32h747xx_m7.cfg")
|
|
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
|
|
elseif(CONFIG_BOARD_ARDUINO_OPTA_STM32H747XX_M4)
|
|
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_opta_stm32h747xx_m4.cfg")
|
|
board_runner_args(openocd --target-handle=_CHIPNAME.cpu1)
|
|
endif()
|
|
|
|
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
|
|
|
|
# Give priority to dfu-util to flash, ST-Link to debug.
|
|
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
|
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
|
|
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |