1489: stm32/ipcc: make IPCC methods static r=xoviat a=OueslatiGhaith 1500: stm32/tests: disable sdmmc test for now r=xoviat a=xoviat Co-authored-by: goueslati <ghaith.oueslati@habemus.com> Co-authored-by: Ghaith Oueslati <73850124+OueslatiGhaith@users.noreply.github.com> Co-authored-by: xoviat <xoviat@users.noreply.github.com>
This commit is contained in:
@ -17,4 +17,4 @@ rustflags = [
|
||||
target = "thumbv7m-none-eabi"
|
||||
|
||||
[env]
|
||||
DEFMT_LOG = "trace"
|
||||
DEFMT_LOG = "trace"
|
@ -7,12 +7,12 @@ autobins = false
|
||||
|
||||
[features]
|
||||
stm32f103c8 = ["embassy-stm32/stm32f103c8", "not-gpdma"] # Blue Pill
|
||||
stm32f429zi = ["embassy-stm32/stm32f429zi", "sdmmc", "chrono", "not-gpdma"] # Nucleo
|
||||
stm32f429zi = ["embassy-stm32/stm32f429zi", "chrono", "not-gpdma"] # Nucleo "sdmmc"
|
||||
stm32g071rb = ["embassy-stm32/stm32g071rb", "not-gpdma"] # Nucleo
|
||||
stm32c031c6 = ["embassy-stm32/stm32c031c6", "not-gpdma"] # Nucleo
|
||||
stm32g491re = ["embassy-stm32/stm32g491re", "not-gpdma"] # Nucleo
|
||||
stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "not-gpdma"] # Nucleo
|
||||
stm32wb55rg = ["embassy-stm32/stm32wb55rg", "not-gpdma"] # Nucleo
|
||||
stm32wb55rg = ["embassy-stm32/stm32wb55rg", "not-gpdma", "ble"] # Nucleo
|
||||
stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo
|
||||
stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
|
||||
|
||||
@ -45,8 +45,8 @@ chrono = { version = "^0.4", default-features = false, optional = true}
|
||||
# BEGIN TESTS
|
||||
# Generated by gen_test.py. DO NOT EDIT.
|
||||
[[bin]]
|
||||
name = "ble"
|
||||
path = "src/bin/ble.rs"
|
||||
name = "tl_mbox"
|
||||
path = "src/bin/tl_mbox.rs"
|
||||
required-features = [ "ble",]
|
||||
|
||||
[[bin]]
|
||||
|
@ -9,17 +9,22 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
println!("cargo:rustc-link-arg-bins=--nmagic");
|
||||
|
||||
// too little RAM to run from RAM.
|
||||
if cfg!(any(feature = "stm32f103c8", feature = "stm32c031c6")) {
|
||||
if cfg!(any(
|
||||
feature = "stm32f103c8",
|
||||
feature = "stm32c031c6",
|
||||
feature = "stm32wb55rg"
|
||||
)) {
|
||||
println!("cargo:rustc-link-arg-bins=-Tlink.x");
|
||||
println!("cargo:rerun-if-changed=link.x");
|
||||
} else if cfg!(feature = "stm32wb55rg") {
|
||||
println!("cargo:rustc-link-arg-bins=-Tlink.x");
|
||||
fs::write(out.join("memory.x"), include_bytes!("memory_ble.x")).unwrap();
|
||||
} else {
|
||||
println!("cargo:rustc-link-arg-bins=-Tlink_ram.x");
|
||||
println!("cargo:rerun-if-changed=link_ram.x");
|
||||
}
|
||||
|
||||
if cfg!(feature = "stm32wb55rg") {
|
||||
println!("cargo:rustc-link-arg-bins=-Ttl_mbox.x");
|
||||
}
|
||||
|
||||
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
|
||||
|
||||
Ok(())
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
Memory size for STM32WB55xG with 512K FLASH
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
|
||||
RAM (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8
|
||||
RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
|
||||
}
|
||||
|
||||
/* Place stack at the end of SRAM1 */
|
||||
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
|
||||
|
||||
/*
|
||||
* Scatter the mailbox interface memory sections in shared memory
|
||||
*/
|
||||
SECTIONS {
|
||||
TL_REF_TABLE (NOLOAD) : { *(TL_REF_TABLE) } >RAM_SHARED
|
||||
|
||||
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
|
||||
MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED
|
||||
}
|
@ -7,24 +7,23 @@
|
||||
#[path = "../example_common.rs"]
|
||||
mod example_common;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::interrupt;
|
||||
use embassy_stm32::ipcc::{Config, Ipcc};
|
||||
use embassy_stm32::tl_mbox::TlMbox;
|
||||
use embassy_stm32::tl_mbox::{Config, TlMbox};
|
||||
use embassy_stm32::{bind_interrupts, tl_mbox};
|
||||
use embassy_time::{Duration, Timer};
|
||||
use example_common::*;
|
||||
|
||||
bind_interrupts!(struct Irqs{
|
||||
IPCC_C1_RX => tl_mbox::ReceiveInterruptHandler;
|
||||
IPCC_C1_TX => tl_mbox::TransmitInterruptHandler;
|
||||
});
|
||||
|
||||
#[embassy_executor::main]
|
||||
async fn main(_spawner: Spawner) {
|
||||
let p = embassy_stm32::init(config());
|
||||
info!("Hello World!");
|
||||
|
||||
let config = Config::default();
|
||||
let mut ipcc = Ipcc::new(p.IPCC, config);
|
||||
|
||||
let rx_irq = interrupt::take!(IPCC_C1_RX);
|
||||
let tx_irq = interrupt::take!(IPCC_C1_TX);
|
||||
|
||||
let mbox = TlMbox::init(&mut ipcc, rx_irq, tx_irq);
|
||||
let mbox = TlMbox::new(p.IPCC, Irqs, config);
|
||||
|
||||
loop {
|
||||
let wireless_fw_info = mbox.wireless_fw_info();
|
Reference in New Issue
Block a user