diff --git a/app/boards/rh02_plus_2026_stm32g431xx.conf b/app/boards/rh02_plus_2026_stm32g431xx.conf new file mode 100644 index 00000000..aa1c08ab --- /dev/null +++ b/app/boards/rh02_plus_2026_stm32g431xx.conf @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia +# +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CANNECTIVITY_USB_SELF_POWERED=n + +# The two lines below are needed to reduce flash usage +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/app/boards/rh02_plus_2026_stm32g431xx.overlay b/app/boards/rh02_plus_2026_stm32g431xx.overlay new file mode 100644 index 00000000..2952f2da --- /dev/null +++ b/app/boards/rh02_plus_2026_stm32g431xx.overlay @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "../app.overlay" + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counters2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&fdcan1>; + state-led = <&blue_led>; + activity-leds = <&purple_led>; + }; + };}; + +&timers2 { + st,prescaler = <159>; + counters2: counter { + status = "okay"; + }; +}; diff --git a/app/boards/rh02_stm32f072xb.conf b/app/boards/rh02_stm32f072xb.conf new file mode 100644 index 00000000..5d33c7fd --- /dev/null +++ b/app/boards/rh02_stm32f072xb.conf @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia +# +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CANNECTIVITY_USB_SELF_POWERED=n +CONFIG_CAN_FD_MODE=n +CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS=1 +CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS=1 diff --git a/app/boards/rh02_stm32f072xb.overlay b/app/boards/rh02_stm32f072xb.overlay new file mode 100644 index 00000000..3889d9fb --- /dev/null +++ b/app/boards/rh02_stm32f072xb.overlay @@ -0,0 +1,31 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2026 nullstalgia + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "../app.overlay" + +/ { + cannectivity: cannectivity { + compatible = "cannectivity"; + timestamp-counter = <&counter2>; + + channel0 { + compatible = "cannectivity-channel"; + can-controller = <&can1>; + activity-leds = <&led_rx &led_tx>; + }; + }; +}; + +&timers2 { + status = "okay"; + st,prescaler = <47>; + + counter2: counter2 { + compatible = "st,stm32-counter"; + status = "okay"; + }; +};