Skip to content
Snippets Groups Projects
Commit fed33ddd authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Added information about debuggers

parent 164bf33c
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ Embedded systems are everywhere.
Use-cases ranges from heavy industry to tiny sensors in your everyday life.
# Overview
![alt text](images/workflow_chart.png "Flowchart")
![Embedded workflow](images/workflow_chart.png "Flowchart")
# Hardware
......@@ -24,13 +24,21 @@ For more information: https://en.wikipedia.org/wiki/ARM_architecture
A typical way to access and interface with the hardware connected to your microcontroller is by accessing various registers, which is memory regions mapped to some hardware.
# Software
In order to instruct the hardware some sort of software is required.
Software is the instructions for the ARM-processor, telling it which registers and what memory to modify.
## Compiler
## Toolchain
"Toolchain" refers to the collection of hardware and/or software which makes it possible to develop for some specific platform.
The **compiler**, **linker** and some **hardware-interface** are typical tools found in a toolchain.
### Compiler
Two of the main open-source compiler projects:
......@@ -40,7 +48,46 @@ Two of the main open-source compiler projects:
In this course LLVM will be used to turn our source code, written in Rust,
into ready to run ARM instructions.
## Toolchain
### Linker
The job of the linker is to turn often many output object files of the compiler and combine them into an application.
* LD The GNU linker
* LLD The LLVM project linker
### Bare-metal programming via hardware interfaces
#### GDB / LLDB Debugger
When developing software it is very nice to have control over the execution and being able to inspect both hardware and software state.
The debuggers provides an interface for doing exactly that.
#### OpenOCD
The Open On-Chip Debugger
Quoting its [documentation](http://openocd.org/doc-release/pdf/openocd.pdf):
"The Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system program-ming and boundary-scan testing for embedded target devices."
#### ST-link
STMicroelectronics provides an in-circuit debugger and programmer for the STM8 and STM32 microcontrollers.
A nice feature of the STM Nucleo development boards is that the programmer is included as part of the device.
But it can also program other microcontrollers via pin headers.
#### Blackmagic probe
An open source hardware debugger supporting JTAG and SWD.
Vendor agnostic
[github page](https://github.com/blacksphere/blackmagic/wiki)
### Git
......@@ -50,16 +97,13 @@ It allows for convenient collaboration and handles everything from small one-fil
[projects](https://github.com/torvalds/linux).
### GDB / LLDB
## Rust
### Rust
Installation
https://rustup.rs/
### Cargo
#### Cargo
The package manager for Rust
......@@ -67,22 +111,16 @@ Taking care of dependencies, compilation and many other things.
For more information: https://doc.rust-lang.org/cargo/
### Cargo-binutils
#### Cargo-binutils
#### Installation
Provides cargo subcommands which invokes various LLVM tools.
##### Installation
```
cargo install cargo-binutils
rustup component add llvm-tools-preview
```
C
# Bare-metal programming
## OpenOCD
## ST-link
## Blackmagic probe
##### Usage
## GDB / LLDB Debugger
See [cargo-binutils repo](https://github.com/rust-embedded/cargo-binutils)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment