Skip to content

Latest commit

 

History

History
45 lines (44 loc) · 2.38 KB

unwritten.md

File metadata and controls

45 lines (44 loc) · 2.38 KB

Unwritten topics

  • More debugging patterns: breakpoints, watchpoints, bkpt, etc.
  • The .data and .bss sections: static variables, linker script (again) and initialization routine.
  • Guaranteed panic!-free programs with this one weird trick!
  • The Rust allocator interface.
  • Debug prints with ITM (Instrumentation Trace Macrocell)
  • "Apps"
    • Heartbeat LED
    • Read an analog sensor. e.g. just potentiometer, a photoresistor or a CNY70.
    • Read a digital sensor via SPI or I2C. e.g. motion sensor.
    • Data acquisition. e.g. sensor + serial comm
    • Move a servomotor
    • Open loop control system. e.g. serial comm + servo or potentiometer + servo
    • Closed loop control system. e.g. servo + magnetometer
  • Interfacing external devices
    • Buttons and debouncing.
    • Servomotors.
  • Async and concurrency
    • Scheduling strategies: Super loop, cooperative, preemptive.
    • Interrupts: asm!("cpsid i"), asm!("cpsie i"), data races and atomic operations.
    • DMA
  • FPU
  • nm -C --size-sort: binary size profiling
  • nm -C: global vs local text symbol
  • librarify: src/lib.rs + src/bin/*.rs. Uses extern (lib) and no_mangle (bin) symbol. Basically the library says: you (the binary) must give me a symbol with this unmangled name. Downside: types signatures are lost. How to recover them? traits? Related: weak symbols for e.g. exceptions.
  • ARM calling convention:
  • mention that a section can't exceed its region capacity. This is automatically enforced by the linker based on what the linker script says.
  • bluetooth: HC-06. rfcomm bind rfcomm0 $ADDRESS
  • document other flashing methods: ELF -> objcopy -> binary, then directly flash the binary using OpenOCD (without gdb) or st-link.
  • revisit the default exception handler: where did we come from? (inspect stack) which exception is this? (inspect NVIC(?) register).
  • embedding Rust in C frameworks like FreeRTOS or the Photon.