This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==30037== Memcheck, a memory error detector | |
==30037== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
==30037== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info | |
==30037== Command: ./build/zephyr/zephyr.exe --bt-dev=hci0 | |
==30037== | |
WARNING: Using a test - not safe - entropy source | |
[00:00:00.000,000] <inf> flash_native_posix: Device flash_ctrl initialized | |
***** Booting Zephyr OS build zephyr-v2.0.0-1-gca3eb0eb31d1 ***** | |
Initializing... | |
[00:00:00.870,000] <inf> bt_hci_core: Identity: 60:57:18:3e:41:61 (public) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the required nightly toolchain | |
rustup install nightly | |
rustup component add rust-src --toolchain nightly | |
rustup target add riscv32imc-unknown-none-elf | |
# Install tooling to check the size of our binary | |
rustup component add llvm-tools-preview | |
# Install helper packages for a smooth development workflow | |
cargo install cargo-generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize wifi configuration as a client configuration | |
let mut wifi = EspWifi::new( | |
Arc::new(EspNetifStack::new().unwrap()), | |
Arc::new(EspSysLoopStack::new().unwrap()), | |
Arc::new(EspDefaultNvs::new().unwrap()), | |
).unwrap(); | |
wifi.set_configuration( | |
&Configuration::Client(ClientConfiguration { | |
ssid: "<SSID>".into(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mqtt_conf = MqttClientConfiguration { | |
client_id: Some("my-esp32"), | |
..Default::default() | |
}; | |
let (mut mqtt_client, mut connection) = EspMqttClient::new_with_conn( | |
"mqtt://broker.emqx.io", | |
&mqtt_conf | |
).unwrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spawn thread to listen to incoming events on the mqtt connection | |
thread::spawn(move || { | |
println!("MQTT Listening for messages"); | |
while let Some(msg) = connection.next() { | |
match msg { | |
Err(e) => println!("MQTT Message ERROR: {}", e), | |
Ok(event) => { | |
println!("MQTT Event: {:?}", event); | |
// Wait for a received event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./src/blackmagic -tv 1 | |
Black Magic Debug App v1.8.0-1139-g97b5c115-dirty | |
for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, JLink and libftdi/MPSSE | |
Using 1d50:6018 98B72495 Black Magic Debug | |
Black Magic Probe v1.8.0-1139-g97b5c115-dirty | |
Running in Test Mode | |
Target voltage: 1.8V Volt | |
Speed set to 3.2727 MHz for SWD | |
scan_multidrop: true | |
DP DPIDR 0x6ba02477 (v2 rev0) designer 0x43b partno 0xba |