Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sfy-buoy/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions sfy-buoy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ path = "src/bin/sfypack.rs"
required-features = [ "build-bin", "raw" ]

[workspace]
members = [ "target-test", "sfy-artemis", "sfy-ext-gps" ]
members = [ "target-test", "sfy-artemis", "sfy-ext-gps", "sombie" ]

[dependencies]
base64 = { version = "0.13.0", default-features = false }
Expand Down Expand Up @@ -59,7 +59,8 @@ fir = []
storage = []
ext-gps = [ "dep:serde-json-core"]
spectrum = [ "dep:microfft", "dep:num-complex" ]
ntn-test = [ "spectrum" ]
ntn = []
ntn-test = [ "ntn" ]
surf = []
ice = []
testing = [ "defmt/unstable-test" ]
Expand Down
2 changes: 1 addition & 1 deletion sfy-buoy/sfy-artemis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ ice = [ "sfy/ice" ]
deploy = []
defmt-serial = [ "dep:ufmt", "dep:defmt-serial" ]
host-tests = []
spectrum = [ "sfy/spectrum" ]
spectrum = [ "sfy/spectrum", "sfy/ntn" ]
ntn-test = [ "sfy/ntn-test" ]
46 changes: 46 additions & 0 deletions sfy-buoy/sombie/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cargo-features = [ "per-package-target" ]

[package]
name = "sombie"
version = "0.1.0"
edition = "2024"
authors = [ "Gaute Hope <gauteh@met.no>" ]
resolver = "2"
forced-target = "thumbv7em-none-eabihf"


[dependencies]
heapless = { version = "0.7", features = [ "serde", "ufmt-impl", "defmt-impl" ] }
cortex-m = { version = "0.7", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7"
embedded-hal = "0.2.6"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
cmsis_dsp = { version = "0.1.0", features = [ "micromath" ] }
sfy = { path = "../", default-features = false, features = [ "spectrum", "fir"] }
git-version = "0.3.5"
chrono = { version = "0.4.19", default-features = false }
defmt-serial = { version = "0.8.0", optional = true }
ufmt = { version = "0.1.0", optional = true }
static_cell = "2.0.0"

[dependencies.ambiq-hal]
version = "0.3"
features = ["ambiq-sdk", "sparkfun-redboard-nano", "rt"]
git = "https://github.com/gauteh/ambiq-rs"

[dev-dependencies]


[features]
default = [ "deploy", ]
20Hz = [ "sfy/20Hz" ]
10Hz = [ "sfy/10Hz" ]
storage = [ "sfy/storage" ]
surf = [ "sfy/surf" ]
ice = [ "sfy/ice" ]
deploy = []
defmt-serial = [ "dep:ufmt", "dep:defmt-serial" ]
host-tests = []
ntn-test = [ "sfy/ntn-test" ]
31 changes: 31 additions & 0 deletions sfy-buoy/sombie/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//! This build script copies the `memory.x` file from the crate root into
//! a directory where the linker can always find it at build time.
//! For many projects this is optional, as the linker always searches the
//! project root directory -- wherever `Cargo.toml` is. However, if you
//! are using a workspace or have a more complicated build setup, this
//! build script becomes required. Additionally, by requesting that
//! Cargo re-run the build script whenever `memory.x` is changed,
//! updating `memory.x` ensures a rebuild of the application with the
//! new memory settings.
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::PathBuf;

fn main() {
// Put `memory.x` in our output directory and ensure it's
// on the linker search path.
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
File::create(out.join("memory.x"))
.unwrap()
.write_all(include_bytes!("memory.x"))
.unwrap();
println!("cargo:rustc-link-search={}", out.display());

// By default, Cargo will re-run a build script whenever
// any file in the project changes. By specifying `memory.x`
// here, we ensure the build script is only re-run when
// `memory.x` is changed.
println!("cargo:rerun-if-changed=memory.x");
}
7 changes: 7 additions & 0 deletions sfy-buoy/sombie/memory.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ENTRY(Reset_Handler)
MEMORY
{
FLASH (rx) : ORIGIN = 0x00010000, LENGTH = (0x000F0000 - (0x00010000))
RAM_NVIC (rwx) : ORIGIN = 0x10000000, LENGTH = 0x100
RAM (rwx) : ORIGIN = (0x10000000 + 0x100), LENGTH = (384K - (0x100))
}
6 changes: 6 additions & 0 deletions sfy-buoy/sombie/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SFY+OMB = SOMBIE

This variation of the SFY is designed to replicate the features of the OMB,
except it is using the blues cellular or _iridium_ modem. It should therefore
hopefully be a super-cheap, global, wave buoy giving you spectra and positions
and certain intervals.
7 changes: 7 additions & 0 deletions sfy-buoy/sombie/src/log.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use ambiq_hal::i2c;
use sfy::note::Notecarrier;

/// A reference to the Notecarrier once it is initialized. The idea is that
/// it can be used from reset routines to transfer log messages. In that case the main thread will
/// not be running anyway.
pub static mut NOTE: Option<*mut Notecarrier<i2c::Iom4>> = None;
Loading
Loading