diff --git a/Installation.md b/Installation.md index 2c19c4a13aded746bd0f8883fe439ba6bfcdc392..62cf85dd401d59ac8b365401905b41879f305058 100644 --- a/Installation.md +++ b/Installation.md @@ -2,19 +2,35 @@ XP-el Mikroprocessorprogrammeringskurs (MPPK) 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 -# Windows -## Native +### GDB -### Rust +### OpenOCD + +# Windows -Go to https://rustup.rs/ and follow the instructions. +## Native ### GDB @@ -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. Extract the package somewhere where it is easy to find (i.e C:). + +/// TODO /// + ## 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. @@ -66,6 +85,20 @@ Continue in the terminal and write: ### GDB +/// TODO /// + ### 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 diff --git a/README.md b/README.md index ed4def9add8006b39d71e9d36cc193a0ea7251fe..3de243f09790b2af16ea8766d793ee2ea5b6cf35 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ Embedded systems are everywhere. Use-cases ranges from heavy industry to tiny sensors in your everyday life. + +## Requirements +1. Laptop +2. [Installation](../Installation.md) + # Overview  @@ -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 [projects](https://github.com/torvalds/linux). - ### Rust -Installation - -https://rustup.rs/ - #### Cargo The package manager for Rust @@ -115,12 +115,6 @@ For more information: https://doc.rust-lang.org/cargo/ Provides cargo subcommands which invokes various LLVM tools. -##### Installation -``` -cargo install cargo-binutils -rustup component add llvm-tools-preview -``` - ##### Usage See [cargo-binutils repo](https://github.com/rust-embedded/cargo-binutils) diff --git a/excercises/01_getting_started.md b/excercises/01_getting_started.md new file mode 100644 index 0000000000000000000000000000000000000000..9160793c42eea1043417e3a3cd65bead1d5d4c2b --- /dev/null +++ b/excercises/01_getting_started.md @@ -0,0 +1,3 @@ +# Getting started with embedded programming + +## Connect everything \ No newline at end of file diff --git a/excercises/02_blinky.md b/excercises/02_blinky.md new file mode 100644 index 0000000000000000000000000000000000000000..6839870a7891d620012fd7c7e748e1ac050a7980 --- /dev/null +++ b/excercises/02_blinky.md @@ -0,0 +1,3 @@ +# Blinky + +## Flashi flashi \ No newline at end of file diff --git a/excercises/03_serial.md b/excercises/03_serial.md new file mode 100644 index 0000000000000000000000000000000000000000..d267ae8931e6d085801cbb0d90f17cffc7b8f64e --- /dev/null +++ b/excercises/03_serial.md @@ -0,0 +1,5 @@ +# Serial communication + +## serial.write("Hello world") + +### "Hello \x14world" \ No newline at end of file