From a0cf714f5ff179262d4bb33f6cd30796e7301ffb Mon Sep 17 00:00:00 2001 From: ineskhou <127782958+ineskhou@users.noreply.github.com> Date: Wed, 10 Sep 2025 22:26:43 -0700 Subject: [PATCH 01/21] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 74d41fb3..da8d525b 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,12 @@ Now you want to install the firmware to the board. make install BOARD_DIR=[path-to-your-board] ``` +or +``` +cp build-fprime-automatic-zephyr/zephyr/zephyr.uf2 [path-to-your-board] +``` +to copy the uf2 if the make install isnt working + Finally, run the fprime-gds. ```shell make gds From ed55f388fda061030ba3cd0f748fb0758bfa6a0d Mon Sep 17 00:00:00 2001 From: asiemsen Date: Thu, 11 Sep 2025 16:28:52 -0500 Subject: [PATCH 02/21] Create lmsd6dsoDriver component --- .../Components/CMakeLists.txt | 1 + .../Components/lms6dsoDriver/CMakeLists.txt | 36 ++++++++++ .../Components/lms6dsoDriver/docs/sdd.md | 66 +++++++++++++++++++ .../lms6dsoDriver/lms6dsoDriver.cpp | 19 ++++++ .../lms6dsoDriver/lms6dsoDriver.fpp | 32 +++++++++ .../lms6dsoDriver/lms6dsoDriver.hpp | 30 +++++++++ 6 files changed, 184 insertions(+) create mode 100644 FprimeZephyrReference/Components/lms6dsoDriver/CMakeLists.txt create mode 100644 FprimeZephyrReference/Components/lms6dsoDriver/docs/sdd.md create mode 100644 FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp create mode 100644 FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp create mode 100644 FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp diff --git a/FprimeZephyrReference/Components/CMakeLists.txt b/FprimeZephyrReference/Components/CMakeLists.txt index 7b0d52e4..1a3e1b8c 100644 --- a/FprimeZephyrReference/Components/CMakeLists.txt +++ b/FprimeZephyrReference/Components/CMakeLists.txt @@ -3,3 +3,4 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FatalHandler") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Watchdog") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Imu/") +add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/lms6dsoDriver/") diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/CMakeLists.txt b/FprimeZephyrReference/Components/lms6dsoDriver/CMakeLists.txt new file mode 100644 index 00000000..d87a2502 --- /dev/null +++ b/FprimeZephyrReference/Components/lms6dsoDriver/CMakeLists.txt @@ -0,0 +1,36 @@ +#### +# F Prime CMakeLists.txt: +# +# SOURCES: list of source files (to be compiled) +# AUTOCODER_INPUTS: list of files to be passed to the autocoders +# DEPENDS: list of libraries that this module depends on +# +# More information in the F´ CMake API documentation: +# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/ +# +#### + +# Module names are derived from the path from the nearest project/library/framework +# root when not specifically overridden by the developer. i.e. The module defined by +# `Ref/SignalGen/CMakeLists.txt` will be named `Ref_SignalGen`. + +register_fprime_library( + AUTOCODER_INPUTS + "${CMAKE_CURRENT_LIST_DIR}/lms6dsoDriver.fpp" + SOURCES + "${CMAKE_CURRENT_LIST_DIR}/lms6dsoDriver.cpp" +# DEPENDS +# MyPackage_MyOtherModule +) + +### Unit Tests ### +# register_fprime_ut( +# AUTOCODER_INPUTS +# "${CMAKE_CURRENT_LIST_DIR}/lms6dsoDriver.fpp" +# SOURCES +# "${CMAKE_CURRENT_LIST_DIR}/test/ut/lms6dsoDriverTestMain.cpp" +# "${CMAKE_CURRENT_LIST_DIR}/test/ut/lms6dsoDriverTester.cpp" +# DEPENDS +# STest # For rules-based testing +# UT_AUTO_HELPERS +# ) diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/docs/sdd.md b/FprimeZephyrReference/Components/lms6dsoDriver/docs/sdd.md new file mode 100644 index 00000000..f36d6cf2 --- /dev/null +++ b/FprimeZephyrReference/Components/lms6dsoDriver/docs/sdd.md @@ -0,0 +1,66 @@ +# Components::lms6dsoDriver + +Initialize and control operation of the lms6dso device + +## Usage Examples +Add usage examples here + +### Diagrams +Add diagrams here + +### Typical Usage +And the typical usage of the component here + +## Class Diagram +Add a class diagram here + +## Port Descriptions +| Name | Description | +|---|---| +|---|---| + +## Component States +Add component states in the chart below +| Name | Description | +|---|---| +|---|---| + +## Sequence Diagrams +Add sequence diagrams here + +## Parameters +| Name | Description | +|---|---| +|---|---| + +## Commands +| Name | Description | +|---|---| +|---|---| + +## Events +| Name | Description | +|---|---| +|---|---| + +## Telemetry +| Name | Description | +|---|---| +|---|---| + +## Unit Tests +Add unit test descriptions in the chart below +| Name | Description | Output | Coverage | +|---|---|---|---| +|---|---|---|---| + +## Requirements +Add requirements in the chart below +| Name | Description | Validation | +|---|---|---| +|---|---|---| + +## Change Log +| Date | Description | +|---|---| +|---| Initial Draft | \ No newline at end of file diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp new file mode 100644 index 00000000..7887097b --- /dev/null +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp @@ -0,0 +1,19 @@ +// ====================================================================== +// \title lms6dsoDriver.cpp +// \author aaron +// \brief cpp file for lms6dsoDriver component implementation class +// ====================================================================== + +#include "FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp" + +namespace Components { + +// ---------------------------------------------------------------------- +// Component construction and destruction +// ---------------------------------------------------------------------- + +lms6dsoDriver ::lms6dsoDriver(const char* const compName) : lms6dsoDriverComponentBase(compName) {} + +lms6dsoDriver ::~lms6dsoDriver() {} + +} // namespace Components diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp new file mode 100644 index 00000000..1f979ef3 --- /dev/null +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp @@ -0,0 +1,32 @@ +module Components { + @ Initialize and control operation of the lms6dso device + passive component lms6dsoDriver { + + ############################################################################## + #### Uncomment the following examples to start customizing your component #### + ############################################################################## + + @ Acceleration reading in m/s^2 + struct Acceleration { + x: F64 + y: F64 + z: F64 + } + + + + + # @ Example port: receiving calls from the rate group + # sync input port run: Svc.Sched + + ############################################################################### + # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # + ############################################################################### + @ Port for requesting the current time + time get port timeCaller + + @ Port for synchronously retrieving data + sync input port getData: GetSensorData + + } +} \ No newline at end of file diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp new file mode 100644 index 00000000..33bbd1a5 --- /dev/null +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp @@ -0,0 +1,30 @@ +// ====================================================================== +// \title lms6dsoDriver.hpp +// \author aaron +// \brief hpp file for lms6dsoDriver component implementation class +// ====================================================================== + +#ifndef Components_lms6dsoDriver_HPP +#define Components_lms6dsoDriver_HPP + +#include "FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriverComponentAc.hpp" + +namespace Components { + +class lms6dsoDriver final : public lms6dsoDriverComponentBase { + public: + // ---------------------------------------------------------------------- + // Component construction and destruction + // ---------------------------------------------------------------------- + + //! Construct lms6dsoDriver object + lms6dsoDriver(const char* const compName //!< The component name + ); + + //! Destroy lms6dsoDriver object + ~lms6dsoDriver(); +}; + +} // namespace Components + +#endif From 2436c8f57e0a18b6626bf781c17c52c9f1eca956 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Thu, 11 Sep 2025 17:52:58 -0500 Subject: [PATCH 03/21] create ports for sensor reading output --- .../lms6dsoDriver/lms6dsoDriver.fpp | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp index 1f979ef3..f36fbf00 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp @@ -1,21 +1,35 @@ module Components { @ Initialize and control operation of the lms6dso device + + @ Acceleration Reading in m/s^2 + struct Acceleration { + x: F64 + y: F64 + z: F64 + } + + @ Angular velocity reading in rad/s + struct AngularVelocity { + x: F64 + y: F64 + z: F64 + } + + struct SensorReadings { + acceleration: Acceleration + gyro: AngularVelocity + } + + port getData() -> SensorReadings + + passive component lms6dsoDriver { ############################################################################## #### Uncomment the following examples to start customizing your component #### ############################################################################## - @ Acceleration reading in m/s^2 - struct Acceleration { - x: F64 - y: F64 - z: F64 - } - - - - + # @ Example port: receiving calls from the rate group # sync input port run: Svc.Sched @@ -26,7 +40,9 @@ module Components { time get port timeCaller @ Port for synchronously retrieving data - sync input port getData: GetSensorData + + sync input port getData: GetData + } } \ No newline at end of file From 51ce94a040164bdd0175bd1156617923f46d52c8 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Thu, 11 Sep 2025 17:59:26 -0500 Subject: [PATCH 04/21] fix port naming issue --- .../Components/lms6dsoDriver/lms6dsoDriver.fpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp index f36fbf00..7e1f27e4 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp @@ -1,5 +1,4 @@ module Components { - @ Initialize and control operation of the lms6dso device @ Acceleration Reading in m/s^2 struct Acceleration { @@ -22,26 +21,19 @@ module Components { port getData() -> SensorReadings - + @ Initialize and control operation of the lms6dso device passive component lms6dsoDriver { - ############################################################################## - #### Uncomment the following examples to start customizing your component #### - ############################################################################## - - - # @ Example port: receiving calls from the rate group - # sync input port run: Svc.Sched - + @ Port for synchronously retrieving data + sync input port GetSensorData: getData + ############################################################################### # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # ############################################################################### @ Port for requesting the current time time get port timeCaller - @ Port for synchronously retrieving data - sync input port getData: GetData } From 1dad937cb675ea1c6f32864458fcab65e4420676 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sat, 6 Sep 2025 21:46:20 -0500 Subject: [PATCH 05/21] Use custom board definition --- .../Top/ReferenceDeploymentTopology.cpp | 2 +- .../Kconfig.defconfig | 14 ++ .../Kconfig.proves_flight_control_board_v5c | 5 + .../board.cmake | 20 +++ .../proves_flight_control_board_v5c/board.yml | 6 + ...oves_flight_control_board_v5c-pinctrl.dtsi | 20 +++ .../proves_flight_control_board_v5c.dtsi | 132 ++++++++++++++++++ ...s_flight_control_board_v5c_rp2350a_m33.dts | 19 +++ ..._flight_control_board_v5c_rp2350a_m33.yaml | 22 +++ ...ht_control_board_v5c_rp2350a_m33_defconfig | 13 ++ .../support/openocd.cfg | 11 ++ boards/rpi_pico.overlay | 11 -- boards/rpi_pico2_rp2350a_m33.overlay | 17 --- boards/teensy40.overlay | 15 -- boards/teensy41.overlay | 15 -- prj.conf | 33 ++++- settings.ini | 3 +- 17 files changed, 296 insertions(+), 62 deletions(-) create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/board.cmake create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/board.yml create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.yaml create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig create mode 100644 boards/bronco_space/proves_flight_control_board_v5c/support/openocd.cfg delete mode 100644 boards/rpi_pico.overlay delete mode 100644 boards/rpi_pico2_rp2350a_m33.overlay delete mode 100644 boards/teensy40.overlay delete mode 100644 boards/teensy41.overlay diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp index e9bfd734..4e3bb311 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp @@ -13,7 +13,7 @@ #include -static const struct gpio_dt_spec ledGpio = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios); +static const struct gpio_dt_spec ledGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(led0), gpios); // Allows easy reference to objects in FPP/autocoder required namespaces using namespace ReferenceDeployment; diff --git a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig new file mode 100644 index 00000000..296c23fc --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Andrew Featherstone +# SPDX-License-Identifier: Apache-2.0 + +if PROVES_FLIGHT_CONTROL_BOARD_V5C + +config USB_SELF_POWERED + default n + +config USB_CDC_ACM_LOG_LEVEL + default 0 + +config USB_DEVICE_LOG_LEVEL + default 1 +endif # PROVES_FLIGHT_CONTROL_BOARD_V5C diff --git a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c new file mode 100644 index 00000000..805f5070 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Andrew Featherstone +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5C + select SOC_RP2350A_M33 if BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5C_RP2350A_M33 diff --git a/boards/bronco_space/proves_flight_control_board_v5c/board.cmake b/boards/bronco_space/proves_flight_control_board_v5c/board.cmake new file mode 100644 index 00000000..dc6406b4 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/board.cmake @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: Apache-2.0 + +if("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "") + set(RPI_PICO_DEBUG_ADAPTER "cmsis-dap") +endif() + +board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]") +board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]") + +# The adapter speed is expected to be set by interface configuration. +# The Raspberry Pi's OpenOCD fork doesn't, so match their documentation at +# https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#debugging-with-swd +board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 5000") + +board_runner_args(jlink "--device=RP2350_M33_0") +board_runner_args(uf2 "--board-id=RP2350") + +include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) diff --git a/boards/bronco_space/proves_flight_control_board_v5c/board.yml b/boards/bronco_space/proves_flight_control_board_v5c/board.yml new file mode 100644 index 00000000..8fcf693e --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/board.yml @@ -0,0 +1,6 @@ +board: + name: proves_flight_control_board_v5c + full_name: PROVES Flight Control Board v5c + vendor: Bronco Space + socs: + - name: rp2350a diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi new file mode 100644 index 00000000..012ca613 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi @@ -0,0 +1,20 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + pinmux = , ; + }; + + group2 { + pinmux = ; + input-enable; + }; + }; + i2c1_default: i2c1_default { + group1 { + pinmux = , ; + input-enable; + }; + }; +}; diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi new file mode 100644 index 00000000..1583eaa0 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi @@ -0,0 +1,132 @@ +#include + +#include +#include + +#include "proves_flight_control_board_v5c-pinctrl.dtsi" + +/ { + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart0; + zephyr,shell-uart = &cdc_acm_uart0; + zephyr,code-partition = &code_partition; + }; + + aliases { + watchdog0 = &wdt0; + }; + + leds { + compatible = "gpio-leds"; + led0: led0 { + gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; + label = "User LED GPIO24"; + }; + }; +}; + +zephyr_udc0: &usbd { + status = "okay"; +}; + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_M(4)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Reserved memory for an image definition block. The block is much + * smaller than 256 bytes, but in practice the linker places the vector + * table at a much larger alignment offset. + */ + image_def: partition@0 { + label = "image_def"; + reg = <0x00000000 0x100>; + read-only; + }; + + /* + * Usable flash. Starts at 0x100, after the image definition block. + * The partition size is 4MB minus the 0x100 bytes taken by the + * image definition. + */ + code_partition: partition@100 { + label = "code-partition"; + reg = <0x100 (DT_SIZE_M(4) - 0x100)>; + read-only; + }; + }; +}; + +&timer0 { + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&spi1 { + status = "okay"; + cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&spi1_default>; + pinctrl-names = "default"; + + lora0: sx1276@0 { + compatible = "semtech,sx1276"; + reg = <0>; + spi-max-frequency = <125000>; + dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; + reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + power-amplifier-output = "pa-boost"; + label = "HOPE_RF"; + }; +}; + +&i2c1 { + status = "okay"; + pinctrl-0 = <&i2c1_default>; + pinctrl-names = "default"; + clock-frequency = <100000>; + + lsm6dso0: lsm6dso0@6b { + compatible = "st,lsm6dso"; + reg = <0x6b>; + label = "LSM6DSO"; + }; + + lis2mdl: lis2mdl@1e { + compatible = "st,lis2mdl"; + reg = <0x1e>; + label = "LIS2MDL"; + }; + rv3028: rv3028@52 { + compatible = "microcrystal,rv3028"; + reg = <0x52>; + int-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; + backup-switch-mode = "level"; + label = "RV3028"; + }; + ina219: ina219@40 { + compatible = "ti,ina219"; + reg = <0x40>; + shunt-milliohm = <2>; + lsb-microamp = <100>; + label = "INA219"; + }; +}; diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts new file mode 100644 index 00000000..dc57761a --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 Andrew Featherstone + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +/* The build system assumes that there's a cpucluster-specific file. + * + * This file provides composition of the device tree: + * 1. The common features of the SoC + * 2. Core-specific configuration. + * 3. Board-specific configuration. + */ +#include +#include + +#include "proves_flight_control_board_v5c.dtsi" diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.yaml b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.yaml new file mode 100644 index 00000000..847a3eb5 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.yaml @@ -0,0 +1,22 @@ +identifier: proves_flight_control_board_v5c/rp2350a/m33 +name: PROVES Flight Control Board v5c (RP2350, Cortex-M33) +type: mcu +arch: arm +flash: 4096 +ram: 520 +toolchain: + - zephyr + - gnuarmemb +supported: + - adc + - clock + - counter + - dma + - gpio + - hwinfo + - i2c + - pwm + - spi + - uart + - usbd + - watchdog diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig new file mode 100644 index 00000000..ff74ead6 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig @@ -0,0 +1,13 @@ +CONFIG_BUILD_OUTPUT_HEX=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_CLOCK_CONTROL=y +CONFIG_CONSOLE=y +CONFIG_GPIO=y +CONFIG_RESET=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_DEVICE_PRODUCT="PROVES Flight Control Board v5c" +CONFIG_USB_DEVICE_VID=0x0028 diff --git a/boards/bronco_space/proves_flight_control_board_v5c/support/openocd.cfg b/boards/bronco_space/proves_flight_control_board_v5c/support/openocd.cfg new file mode 100644 index 00000000..82666bb5 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5c/support/openocd.cfg @@ -0,0 +1,11 @@ +# Copyright (c) 2024 TOKITA Hiroshi +# SPDX-License-Identifier: Apache-2.0 + +# Checking and set 'adapter speed'. +# Set the adaptor speed, if unset, and given as an argument. +proc set_adapter_speed_if_not_set { speed } { + puts "checking adapter speed..." + if { [catch {adapter speed} ret] } { + adapter speed $speed + } +} diff --git a/boards/rpi_pico.overlay b/boards/rpi_pico.overlay deleted file mode 100644 index 6abcbcfe..00000000 --- a/boards/rpi_pico.overlay +++ /dev/null @@ -1,11 +0,0 @@ -&zephyr_udc0 { - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - }; -}; - -/ { - chosen { - zephyr,console = &cdc_acm_uart0; - }; -}; diff --git a/boards/rpi_pico2_rp2350a_m33.overlay b/boards/rpi_pico2_rp2350a_m33.overlay deleted file mode 100644 index ea7ecb55..00000000 --- a/boards/rpi_pico2_rp2350a_m33.overlay +++ /dev/null @@ -1,17 +0,0 @@ -&zephyr_udc0 { - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - }; -}; - -/ { - chosen { - zephyr,console = &cdc_acm_uart0; - }; -}; - -/* Override the default LED definition to use GPIO 24 instead of GPIO 25 for PROVES FC board*/ -&led0 { - gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; - label = "User LED GPIO24"; -}; diff --git a/boards/teensy40.overlay b/boards/teensy40.overlay deleted file mode 100644 index 8f7d324b..00000000 --- a/boards/teensy40.overlay +++ /dev/null @@ -1,15 +0,0 @@ -&zephyr_udc0 { - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - }; -}; - -&lpuart1 { - status = "okay"; - current-speed = < 115200 >; -}; - -&lpuart2 { - status = "okay"; - current-speed = < 115200 >; -}; diff --git a/boards/teensy41.overlay b/boards/teensy41.overlay deleted file mode 100644 index 8f7d324b..00000000 --- a/boards/teensy41.overlay +++ /dev/null @@ -1,15 +0,0 @@ -&zephyr_udc0 { - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - }; -}; - -&lpuart1 { - status = "okay"; - current-speed = < 115200 >; -}; - -&lpuart2 { - status = "okay"; - current-speed = < 115200 >; -}; diff --git a/prj.conf b/prj.conf index 7bb63394..a6ec0633 100644 --- a/prj.conf +++ b/prj.conf @@ -35,8 +35,8 @@ CONFIG_SERIAL=y CONFIG_GPIO=y CONFIG_LED=y CONFIG_PWM=n -CONFIG_I2C=n -CONFIG_SPI=n +CONFIG_I2C=y +CONFIG_SPI=y CONFIG_PINCTRL=y CONFIG_ASSERT=y @@ -55,3 +55,32 @@ CONFIG_RING_BUFFER=y CONFIG_PRINTK=y CONFIG_UART_CONSOLE=y CONFIG_COMMON_LIBC_MALLOC=y + +# Sensors +CONFIG_SENSOR=y +CONFIG_LSM6DSO=y +CONFIG_LSM6DSO_ENABLE_TEMP=y +CONFIG_LIS2MDL=y +CONFIG_INA219=y + +# Zbus +# CONFIG_ZBUS=y +# CONFIG_ZBUS_CHANNEL_NAME=y +# CONFIG_ZBUS_OBSERVER_NAME=y +# CONFIG_ZBUS_MSG_SUBSCRIBER=y +# CONFIG_ZBUS_LOG_LEVEL_DBG=n +# CONFIG_ZBUS_LOG_LEVEL_INF=y + +# Lora +CONFIG_LORA=y +CONFIG_LORA_SX127X=y + +# RTC +CONFIG_RTC=y +CONFIG_RTC_RV3028=y + +# Logging +CONFIG_LOG=y +CONFIG_LOG_DEFAULT_LEVEL=3 +# Compiler settings +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/settings.ini b/settings.ini index 888a8df8..d27e929f 100644 --- a/settings.ini +++ b/settings.ini @@ -6,4 +6,5 @@ default_toolchain: zephyr default_cmake_options: FPRIME_ENABLE_FRAMEWORK_UTS=OFF FPRIME_ENABLE_AUTOCODER_UTS=OFF - BOARD=rpi_pico2/rp2350a/m33 + BOARD_ROOT=. + BOARD=proves_flight_control_board_v5c/rp2350a/m33 From 7fd3d7b6790472fabc14a6f62f22baa6fe50b59d Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Mon, 8 Sep 2025 17:57:48 -0500 Subject: [PATCH 06/21] Remove commented config --- prj.conf | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/prj.conf b/prj.conf index a6ec0633..ebef3fc3 100644 --- a/prj.conf +++ b/prj.conf @@ -1,17 +1,9 @@ #### Configure Device VID and PID --> Uncomment the desired device definitions #### -#### From Teensy41 USB definitions #### -# CONFIG_USB_DEVICE_VID=0x16C0 -# CONFIG_USB_DEVICE_PID=0x0483 - #### From Raspberry Pi Pico2 USB Definitions #### CONFIG_USB_DEVICE_PID=0x000F CONFIG_USB_DEVICE_VID=0x2E8A -#### From Raspberry Pi Pico USB Definitions #### -# CONFIG_USB_DEVICE_PID=0x0003 -# CONFIG_USB_DEVICE_VID=0x2E8A - #### F Prime C++ Dependencies #### CONFIG_CPP=y CONFIG_REQUIRES_FULL_LIBCPP=y @@ -63,14 +55,6 @@ CONFIG_LSM6DSO_ENABLE_TEMP=y CONFIG_LIS2MDL=y CONFIG_INA219=y -# Zbus -# CONFIG_ZBUS=y -# CONFIG_ZBUS_CHANNEL_NAME=y -# CONFIG_ZBUS_OBSERVER_NAME=y -# CONFIG_ZBUS_MSG_SUBSCRIBER=y -# CONFIG_ZBUS_LOG_LEVEL_DBG=n -# CONFIG_ZBUS_LOG_LEVEL_INF=y - # Lora CONFIG_LORA=y CONFIG_LORA_SX127X=y From bbf35a31f69e22d23cc266311501cf59f516c9a1 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 17:36:40 -0500 Subject: [PATCH 07/21] Moving prj.conf sensors to board definition --- ...light_control_board_v5c_rp2350a_m33_defconfig | 14 ++++++++++++++ prj.conf | 16 +--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig index ff74ead6..6dcb23e3 100644 --- a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig @@ -11,3 +11,17 @@ CONFIG_USE_DT_CODE_PARTITION=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="PROVES Flight Control Board v5c" CONFIG_USB_DEVICE_VID=0x0028 + +# Sensors +CONFIG_LSM6DSO=y +CONFIG_LSM6DSO_ENABLE_TEMP=y +CONFIG_LIS2MDL=y +CONFIG_INA219=y + +# Lora +CONFIG_LORA=y +CONFIG_LORA_SX127X=y + +# RTC +CONFIG_RTC=y +CONFIG_RTC_RV3028=y diff --git a/prj.conf b/prj.conf index ebef3fc3..96d07ad7 100644 --- a/prj.conf +++ b/prj.conf @@ -48,23 +48,9 @@ CONFIG_PRINTK=y CONFIG_UART_CONSOLE=y CONFIG_COMMON_LIBC_MALLOC=y -# Sensors CONFIG_SENSOR=y -CONFIG_LSM6DSO=y -CONFIG_LSM6DSO_ENABLE_TEMP=y -CONFIG_LIS2MDL=y -CONFIG_INA219=y -# Lora -CONFIG_LORA=y -CONFIG_LORA_SX127X=y - -# RTC -CONFIG_RTC=y -CONFIG_RTC_RV3028=y - -# Logging CONFIG_LOG=y CONFIG_LOG_DEFAULT_LEVEL=3 -# Compiler settings + CONFIG_CBPRINTF_FP_SUPPORT=y From 57e4183bb3840d4fed798a4e489b725d441eb985 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 17:54:46 -0500 Subject: [PATCH 08/21] Add d board --- .../Kconfig.defconfig | 14 ++ .../Kconfig.proves_flight_control_board_v5d | 5 + .../board.cmake | 20 +++ .../proves_flight_control_board_v5d/board.yml | 6 + ...oves_flight_control_board_v5d-pinctrl.dtsi | 20 +++ .../proves_flight_control_board_v5d.dtsi | 132 ++++++++++++++++++ ...s_flight_control_board_v5d_rp2350a_m33.dts | 19 +++ ..._flight_control_board_v5d_rp2350a_m33.yaml | 22 +++ ...ht_control_board_v5d_rp2350a_m33_defconfig | 27 ++++ .../support/openocd.cfg | 11 ++ settings.ini | 2 +- 11 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/board.cmake create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/board.yml create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.yaml create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig create mode 100644 boards/bronco_space/proves_flight_control_board_v5d/support/openocd.cfg diff --git a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig new file mode 100644 index 00000000..d96b8a3f --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Andrew Featherstone +# SPDX-License-Identifier: Apache-2.0 + +if PROVES_FLIGHT_CONTROL_BOARD_V5D + +config USB_SELF_POWERED + default n + +config USB_CDC_ACM_LOG_LEVEL + default 0 + +config USB_DEVICE_LOG_LEVEL + default 1 +endif # PROVES_FLIGHT_CONTROL_BOARD_V5D diff --git a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d new file mode 100644 index 00000000..a4ae3506 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Andrew Featherstone +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5D + select SOC_RP2350A_M33 if BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5D_RP2350A_M33 diff --git a/boards/bronco_space/proves_flight_control_board_v5d/board.cmake b/boards/bronco_space/proves_flight_control_board_v5d/board.cmake new file mode 100644 index 00000000..dc6406b4 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/board.cmake @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: Apache-2.0 + +if("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "") + set(RPI_PICO_DEBUG_ADAPTER "cmsis-dap") +endif() + +board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]") +board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]") + +# The adapter speed is expected to be set by interface configuration. +# The Raspberry Pi's OpenOCD fork doesn't, so match their documentation at +# https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#debugging-with-swd +board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 5000") + +board_runner_args(jlink "--device=RP2350_M33_0") +board_runner_args(uf2 "--board-id=RP2350") + +include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) diff --git a/boards/bronco_space/proves_flight_control_board_v5d/board.yml b/boards/bronco_space/proves_flight_control_board_v5d/board.yml new file mode 100644 index 00000000..32c6ada0 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/board.yml @@ -0,0 +1,6 @@ +board: + name: proves_flight_control_board_v5d + full_name: PROVES Flight Control Board v5d + vendor: Bronco Space + socs: + - name: rp2350a diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi new file mode 100644 index 00000000..012ca613 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi @@ -0,0 +1,20 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + pinmux = , ; + }; + + group2 { + pinmux = ; + input-enable; + }; + }; + i2c1_default: i2c1_default { + group1 { + pinmux = , ; + input-enable; + }; + }; +}; diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi new file mode 100644 index 00000000..89032e94 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi @@ -0,0 +1,132 @@ +#include + +#include +#include + +#include "proves_flight_control_board_v5d-pinctrl.dtsi" + +/ { + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart0; + zephyr,shell-uart = &cdc_acm_uart0; + zephyr,code-partition = &code_partition; + }; + + aliases { + watchdog0 = &wdt0; + }; + + leds { + compatible = "gpio-leds"; + led0: led0 { + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + label = "User LED GPIO23"; + }; + }; +}; + +zephyr_udc0: &usbd { + status = "okay"; +}; + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_M(4)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Reserved memory for an image definition block. The block is much + * smaller than 256 bytes, but in practice the linker places the vector + * table at a much larger alignment offset. + */ + image_def: partition@0 { + label = "image_def"; + reg = <0x00000000 0x100>; + read-only; + }; + + /* + * Usable flash. Starts at 0x100, after the image definition block. + * The partition size is 4MB minus the 0x100 bytes taken by the + * image definition. + */ + code_partition: partition@100 { + label = "code-partition"; + reg = <0x100 (DT_SIZE_M(4) - 0x100)>; + read-only; + }; + }; +}; + +&timer0 { + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&spi1 { + status = "okay"; + cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&spi1_default>; + pinctrl-names = "default"; + + lora0: sx1276@0 { + compatible = "semtech,sx1276"; + reg = <0>; + spi-max-frequency = <125000>; + dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; + reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + power-amplifier-output = "pa-boost"; + label = "HOPE_RF"; + }; +}; + +&i2c1 { + status = "okay"; + pinctrl-0 = <&i2c1_default>; + pinctrl-names = "default"; + clock-frequency = <100000>; + + lsm6dso0: lsm6dso0@6b { + compatible = "st,lsm6dso"; + reg = <0x6b>; + label = "LSM6DSO"; + }; + + lis2mdl: lis2mdl@1e { + compatible = "st,lis2mdl"; + reg = <0x1e>; + label = "LIS2MDL"; + }; + rv3028: rv3028@52 { + compatible = "microcrystal,rv3028"; + reg = <0x52>; + int-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; + backup-switch-mode = "level"; + label = "RV3028"; + }; + ina219: ina219@40 { + compatible = "ti,ina219"; + reg = <0x40>; + shunt-milliohm = <2>; + lsb-microamp = <100>; + label = "INA219"; + }; +}; diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts new file mode 100644 index 00000000..92124e73 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 Andrew Featherstone + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +/* The build system assumes that there's a cpucluster-specific file. + * + * This file provides composition of the device tree: + * 1. The common features of the SoC + * 2. Core-specific configuration. + * 3. Board-specific configuration. + */ +#include +#include + +#include "proves_flight_control_board_v5d.dtsi" diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.yaml b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.yaml new file mode 100644 index 00000000..6880c0c1 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.yaml @@ -0,0 +1,22 @@ +identifier: proves_flight_control_board_v5d/rp2350a/m33 +name: PROVES Flight Control Board v5d (RP2350, Cortex-M33) +type: mcu +arch: arm +flash: 4096 +ram: 520 +toolchain: + - zephyr + - gnuarmemb +supported: + - adc + - clock + - counter + - dma + - gpio + - hwinfo + - i2c + - pwm + - spi + - uart + - usbd + - watchdog diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig new file mode 100644 index 00000000..cc694df0 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig @@ -0,0 +1,27 @@ +CONFIG_BUILD_OUTPUT_HEX=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_CLOCK_CONTROL=y +CONFIG_CONSOLE=y +CONFIG_GPIO=y +CONFIG_RESET=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_DEVICE_PRODUCT="PROVES Flight Control Board v5d" +CONFIG_USB_DEVICE_VID=0x0028 + +# Sensors +CONFIG_LSM6DSO=y +CONFIG_LSM6DSO_ENABLE_TEMP=y +CONFIG_LIS2MDL=y +CONFIG_INA219=y + +# Lora +CONFIG_LORA=y +CONFIG_LORA_SX127X=y + +# RTC +CONFIG_RTC=y +CONFIG_RTC_RV3028=y diff --git a/boards/bronco_space/proves_flight_control_board_v5d/support/openocd.cfg b/boards/bronco_space/proves_flight_control_board_v5d/support/openocd.cfg new file mode 100644 index 00000000..82666bb5 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5d/support/openocd.cfg @@ -0,0 +1,11 @@ +# Copyright (c) 2024 TOKITA Hiroshi +# SPDX-License-Identifier: Apache-2.0 + +# Checking and set 'adapter speed'. +# Set the adaptor speed, if unset, and given as an argument. +proc set_adapter_speed_if_not_set { speed } { + puts "checking adapter speed..." + if { [catch {adapter speed} ret] } { + adapter speed $speed + } +} diff --git a/settings.ini b/settings.ini index d27e929f..dde51b9e 100644 --- a/settings.ini +++ b/settings.ini @@ -7,4 +7,4 @@ default_toolchain: zephyr default_cmake_options: FPRIME_ENABLE_FRAMEWORK_UTS=OFF FPRIME_ENABLE_AUTOCODER_UTS=OFF BOARD_ROOT=. - BOARD=proves_flight_control_board_v5c/rp2350a/m33 + BOARD=proves_flight_control_board_v5d/rp2350a/m33 From e98a4346fb847853308c3957b9ad51926b8b78ee Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 18:06:03 -0500 Subject: [PATCH 09/21] Try referencing c definitions in d board --- ...oves_flight_control_board_v5d-pinctrl.dtsi | 20 --- .../proves_flight_control_board_v5d.dtsi | 130 +----------------- 2 files changed, 5 insertions(+), 145 deletions(-) delete mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi deleted file mode 100644 index 012ca613..00000000 --- a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d-pinctrl.dtsi +++ /dev/null @@ -1,20 +0,0 @@ -#include - -&pinctrl { - spi1_default: spi1_default { - group1 { - pinmux = , ; - }; - - group2 { - pinmux = ; - input-enable; - }; - }; - i2c1_default: i2c1_default { - group1 { - pinmux = , ; - input-enable; - }; - }; -}; diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi index 89032e94..8d98535a 100644 --- a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi @@ -3,130 +3,10 @@ #include #include -#include "proves_flight_control_board_v5d-pinctrl.dtsi" +#include "../proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi" +#include "../proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi" -/ { - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart0; - zephyr,shell-uart = &cdc_acm_uart0; - zephyr,code-partition = &code_partition; - }; - - aliases { - watchdog0 = &wdt0; - }; - - leds { - compatible = "gpio-leds"; - led0: led0 { - gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; - label = "User LED GPIO23"; - }; - }; -}; - -zephyr_udc0: &usbd { - status = "okay"; -}; - -&zephyr_udc0 { - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; -}; - -&flash0 { - reg = <0x10000000 DT_SIZE_M(4)>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Reserved memory for an image definition block. The block is much - * smaller than 256 bytes, but in practice the linker places the vector - * table at a much larger alignment offset. - */ - image_def: partition@0 { - label = "image_def"; - reg = <0x00000000 0x100>; - read-only; - }; - - /* - * Usable flash. Starts at 0x100, after the image definition block. - * The partition size is 4MB minus the 0x100 bytes taken by the - * image definition. - */ - code_partition: partition@100 { - label = "code-partition"; - reg = <0x100 (DT_SIZE_M(4) - 0x100)>; - read-only; - }; - }; -}; - -&timer0 { - status = "okay"; -}; - -&wdt0 { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&spi1 { - status = "okay"; - cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&spi1_default>; - pinctrl-names = "default"; - - lora0: sx1276@0 { - compatible = "semtech,sx1276"; - reg = <0>; - spi-max-frequency = <125000>; - dio-gpios = <&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,<&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; - reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; - power-amplifier-output = "pa-boost"; - label = "HOPE_RF"; - }; -}; - -&i2c1 { - status = "okay"; - pinctrl-0 = <&i2c1_default>; - pinctrl-names = "default"; - clock-frequency = <100000>; - - lsm6dso0: lsm6dso0@6b { - compatible = "st,lsm6dso"; - reg = <0x6b>; - label = "LSM6DSO"; - }; - - lis2mdl: lis2mdl@1e { - compatible = "st,lis2mdl"; - reg = <0x1e>; - label = "LIS2MDL"; - }; - rv3028: rv3028@52 { - compatible = "microcrystal,rv3028"; - reg = <0x52>; - int-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; - backup-switch-mode = "level"; - label = "RV3028"; - }; - ina219: ina219@40 { - compatible = "ti,ina219"; - reg = <0x40>; - shunt-milliohm = <2>; - lsb-microamp = <100>; - label = "INA219"; - }; +&led0 { + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + label = "User LED GPIO23"; }; From a75b69ffefbb834a6312c193421399f5b1c88a77 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 19:14:18 -0500 Subject: [PATCH 10/21] Making a common v5 board definition --- .../Kconfig.defconfig | 12 ++++++++++++ .../proves_flight_control_board_v5-pinctrl.dtsi} | 0 .../proves_flight_control_board_v5.dtsi} | 2 +- .../Kconfig.defconfig | 14 -------------- .../Kconfig.proves_flight_control_board_v5c | 6 +----- ...proves_flight_control_board_v5c_rp2350a_m33.dts | 2 +- ..._flight_control_board_v5c_rp2350a_m33_defconfig | 2 +- .../Kconfig.defconfig | 14 -------------- .../Kconfig.proves_flight_control_board_v5d | 8 ++++---- .../proves_flight_control_board_v5d.dtsi | 12 ------------ ...proves_flight_control_board_v5d_rp2350a_m33.dts | 7 ++++++- ..._flight_control_board_v5d_rp2350a_m33_defconfig | 2 +- settings.ini | 2 +- 13 files changed, 28 insertions(+), 55 deletions(-) create mode 100644 boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig rename boards/bronco_space/{proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi => proves_flight_control_board_v5/proves_flight_control_board_v5-pinctrl.dtsi} (100%) rename boards/bronco_space/{proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi => proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi} (97%) delete mode 100644 boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig delete mode 100644 boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig delete mode 100644 boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi diff --git a/boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig b/boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig new file mode 100644 index 00000000..53c0c734 --- /dev/null +++ b/boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig @@ -0,0 +1,12 @@ +config SOC_RP2350A_M33 + bool "Enable Arm cores" + default y + +config USB_SELF_POWERED + default n + +config USB_CDC_ACM_LOG_LEVEL + default 0 + +config USB_DEVICE_LOG_LEVEL + default 1 diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi b/boards/bronco_space/proves_flight_control_board_v5/proves_flight_control_board_v5-pinctrl.dtsi similarity index 100% rename from boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi rename to boards/bronco_space/proves_flight_control_board_v5/proves_flight_control_board_v5-pinctrl.dtsi diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi b/boards/bronco_space/proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi similarity index 97% rename from boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi rename to boards/bronco_space/proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi index 1583eaa0..cc25572f 100644 --- a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi +++ b/boards/bronco_space/proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi @@ -3,7 +3,7 @@ #include #include -#include "proves_flight_control_board_v5c-pinctrl.dtsi" +#include "proves_flight_control_board_v5-pinctrl.dtsi" / { chosen { diff --git a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig deleted file mode 100644 index 296c23fc..00000000 --- a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.defconfig +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2024 Andrew Featherstone -# SPDX-License-Identifier: Apache-2.0 - -if PROVES_FLIGHT_CONTROL_BOARD_V5C - -config USB_SELF_POWERED - default n - -config USB_CDC_ACM_LOG_LEVEL - default 0 - -config USB_DEVICE_LOG_LEVEL - default 1 -endif # PROVES_FLIGHT_CONTROL_BOARD_V5C diff --git a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c index 805f5070..ce2e6e17 100644 --- a/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c +++ b/boards/bronco_space/proves_flight_control_board_v5c/Kconfig.proves_flight_control_board_v5c @@ -1,5 +1 @@ -# Copyright (c) 2024 Andrew Featherstone -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5C - select SOC_RP2350A_M33 if BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5C_RP2350A_M33 +source "../../../boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig" diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts index dc57761a..e4290dd6 100644 --- a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33.dts @@ -16,4 +16,4 @@ #include #include -#include "proves_flight_control_board_v5c.dtsi" +#include "../proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi" diff --git a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig index 6dcb23e3..02bb4603 100644 --- a/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig +++ b/boards/bronco_space/proves_flight_control_board_v5c/proves_flight_control_board_v5c_rp2350a_m33_defconfig @@ -18,7 +18,7 @@ CONFIG_LSM6DSO_ENABLE_TEMP=y CONFIG_LIS2MDL=y CONFIG_INA219=y -# Lora +# Radio CONFIG_LORA=y CONFIG_LORA_SX127X=y diff --git a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig deleted file mode 100644 index d96b8a3f..00000000 --- a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.defconfig +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2024 Andrew Featherstone -# SPDX-License-Identifier: Apache-2.0 - -if PROVES_FLIGHT_CONTROL_BOARD_V5D - -config USB_SELF_POWERED - default n - -config USB_CDC_ACM_LOG_LEVEL - default 0 - -config USB_DEVICE_LOG_LEVEL - default 1 -endif # PROVES_FLIGHT_CONTROL_BOARD_V5D diff --git a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d index a4ae3506..b3bd39fa 100644 --- a/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d +++ b/boards/bronco_space/proves_flight_control_board_v5d/Kconfig.proves_flight_control_board_v5d @@ -1,5 +1,5 @@ -# Copyright (c) 2024 Andrew Featherstone -# SPDX-License-Identifier: Apache-2.0 - config BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5D - select SOC_RP2350A_M33 if BOARD_PROVES_FLIGHT_CONTROL_BOARD_V5D_RP2350A_M33 + bool "PROVES Flight Control Board v5d" + default y + +source "../../../boards/bronco_space/proves_flight_control_board_v5/Kconfig.defconfig" diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi deleted file mode 100644 index 8d98535a..00000000 --- a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d.dtsi +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#include -#include - -#include "../proves_flight_control_board_v5c/proves_flight_control_board_v5c.dtsi" -#include "../proves_flight_control_board_v5c/proves_flight_control_board_v5c-pinctrl.dtsi" - -&led0 { - gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; - label = "User LED GPIO23"; -}; diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts index 92124e73..e265d05f 100644 --- a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33.dts @@ -16,4 +16,9 @@ #include #include -#include "proves_flight_control_board_v5d.dtsi" +#include "../proves_flight_control_board_v5/proves_flight_control_board_v5.dtsi" + +&led0 { + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + label = "User LED GPIO23"; +}; diff --git a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig index cc694df0..fccf5b0f 100644 --- a/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig +++ b/boards/bronco_space/proves_flight_control_board_v5d/proves_flight_control_board_v5d_rp2350a_m33_defconfig @@ -18,7 +18,7 @@ CONFIG_LSM6DSO_ENABLE_TEMP=y CONFIG_LIS2MDL=y CONFIG_INA219=y -# Lora +# Radio CONFIG_LORA=y CONFIG_LORA_SX127X=y diff --git a/settings.ini b/settings.ini index dde51b9e..d27e929f 100644 --- a/settings.ini +++ b/settings.ini @@ -7,4 +7,4 @@ default_toolchain: zephyr default_cmake_options: FPRIME_ENABLE_FRAMEWORK_UTS=OFF FPRIME_ENABLE_AUTOCODER_UTS=OFF BOARD_ROOT=. - BOARD=proves_flight_control_board_v5d/rp2350a/m33 + BOARD=proves_flight_control_board_v5c/rp2350a/m33 From 649e44f0f5c0cf0422a6b2a87dad59e337b164c3 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 21:09:18 -0500 Subject: [PATCH 11/21] Fix readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index da8d525b..9568b5c0 100644 --- a/README.md +++ b/README.md @@ -63,11 +63,11 @@ Now you want to install the firmware to the board. make install BOARD_DIR=[path-to-your-board] ``` -or +or ``` cp build-fprime-automatic-zephyr/zephyr/zephyr.uf2 [path-to-your-board] ``` -to copy the uf2 if the make install isnt working +to copy the uf2 if the make install isn't working Finally, run the fprime-gds. ```shell From fa0b3605d12817b0c028ce91fbca6b12cae88a64 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Fri, 12 Sep 2025 23:55:24 -0500 Subject: [PATCH 12/21] Minor Makefile, Readme and cmake presets fixes --- CMakePresets.json | 6 +++--- Makefile | 46 ++++++++++++++-------------------------------- README.md | 15 +-------------- 3 files changed, 18 insertions(+), 49 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index ba50b3ba..685b8a2a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -3,18 +3,18 @@ { "binaryDir": "${sourceDir}/build-fprime-automatic-zephyr", "cacheVariables": { - "BOARD": "teensy41", + "BOARD": "proves_flight_control_board_v5c/rp2350a/m33", "CMAKE_BUILD_TYPE": "Release", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" }, "description": "F\u00b4 release build using local fprime-venv", - "displayName": "F\u00b4 Zephyr (teensy41)", + "displayName": "F\u00b4 FPrime Zephyr PROVES", "environment": { "PATH": "$env{VIRTUAL_ENV}/bin:$penv{PATH}", "VIRTUAL_ENV": "${fileDir}/fprime-venv" }, "generator": "Ninja", - "name": "fprime-zephyr-teensy41", + "name": "fprime-zephyr-proves", "toolchainFile": "${fileDir}/lib/fprime-zephyr/cmake/toolchain/zephyr.cmake" } ], diff --git a/Makefile b/Makefile index 542c0f43..9460b69c 100644 --- a/Makefile +++ b/Makefile @@ -13,15 +13,14 @@ submodules: ## Initialize and update git submodules git submodule update --init --recursive export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv -fprime-venv: uv ## Create a virtual environment - @test -s $(VIRTUAL_ENV) || { \ - echo "Creating virtual environment..."; \ - $(UV) venv fprime-venv; \ - $(UV) pip install --requirement requirements.txt; \ - } +fprime-venv: ## Create a virtual environment + @$(MAKE) uv + @echo "Creating virtual environment..."; \ + @$(UV) venv fprime-venv; \ + @$(UV) pip install --requirement requirements.txt; \ .PHONY: zephyr-setup -zephyr-setup: uv ## Set up Zephyr environment +zephyr-setup: fprime-venv ## Set up Zephyr environment @test -s lib/zephyr-workspace/tools/edtt/.gitignore || { \ echo "Setting up Zephyr environment..."; \ cd lib/zephyr-workspace && \ @@ -34,18 +33,17 @@ zephyr-setup: uv ## Set up Zephyr environment ##@ Development .PHONY: pre-commit-install -pre-commit-install: uv - @echo "Installing pre-commit hooks..." +pre-commit-install: uv ## Install pre-commit hooks @$(UVX) pre-commit install > /dev/null .PHONY: fmt fmt: pre-commit-install ## Lint and format files - $(UVX) pre-commit run --all-files + @$(UVX) pre-commit run --all-files .PHONY: generate generate: submodules fprime-venv zephyr-setup ## Generate FPrime-Zephyr Proves Core Reference @echo "Generating FPrime-Zephyr Proves Core Reference..." - $(UV) run fprime-util generate --force + @$(UV) run fprime-util generate --force .PHONY: generate-if-needed BUILD_DIR ?= $(shell pwd)/build-fprime-automatic-zephyr @@ -53,26 +51,16 @@ generate-if-needed: @test -s $(BUILD_DIR) || $(MAKE) generate .PHONY: build -build: generate-if-needed ## Build FPrime-Zephyr Proves Core Reference - @echo "Building FPrime code..." +build: fprime-venv generate-if-needed ## Build FPrime-Zephyr Proves Core Reference + @echo "Building..." @$(UV) run fprime-util build -.PHONY: list-tty -list-tty: arduino-cli ## List available TTY ports - @echo "TTY ports:" - @$(ARDUINO_CLI) board list | grep "USB" | awk '{print $$1}' - -.PHONY: install -UF2 ?= $(BUILD_DIR)/zephyr/zephyr.uf2 -install: arduino-cli build ## Install the zephyr firmware onto a connected PROVES Kit, requires BOARD_DIR=[path-to-your-board] - @$(ARDUINO_CLI) config init || true - @$(ARDUINO_CLI) config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json - @$(ARDUINO_CLI) core install rp2040:rp2040@4.1.1 - @$(ARDUINO_CLI) upload -v -b 115200 --fqbn rp2040:rp2040:rpipico -p $(BOARD_DIR) -i $(UF2) - .PHONY: clean clean: ## Remove all gitignored files git clean -dfX + +.PHONY: clean-zephyr +clean-zephyr: ## Remove all Zephyr build files rm -rf lib/zephyr-workspace/bootloader lib/zephyr-workspace/modules lib/zephyr-workspace/tools ##@ Operations @@ -98,9 +86,3 @@ UVX ?= $(UV_DIR)/uvx uv: $(UV) ## Download uv $(UV): $(BIN_DIR) @test -s $(UV) || { mkdir -p $(UV_DIR); curl -LsSf https://astral.sh/uv/$(UV_VERSION)/install.sh | UV_INSTALL_DIR=$(UV_DIR) sh > /dev/null; } - -ARDUINO_CLI ?= $(BIN_DIR)/arduino-cli -.PHONY: arduino-cli -arduino-cli: $(ARDUINO_CLI) ## Download arduino-cli -$(ARDUINO_CLI): $(BIN_DIR) - @test -s $(ARDUINO_CLI) || curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$(BIN_DIR) sh > /dev/null diff --git a/README.md b/README.md index da8d525b..d287040a 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,7 @@ make build ### Find the path to your board -Next, plug in your board! If you have previously installed a firmware on your board you may not see it show up as a drive. In that case you'll want to find it's `tty` port. - -To do this, run the following command -```shell -make list-tty -``` - -Otherwise, you want to find the location of the board on your computer. It should be called something like RP2350 but you want to find the path to it +Next, plug in your board! If you have previously installed a firmware on your board you may not see it show up as a drive. In that case you'll want to put the board into boot loader mode. Then you'll be able to find the location of the board on your computer. It should be called something like RP2350 but you want to find the path to it For Mac: ```shell @@ -59,15 +52,9 @@ findmnt ``` Now you want to install the firmware to the board. -```shell -make install BOARD_DIR=[path-to-your-board] -``` - -or ``` cp build-fprime-automatic-zephyr/zephyr/zephyr.uf2 [path-to-your-board] ``` -to copy the uf2 if the make install isnt working Finally, run the fprime-gds. ```shell From e7d8e9cd4180a087e9914999eb70554681d02f85 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Tue, 16 Sep 2025 18:32:58 -0500 Subject: [PATCH 13/21] change lsm6dso internal structs to carry F64 and added output ports to imu --- FprimeZephyrReference/Components/Imu/Imu.fpp | 26 ++++------ .../lms6dsoDriver/lms6dsoDriver.cpp | 51 ++++++++++++++++++- .../lms6dsoDriver/lms6dsoDriver.fpp | 21 ++++---- .../lms6dsoDriver/lms6dsoDriver.hpp | 23 +++++++++ 4 files changed, 94 insertions(+), 27 deletions(-) diff --git a/FprimeZephyrReference/Components/Imu/Imu.fpp b/FprimeZephyrReference/Components/Imu/Imu.fpp index 56d12660..a5f3210f 100644 --- a/FprimeZephyrReference/Components/Imu/Imu.fpp +++ b/FprimeZephyrReference/Components/Imu/Imu.fpp @@ -3,25 +3,11 @@ module Components { passive component Imu { sync input port run: Svc.Sched - @ Acceleration reading in m/s^2 - struct Acceleration { - x: F64 - y: F64 - z: F64 - } + output port readAcceleration: AccelerationRead - @ Telemetry channel for acceleration - telemetry Acceleration: Acceleration + output port readAngulatVelocity: AngularVelocityRead - @ Angular velocity reading in rad/s - struct AngularVelocity { - x: F64 - y: F64 - z: F64 - } - - @ Telemetry channel for angular velocity - telemetry AngularVelocity: AngularVelocity + output port readTemperature: TemperatureRead @ Magnetic field reading in gauss struct MagneticField { @@ -36,6 +22,12 @@ module Components { @ Telemetry channel for temperature in degrees Celsius telemetry Temperature: F64 + @Telemetry channel for angular velocity + telemetry AngularVelocity: AngularVelocity + + @ Telemetry channel for Acceleration + telemetry Acceleration: Acceleration + ############################################################################### # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # ############################################################################### diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp index 7887097b..659583e2 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp @@ -12,8 +12,57 @@ namespace Components { // Component construction and destruction // ---------------------------------------------------------------------- -lms6dsoDriver ::lms6dsoDriver(const char* const compName) : lms6dsoDriverComponentBase(compName) {} +lms6dsoDriver ::lms6dsoDriver(const char* const compName) : lms6dsoDriverComponentBase(compName) { + // Initialize the LSM6DSO sensor + lsm6dso = DEVICE_DT_GET_ONE(st_lsm6dso); + FW_ASSERT(device_is_ready(lsm6dso)); + // Configure the LSM6DSO sensor + struct sensor_value odr = {.val1 = 12, .val2 = 500000}; // 12.5 Hz + sensor_attr_set(lsm6dso, SENSOR_CHAN_ACCEL_XYZ, SENSOR_ATTR_SAMPLING_FREQUENCY, &odr); + sensor_attr_set(lsm6dso, SENSOR_CHAN_GYRO_XYZ, SENSOR_ATTR_SAMPLING_FREQUENCY, &odr); +} lms6dsoDriver ::~lms6dsoDriver() {} +// ---------------------------------------------------------------------- +// Handler implementations for typed input ports +// ---------------------------------------------------------------------- + +Components::Acceleration lms6dsoDriver::getAcceleration_handler(FwIndexType portNum) { + struct sensor_value x; + struct sensor_value y; + struct sensor_value z; + + sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_X, &x); + sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_Y, &y); + sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_Z, &z); + + return Components::Acceleration(this->sensor_value_to_f64(x),this->sensor_value_to_f64(y), this->sensor_value_to_f64(z)); +} + +Components::AngularVelocity lms6dsoDriver::getAngularVelocity_handler(FwIndexType portNum) { + struct sensor_value x; + struct sensor_value y; + struct sensor_value z; + + sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_X, &x); + sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_Y, &y); + sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_Z, &z); + + return Components::AngularVelocity(this->sensor_value_to_f64(x),this->sensor_value_to_f64(y), this->sensor_value_to_f64(z)); +} + + +F64 lms6dsoDriver::getTemperature_handler(FwIndexType portNum) { + struct sensor_value temp; + + sensor_channel_get(lsm6dso, SENSOR_CHAN_DIE_TEMP, &temp); + + return this->sensor_value_to_f64(temp); +} + +F64 lms6dsoDriver::sensor_value_to_f64(const struct sensor_value& val) { + return val.val1 + val.val2 / 1000000.0f; +} + } // namespace Components diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp index 7e1f27e4..1e1c3f39 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp @@ -1,5 +1,9 @@ module Components { - + # @ Extern type to define zepyhr sensor_value + # struct SensorValue { + # val1: I32 + # val2: I32 + # } @ Acceleration Reading in m/s^2 struct Acceleration { x: F64 @@ -14,19 +18,18 @@ module Components { z: F64 } - struct SensorReadings { - acceleration: Acceleration - gyro: AngularVelocity - } - - port getData() -> SensorReadings + port AccelerationRead() -> Acceleration + port AngularVelocityRead() -> AngularVelocity + port TemperatureRead() -> F64 @ Initialize and control operation of the lms6dso device passive component lms6dsoDriver { @ Port for synchronously retrieving data - sync input port GetSensorData: getData - + sync input port getAcceleration: AccelerationRead + sync input port getAngularVelocity: AngularVelocityRead + sync input port getTemperature: TemperatureRead + ############################################################################### # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # ############################################################################### diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp index 33bbd1a5..b9c9fc46 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.hpp @@ -9,6 +9,11 @@ #include "FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriverComponentAc.hpp" + +#include +#include +#include + namespace Components { class lms6dsoDriver final : public lms6dsoDriverComponentBase { @@ -23,6 +28,24 @@ class lms6dsoDriver final : public lms6dsoDriverComponentBase { //! Destroy lms6dsoDriver object ~lms6dsoDriver(); + + private: + + // ---------------------------------------------------------------------- + // Handler implementations for typed input ports + // ---------------------------------------------------------------------- + Acceleration getAcceleration_handler(FwIndexType portNum) override; + + AngularVelocity getAngularVelocity_handler(FwIndexType portNum) override; + + F64 getTemperature_handler(FwIndexType portNum) override; + + F64 sensor_value_to_f64(const struct sensor_value &val); + + //! Zephyr device stores the initialized LSM6DSO sensor + const struct device* lsm6dso; + + }; } // namespace Components From 958854f60bfd7bc2dc858aac92654b66749505a4 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Wed, 17 Sep 2025 12:42:12 -0500 Subject: [PATCH 14/21] removed lmsdso init from imu constructor --- FprimeZephyrReference/Components/Imu/Imu.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/FprimeZephyrReference/Components/Imu/Imu.cpp b/FprimeZephyrReference/Components/Imu/Imu.cpp index 2af08aa3..14432e43 100644 --- a/FprimeZephyrReference/Components/Imu/Imu.cpp +++ b/FprimeZephyrReference/Components/Imu/Imu.cpp @@ -18,14 +18,6 @@ Imu ::Imu(const char* const compName) : ImuComponentBase(compName) { lis2mdl = device_get_binding("LIS2MDL"); FW_ASSERT(device_is_ready(lis2mdl)); - // Initialize the LSM6DSO sensor - lsm6dso = DEVICE_DT_GET_ONE(st_lsm6dso); - FW_ASSERT(device_is_ready(lsm6dso)); - - // Configure the LSM6DSO sensor - struct sensor_value odr = {.val1 = 12, .val2 = 500000}; // 12.5 Hz - FW_ASSERT(sensor_attr_set(lsm6dso, SENSOR_CHAN_ACCEL_XYZ, SENSOR_ATTR_SAMPLING_FREQUENCY, &odr) == 0); - FW_ASSERT(sensor_attr_set(lsm6dso, SENSOR_CHAN_GYRO_XYZ, SENSOR_ATTR_SAMPLING_FREQUENCY, &odr) == 0); } Imu ::~Imu() {} From ac46912fcaacc594b441d18c8a1f2c99316bf75b Mon Sep 17 00:00:00 2001 From: asiemsen Date: Wed, 17 Sep 2025 12:46:01 -0500 Subject: [PATCH 15/21] remove old sensor reading from imu --- FprimeZephyrReference/Components/Imu/Imu.cpp | 44 +++----------------- FprimeZephyrReference/Components/Imu/Imu.fpp | 2 +- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/FprimeZephyrReference/Components/Imu/Imu.cpp b/FprimeZephyrReference/Components/Imu/Imu.cpp index 14432e43..e526d1d1 100644 --- a/FprimeZephyrReference/Components/Imu/Imu.cpp +++ b/FprimeZephyrReference/Components/Imu/Imu.cpp @@ -28,48 +28,22 @@ Imu ::~Imu() {} void Imu ::run_handler(FwIndexType portNum, U32 context) { // Fetch new data samples from the sensors - sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_ACCEL_XYZ); - sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_GYRO_XYZ); sensor_sample_fetch_chan(lis2mdl, SENSOR_CHAN_MAGN_XYZ); - sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_DIE_TEMP); + // Output sensor values via telemetry - this->tlmWrite_Acceleration(this->get_acceleration()); - this->tlmWrite_AngularVelocity(this->get_angular_velocity()); + this->tlmWrite_Acceleration(this->readAcceleration_out(0)); + this->tlmWrite_AngularVelocity(this->readAngularVelocity_out(0)); + this->tlmWrite_Temperature(this->readTemperature_out(0)); + this->tlmWrite_MagneticField(this->get_magnetic_field()); - this->tlmWrite_Temperature(this->get_temperature()); + } F64 Imu ::sensor_value_to_f64(const struct sensor_value& val) { return val.val1 + val.val2 / 1000000.0f; } -Components::Imu_Acceleration Imu ::get_acceleration() { - struct sensor_value x; - struct sensor_value y; - struct sensor_value z; - - sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_X, &x); - sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_Y, &y); - sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_Z, &z); - - return Components::Imu_Acceleration(this->sensor_value_to_f64(x), this->sensor_value_to_f64(y), - this->sensor_value_to_f64(z)); -} - -Components::Imu_AngularVelocity Imu ::get_angular_velocity() { - struct sensor_value x; - struct sensor_value y; - struct sensor_value z; - - sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_X, &x); - sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_Y, &y); - sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_Z, &z); - - return Components::Imu_AngularVelocity(this->sensor_value_to_f64(x), this->sensor_value_to_f64(y), - this->sensor_value_to_f64(z)); -} - Components::Imu_MagneticField Imu ::get_magnetic_field() { struct sensor_value x; struct sensor_value y; @@ -83,11 +57,5 @@ Components::Imu_MagneticField Imu ::get_magnetic_field() { this->sensor_value_to_f64(z)); } -F64 Imu ::get_temperature() { - struct sensor_value temp; - sensor_channel_get(lsm6dso, SENSOR_CHAN_DIE_TEMP, &temp); - - return this->sensor_value_to_f64(temp); -} } // namespace Components diff --git a/FprimeZephyrReference/Components/Imu/Imu.fpp b/FprimeZephyrReference/Components/Imu/Imu.fpp index a5f3210f..775389a3 100644 --- a/FprimeZephyrReference/Components/Imu/Imu.fpp +++ b/FprimeZephyrReference/Components/Imu/Imu.fpp @@ -5,7 +5,7 @@ module Components { output port readAcceleration: AccelerationRead - output port readAngulatVelocity: AngularVelocityRead + output port readAngularVelocity: AngularVelocityRead output port readTemperature: TemperatureRead From 8e1447a6cb8b6b389936bc6773cf88215fbca994 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Wed, 17 Sep 2025 13:01:33 -0500 Subject: [PATCH 16/21] add lms6dso driver to topology --- .../ReferenceDeployment/Top/instances.fpp | 2 ++ .../ReferenceDeployment/Top/topology.fpp | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp index 1c0e018c..e194dac4 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp @@ -65,4 +65,6 @@ module ReferenceDeployment { instance watchdog: Components.Watchdog base id 0x10016000 instance imu: Components.Imu base id 0x10017000 + + instance lms6dsoDriver: Components.lms6dsoDriver base id 0x10018000 } diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp index 45563909..06fed28f 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp @@ -30,6 +30,7 @@ module ReferenceDeployment { instance watchdog instance prmDb instance imu + # instance lms6dsoDriver # ---------------------------------------------------------------------- # Pattern graph specifiers @@ -100,9 +101,15 @@ module ReferenceDeployment { watchdog.gpioSet -> gpioDriver.gpioWrite } - connections ReferenceDeployment { + connections Imu { + imu.readAcceleration -> lms6dsoDriver.getAcceleration + imu.readAngularVelocity -> lms6dsoDriver.getAngularVelocity + imu.readTemperature -> lms6dsoDriver.getTemperature } + connections ReferenceDeployment { + + } } From 29bffee1b62d2ca815094b167505a5f8691494de Mon Sep 17 00:00:00 2001 From: asiemsen Date: Wed, 17 Sep 2025 13:03:12 -0500 Subject: [PATCH 17/21] change base id to allow for lis2mdl driver --- FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp index e194dac4..8e2b5f95 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp @@ -66,5 +66,5 @@ module ReferenceDeployment { instance imu: Components.Imu base id 0x10017000 - instance lms6dsoDriver: Components.lms6dsoDriver base id 0x10018000 + instance lms6dsoDriver: Components.lms6dsoDriver base id 0x10019000 } From d7e1b35152d51106a7d6f779096f1260d812570b Mon Sep 17 00:00:00 2001 From: Saidi Adams Date: Wed, 17 Sep 2025 18:01:23 -0500 Subject: [PATCH 18/21] remove line endings --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9460b69c..10599b30 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,9 @@ submodules: ## Initialize and update git submodules export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv fprime-venv: ## Create a virtual environment @$(MAKE) uv - @echo "Creating virtual environment..."; \ - @$(UV) venv fprime-venv; \ - @$(UV) pip install --requirement requirements.txt; \ + @echo "Creating virtual environment..." + @$(UV) venv fprime-venv + @$(UV) pip install --requirement requirements.txt .PHONY: zephyr-setup zephyr-setup: fprime-venv ## Set up Zephyr environment From bb1be346155186d17e308153f43f255d4d0d2340 Mon Sep 17 00:00:00 2001 From: asiemsen Date: Wed, 17 Sep 2025 18:03:55 -0500 Subject: [PATCH 19/21] add channel retrieval during sensor data --- FprimeZephyrReference/Components/Imu/Imu.hpp | 12 ++---------- .../Components/lms6dsoDriver/lms6dsoDriver.cpp | 3 +++ .../Components/lms6dsoDriver/lms6dsoDriver.fpp | 6 +----- .../ReferenceDeployment/Top/topology.fpp | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/FprimeZephyrReference/Components/Imu/Imu.hpp b/FprimeZephyrReference/Components/Imu/Imu.hpp index 2484fdb2..d3885fa3 100644 --- a/FprimeZephyrReference/Components/Imu/Imu.hpp +++ b/FprimeZephyrReference/Components/Imu/Imu.hpp @@ -47,17 +47,10 @@ class Imu final : public ImuComponentBase { // IMU access methods // ---------------------------------------------------------------------- - //! Get the acceleration reading from the IMU - Components::Imu_Acceleration get_acceleration(); - - //! Get the angular velocity reading from the IMU - Components::Imu_AngularVelocity get_angular_velocity(); - + //! Get the magnetic field reading from the IMU Components::Imu_MagneticField get_magnetic_field(); - //! Get the temperature reading from the IMU - F64 get_temperature(); // ---------------------------------------------------------------------- // Member variables @@ -66,8 +59,7 @@ class Imu final : public ImuComponentBase { //! Zephyr device stores the initialized LIS2MDL sensor const struct device* lis2mdl; - //! Zephyr device stores the initialized LSM6DSO sensor - const struct device* lsm6dso; + }; } // namespace Components diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp index 659583e2..9d4819f1 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.cpp @@ -32,6 +32,7 @@ Components::Acceleration lms6dsoDriver::getAcceleration_handler(FwIndexType port struct sensor_value x; struct sensor_value y; struct sensor_value z; + sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_ACCEL_XYZ); sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_X, &x); sensor_channel_get(lsm6dso, SENSOR_CHAN_ACCEL_Y, &y); @@ -44,6 +45,7 @@ Components::AngularVelocity lms6dsoDriver::getAngularVelocity_handler(FwIndexTyp struct sensor_value x; struct sensor_value y; struct sensor_value z; + sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_GYRO_XYZ); sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_X, &x); sensor_channel_get(lsm6dso, SENSOR_CHAN_GYRO_Y, &y); @@ -56,6 +58,7 @@ Components::AngularVelocity lms6dsoDriver::getAngularVelocity_handler(FwIndexTyp F64 lms6dsoDriver::getTemperature_handler(FwIndexType portNum) { struct sensor_value temp; + sensor_sample_fetch_chan(lsm6dso, SENSOR_CHAN_DIE_TEMP); sensor_channel_get(lsm6dso, SENSOR_CHAN_DIE_TEMP, &temp); return this->sensor_value_to_f64(temp); diff --git a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp index 1e1c3f39..fc635010 100644 --- a/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp +++ b/FprimeZephyrReference/Components/lms6dsoDriver/lms6dsoDriver.fpp @@ -1,9 +1,5 @@ module Components { - # @ Extern type to define zepyhr sensor_value - # struct SensorValue { - # val1: I32 - # val2: I32 - # } + @ Acceleration Reading in m/s^2 struct Acceleration { x: F64 diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp index 06fed28f..9791e1df 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp @@ -30,7 +30,7 @@ module ReferenceDeployment { instance watchdog instance prmDb instance imu - # instance lms6dsoDriver + instance lms6dsoDriver # ---------------------------------------------------------------------- # Pattern graph specifiers From 31e3f8d73036a01d90cf181c58d798fcd05fa70e Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Thu, 18 Sep 2025 13:38:33 -0500 Subject: [PATCH 20/21] Ensure submodules are downloaded before venv is created --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 10599b30..f5b5f92e 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ submodules: ## Initialize and update git submodules export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv fprime-venv: ## Create a virtual environment @$(MAKE) uv + @$(MAKE) submodules zephyr-setup @echo "Creating virtual environment..." @$(UV) venv fprime-venv @$(UV) pip install --requirement requirements.txt From f7f09fb14e3ea79a9650c30febf14fc09725d895 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Thu, 18 Sep 2025 13:44:42 -0500 Subject: [PATCH 21/21] Fix infinit submodule make target recursion... --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f5b5f92e..1e9d030c 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ submodules: ## Initialize and update git submodules export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv fprime-venv: ## Create a virtual environment @$(MAKE) uv - @$(MAKE) submodules zephyr-setup @echo "Creating virtual environment..." @$(UV) venv fprime-venv @$(UV) pip install --requirement requirements.txt @@ -52,7 +51,7 @@ generate-if-needed: @test -s $(BUILD_DIR) || $(MAKE) generate .PHONY: build -build: fprime-venv generate-if-needed ## Build FPrime-Zephyr Proves Core Reference +build: submodules zephyr-setup fprime-venv generate-if-needed ## Build FPrime-Zephyr Proves Core Reference @echo "Building..." @$(UV) run fprime-util build