From e63a2db9e5ccfd0b0b820858291f562ae1efa338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Sat, 12 Dec 2020 00:05:15 +0100 Subject: [PATCH] Update west.yml and platformi.ini to track Zephyr v2.5 The v2.5-branch is based on upstream master until Zephyr v2.5 is released. hal_stm32 needs to be overwritten with forked version to support new pinctrl introduced in Zephyr 2.5. Also fixing some CAN issues because of API changes to make it compile. --- boards/arm/mppt_2420_lc/pinmux.c | 4 ++-- platformio.ini | 10 ++++++---- src/ext/can.cpp | 2 +- zephyr/west.yml | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/boards/arm/mppt_2420_lc/pinmux.c b/boards/arm/mppt_2420_lc/pinmux.c index 577c6df..2a8af0d 100644 --- a/boards/arm/mppt_2420_lc/pinmux.c +++ b/boards/arm/mppt_2420_lc/pinmux.c @@ -53,8 +53,8 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB5, STM32F0_PINMUX_FUNC_PB5_SPI1_MOSI}, #endif /* CONFIG_SPI, spi1 */ #if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) && CONFIG_CAN - {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_CAN_RX}, - {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_CAN_TX}, + {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_FDCAN_RX}, + {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_FDCAN_TX}, #endif /* CONFIG_CAN, can1 */ }; diff --git a/platformio.ini b/platformio.ini index ba4a832..59d2928 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,13 +23,15 @@ extra_configs = [env] -#platform = https://github.com/platformio/platform-ststm32.git -platform = ststm32@~8.1.0 - framework = zephyr +#platform = https://github.com/platformio/platform-ststm32.git +platform = ststm32@~11.0.0 + # Use customized Zephyr branch from Libre Solar repository -platform_packages = framework-zephyr@https://github.com/LibreSolar/zephyr#v2.4-branch +platform_packages = + framework-zephyr@https://github.com/LibreSolar/zephyr#v2.5-branch + framework-zephyr-hal-stm32@https://github.com/LibreSolar/hal_stm32#v2.5-platformio #upload_protocol = mbed upload_protocol = stlink diff --git a/src/ext/can.cpp b/src/ext/can.cpp index 668ee9d..287e76a 100644 --- a/src/ext/can.cpp +++ b/src/ext/can.cpp @@ -147,7 +147,7 @@ void can_pub_thread() struct zcan_frame frame = {0}; frame.id_type = CAN_EXTENDED_IDENTIFIER; frame.rtr = CAN_DATAFRAME; - frame.ext_id = can_id; + frame.id = can_id; memcpy(frame.data, can_data, 8); if (data_len >= 0) { diff --git a/zephyr/west.yml b/zephyr/west.yml index 67e556d..dec5167 100644 --- a/zephyr/west.yml +++ b/zephyr/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zephyr remote: libresolar - revision: v2.4-branch + revision: v2.5-branch # path must be something else than zephyr as we get a Kconfig include recursion otherwise path: rtos import: