Currently the ITM is broken. This is my current setup.
- VSCode with Cortex Debug plugin
- STM32H743
Both .cfg files are put in the project folder so OpenOCD can find them.
| use std::marker::PhantomData; | |
| // -------------------- HARDWARE INTERFACE -------------------- | |
| pub trait Interface { | |
| fn enable_cs(&mut self); | |
| fn disable_cs(&mut self); | |
| fn transfer(&mut self, value: u8) -> u8; | |
| } | |
| // -------------------- LOW LEVEL DEVICE INTERFACE -------------------- |
| pub struct LocalTimer { | |
| local_timer: TIM5, | |
| overflows: u32, | |
| next_compare_value: Option<u64>, | |
| } | |
| impl LocalTimer { | |
| const CLOCK_SPEED: u32 = 240_000_000; | |
| const CLOCK_DIVIDER: u16 = 1; | |
| const TIMER_SPEED: u32 = Self::CLOCK_SPEED / Self::CLOCK_DIVIDER as u32; |
| DEBUG probe_rs::architecture::arm::ap > Writing register TAR, value=TAR { address: e000201c } | |
| DEBUG probe_rs::probe::cmsisdap > Adding command to batch: Write(port=AccessPort, addr=4, data=0xe000201c | |
| DEBUG probe_rs::architecture::arm::ap > Reading register DRW | |
| DEBUG probe_rs::probe::cmsisdap > Adding command to batch: Read(port=AccessPort, addr=12) | |
| DEBUG probe_rs::probe::cmsisdap > 2 items in batch | |
| DEBUG probe_rs::probe::cmsisdap > Attempting batch of 2 items | |
| TRACE probe_rs::probe::cmsisdap::commands > Transmit buffer: [00, 05, 00, 02, 05, 1C, 20, 00, E0, 0F]... | |
| TRACE probe_rs::probe::cmsisdap::commands > Receive buffer: [05, 02, 01, FE, FF, FF, FF]... | |
| DEBUG probe_rs::probe::cmsisdap > 2 of batch of 2 items suceeded | |
| TRACE probe_rs::p |
| Running `target\debug\probe-rs-cli.exe download --chip nrf9160 ..\TG\dis-workspace\artifacts\bootloader\dis-bootloader-feather.elf` | |
| DEBUG probe_rs::config::registry > Searching registry for chip with name nrf9160 | |
| DEBUG probe_rs::config::registry > Partial match for chip name: nRF9160_xxAA | |
| WARN probe_rs::config::registry > Found chip nRF9160_xxAA which matches given partial name nrf9160. Consider specifying its full name. | |
| WARN probe_rs::config::registry > Matching nrf9160 based on wildcard. Consider specifying the chip as nRF9160_xxAA instead. | |
| WARN probe_rs::config::target > Using custom sequence for nRF9160 | |
| DEBUG probe_rs::probe::cmsisdap::tools > Searching for CMSIS-DAP probes using libusb | |
| DEBUG probe_rs::probe::cmsisdap::tools > Found 0 CMSIS-DAP probes using libusb, searching HID | |
| DEBUG probe_rs::probe::cmsisdap::tools > Found 0 CMSIS-DAP probes total | |
| DEBUG jaylink > libusb 1.0.26.11724 |
| // main.cpp in a Console App project. | |
| #include <stdio.h> | |
| #include <winsock2.h> | |
| #include <iphlpapi.h> | |
| #pragma comment(lib, "Iphlpapi") | |
| BOOL | |
| IsPTPv2HardwareTimestampingSupportedForIPv4(PINTERFACE_TIMESTAMP_CAPABILITIES timestampCapabilities) | |
| { |
| #include "nrf_socket.h" | |
| #include "nrf_errno.h" | |
| #include "nrf_modem_os.h" | |
| #include "nrf_modem_at.h" | |
| #include "nrf_modem_gnss.h" | |
| #include "nrf_modem.h" | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdarg.h> | |
| #include <stdatomic.h> |
| #!/usr/bin/env cargo | |
| --- | |
| [package] | |
| edition = "2024" | |
| [dependencies] | |
| device-driver = { path="../../../device-driver", default-features=false } | |
| --- | |
| #![deny(warnings)] | |
| fn main() {} |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| /* if you compile this source to ./a.out, | |
| * what is the result of "echo filfail | ./a.out" ? */ | |
| struct { | |
| char name[7]; | |
| bool is_restricted; |