Skip to content
Snippets Groups Projects
Commit 447194aa authored by Joakim Lundberg's avatar Joakim Lundberg
Browse files

Added excercise folder, moved installation info, added some info about editor

parent fed33ddd
Branches
No related tags found
No related merge requests found
...@@ -2,19 +2,35 @@ XP-el Mikroprocessorprogrammeringskurs (MPPK) ...@@ -2,19 +2,35 @@ XP-el Mikroprocessorprogrammeringskurs (MPPK)
Installation & Configuartion Installation & Configuartion
============================================= =============================================
# Introduction # General
# Overview ## Rust
Goto https://rustup.rs/ and follow the instructions.
### Cargo tools
```
cargo install cargo-binutils
rustup component add llvm-tools-preview
```
## Editor
There is no requierment on what editor you should use, but if you are undecided VS code offers quite a few features, is free and highly customizable. It also feature quite a lot of extensions, for an example, the Rust core group maintain an extansion that is called ```Rust (rls)``` where you get all kinds of language specific help such as code completion, Intellisense, refactoring, reformatting, errors, snippets.
### VS Code
Goto https://code.visualstudio.com/ and follow the instructions. When installed, goto the extensions tab and install ```Rust (rls)``` and ```Better TOML```.
# Linux # Linux
# Windows
## Native ### GDB
### Rust ### OpenOCD
Go to https://rustup.rs/ and follow the instructions. # Windows
## Native
### GDB ### GDB
...@@ -40,6 +56,9 @@ If you now type ```gdb`` you should be promted with a text saying something like ...@@ -40,6 +56,9 @@ If you now type ```gdb`` you should be promted with a text saying something like
Go to http://gnutoolchains.com/arm-eabi/openocd/ and download the latest OpenOCD package. Go to http://gnutoolchains.com/arm-eabi/openocd/ and download the latest OpenOCD package.
Extract the package somewhere where it is easy to find (i.e C:). Extract the package somewhere where it is easy to find (i.e C:).
/// TODO ///
## Windows Subsystem for Linux (WSL) - Windows 10 ONLY ## Windows Subsystem for Linux (WSL) - Windows 10 ONLY
To install WSL check out: https://docs.microsoft.com/en-us/windows/wsl/install-win10. We recommend the Ubuntu distro. To install WSL check out: https://docs.microsoft.com/en-us/windows/wsl/install-win10. We recommend the Ubuntu distro.
...@@ -66,6 +85,20 @@ Continue in the terminal and write: ...@@ -66,6 +85,20 @@ Continue in the terminal and write:
### GDB ### GDB
/// TODO ///
### OpenOCD ### OpenOCD
Is the same as for native Windows as OpenOCD doesn't work under WSL Is the same as for native Windows as OpenOCD doesn't (currently) work under WSL.
### Quality of life
#### Shortcuts
To be able to quickly get up and running I usually create a shortcut on the desktop with all flags I need for a certain project and with the configurations that i need. For example if I have a project that uses OpenOCD, the STLink programmer and the target MCU is a STM32f4xx, I create a shortcut with the target:
```C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe .\openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scriptstarget/stm32f4x.cfg```
and make it start in the openocd/bin folder i.e ```C:\OpenOCD\bin```. And if you whant to be really fancy then under layout you can change where the window should spawn as well as how it should look like.
You can even make it spawn a WSL terminal to your liking, for example if you have the target set as ```C:\Windows\System32\bash.exe -c "tmux new-session \; split-window -h \; attach"``` and to start in the folder where your rust projects are located. Then you will have a bash terminal in your project folder under WSL that starts up with tmux creating two panes spliting the terminal in two.
\ No newline at end of file
...@@ -7,6 +7,11 @@ Embedded systems are everywhere. ...@@ -7,6 +7,11 @@ Embedded systems are everywhere.
Use-cases ranges from heavy industry to tiny sensors in your everyday life. Use-cases ranges from heavy industry to tiny sensors in your everyday life.
## Requirements
1. Laptop
2. [Installation](../Installation.md)
# Overview # Overview
![Embedded workflow](images/workflow_chart.png "Flowchart") ![Embedded workflow](images/workflow_chart.png "Flowchart")
...@@ -96,13 +101,8 @@ Git is a distributed revision control system, most likely most of you have heard ...@@ -96,13 +101,8 @@ Git is a distributed revision control system, most likely most of you have heard
It allows for convenient collaboration and handles everything from small one-file projects to massive It allows for convenient collaboration and handles everything from small one-file projects to massive
[projects](https://github.com/torvalds/linux). [projects](https://github.com/torvalds/linux).
### Rust ### Rust
Installation
https://rustup.rs/
#### Cargo #### Cargo
The package manager for Rust The package manager for Rust
...@@ -115,12 +115,6 @@ For more information: https://doc.rust-lang.org/cargo/ ...@@ -115,12 +115,6 @@ For more information: https://doc.rust-lang.org/cargo/
Provides cargo subcommands which invokes various LLVM tools. Provides cargo subcommands which invokes various LLVM tools.
##### Installation
```
cargo install cargo-binutils
rustup component add llvm-tools-preview
```
##### Usage ##### Usage
See [cargo-binutils repo](https://github.com/rust-embedded/cargo-binutils) See [cargo-binutils repo](https://github.com/rust-embedded/cargo-binutils)
# Getting started with embedded programming
## Connect everything
\ No newline at end of file
# Blinky
## Flashi flashi
\ No newline at end of file
# Serial communication
## serial.write("Hello world")
### "Hello \x14world"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment