feat: restore Heltec V3, add firmware output, support all common boards
Reverts the removal of heltec_v3 — it's a major board. Xtensa builds use the esp toolchain (+esp via espup); check-all gracefully skips boards whose toolchain isn't installed. Build artifacts now land in firmware/ with readable names like lora-dongle-rak_4631-release.elf instead of being buried in target/. DESIGN.md updated with "support all common boards" principle (#10) and corrected toolchain policy (#11).
This commit is contained in:
6 files changed
+854
-22
No files matched your search
@@ -0,0 +1,48 @@
|
||||
use embassy_time::Delay;
|
||||
|
||||
use lora_phy::iv::GenericSx126xInterfaceVariant;
|
||||
use lora_phy::sx126x::{Sx1262, Sx126x};
|
||||
|
||||
// ── Concrete peripheral types ────────────────────────────────────────
|
||||
|
||||
// TODO: replace these placeholders with real esp-hal peripheral types
|
||||
// SPI2 for SX1262 (SCK=9, MOSI=10, MISO=11, NSS=8)
|
||||
// GPIO for radio control (RST=12, DIO1=14, BUSY=13)
|
||||
// Vext pin (GPIO21) LOW to power OLED
|
||||
// I2C0 for SSD1306 (SDA=17, SCL=18)
|
||||
// USB OTG for CDC-ACM
|
||||
|
||||
type Iv = GenericSx126xInterfaceVariant<(), ()>;
|
||||
type RadioSpiDevice = ();
|
||||
pub type RadioDriver = Sx126x<RadioSpiDevice, Iv, Sx1262>;
|
||||
|
||||
// ── Peripheral bundles ───────────────────────────────────────────────
|
||||
|
||||
pub struct RadioParts {
|
||||
pub driver: RadioDriver,
|
||||
pub delay: Delay,
|
||||
}
|
||||
|
||||
pub struct UsbParts {
|
||||
pub driver: (),
|
||||
}
|
||||
|
||||
pub struct DisplayParts {
|
||||
pub i2c: (),
|
||||
}
|
||||
|
||||
// ── Board init ───────────────────────────────────────────────────────
|
||||
|
||||
pub struct Board;
|
||||
|
||||
impl Board {
|
||||
pub fn init() -> Self {
|
||||
// TODO: call esp_hal::init(esp_hal::Config::default())
|
||||
Self
|
||||
}
|
||||
|
||||
pub fn into_parts(self) -> (RadioParts, UsbParts, Option<DisplayParts>) {
|
||||
// TODO: wire up real peripherals once building with nightly + -Zbuild-std
|
||||
todo!("Heltec V3 peripheral init")
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,8 @@ use crate::channel::{CommandChannel, ResponseChannel, StatusWatch};
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "rak_4631")] {
|
||||
use panic_probe as _;
|
||||
} else if #[cfg(feature = "heltec_v3")] {
|
||||
use esp_backtrace as _;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user