refactor: move firmware workspace under firmware

This commit is contained in:
Onur Özkan committed 2026-08-10 16:58:55 +03:00
1 parent 153b0bf262
commit f03fc119a4
222 files changed
+56 -13

No files matched your search

@@ -0,0 +1,22 @@
[package]
name = "kaptan-kakute-f7-mini-v3"
edition.workspace = true
license.workspace = true
rust-version.workspace = true
version.workspace = true
[lints]
workspace = true
[features]
lidar-lite-v3 = []
[dependencies]
kaptan-board = { path = "../../libs/kaptan-board" }
platform-stm32f7 = { path = "../../platforms/stm32f7" }
[[bin]]
name = "kaptan-kakute-f7-mini-v3"
path = "src/main.rs"
test = false
bench = false
@@ -0,0 +1,9 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rustc-link-arg=-Tlink.x");
println!(
"cargo:rustc-link-search={}",
std::env::var("CARGO_MANIFEST_DIR").expect("Cargo must set CARGO_MANIFEST_DIR")
);
}
Binary file not shown.
@@ -0,0 +1,19 @@
MEMORY
{
FLASH : ORIGIN = 0x08000000, LENGTH = 512K
/*
* STM32F722 RAM totals 256 KiB:
* - DTCM: 64 KiB at 0x2000_0000
* - SRAM1: 176 KiB at 0x2001_0000
* - SRAM2: 16 KiB at 0x2003_C000
*
* SRAM1 and SRAM2 are contiguous and are both accessible by DMA1 and DMA2.
* They form one 192 KiB default RAM region from 0x2001_0000 through
* 0x2003_FFFF. DTCM is intentionally kept separate for a future explicit
* placement policy rather than mixing CPU-critical and general allocations.
*
* TODO: Utilize DTCM.
*
*/
RAM : ORIGIN = 0x20010000, LENGTH = 192K
}
@@ -0,0 +1,51 @@
//! Declarative Kakute F7 Mini V3 board description.
//!
//! This module deliberately contains no MCU registers, RTIC concepts, unsafe
//! code, interrupt names, DMA handling, or task scheduling. Those concerns
//! belong to the STM32F7 platform crate.
use kaptan_board::{
BoardConfig, BoardProfile, DataChannelRates, ImuDevice, ImuMount, MavlinkEndpoint, MavlinkPort,
Severity, TelemetryProfile, VerticalSensingKind,
};
use platform_stm32f7::{
BoardError, F7Board, F7BoardBuilder, F722BoardRoutes, Mavlink, Mpu6000, Pa4, VerticalSensor,
};
/// Holybro Kakute F7 Mini V3.
pub struct KakuteF7MiniV3;
const CONFIG: BoardConfig = BoardConfig {
name: "Kakute F7 Mini V3",
mavlink: MavlinkEndpoint {
system_id: 1,
component_id: 1,
port: MavlinkPort::Serial1,
baud: 115_200,
},
profile: BoardProfile::TelemetryOnly(TelemetryProfile {
imu: ImuDevice::Mpu6000,
imu_mount: ImuMount::BodyAligned,
vertical_sensing: VerticalSensingKind::RangeAndOpticalFlow,
data_channel: DataChannelRates {
service_hz: 100,
raw_imu_hz: 20,
range_hz: Some(20),
optical_flow_hz: Some(20),
heartbeat_hz: 2,
},
maximum_log_level: Severity::Info,
}),
};
impl F7Board for KakuteF7MiniV3 {
const CONFIG: BoardConfig = CONFIG;
fn build(platform: F7BoardBuilder) -> Result<F722BoardRoutes, BoardError> {
platform
.imu(Mpu6000::on_spi1().with_drdy(Pa4))
.mavlink(Mavlink::on_usart1())
.vertical_sensor(VerticalSensor::mtf01_on_uart4())
.build()
}
}
@@ -0,0 +1,5 @@
#![no_std]
#![no_main]
mod board;
platform_stm32f7::flight_firmware!(board::KakuteF7MiniV3);