- install stlink
- arch:
sudo pacman -S stlink - general linux
- install
libusb-dev1.0 - install
cmake - install a C-Compiler (sorry)
git clone https://github.com/texane/stlink.git && cd stlink && make release && cd build/Release && sudo make install
- install
- mac os:
brew install stlink - windows: unzip
stlink-1.3.1-win32.zip
- arch:
- install arm cross compilers
- arch:
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-gdb - debian/ubuntu:
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi - macOS:
brew tap osx-cross/arm && brew install arm-gcc-bin - windows:
- download
GNU ARM Embedded Toolchainfrom https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads - execute to install
- ensure installation path is added to 'PATH' variable (might require a reboot)
- download
- arch:
- install a nightly compiler
rustup update nightly
- dowload the rust source code
- if your rustup does not have the
componentsubcommand:rustup self update rustup component add rust-src --toolchain nightly
- if your rustup does not have the
- install
xargorustup run nightly cargo install xargo- NOTE: do not run this command in the
stm32f7_discoveryfolder, you will get errors about the compiler not finding the standard library
- get the demo code
git clone https://github.com/embed-rs/stm32f7-discovery.git
cd stm32f7_discoveryrustup override set nightlyxargo build- have patience, the first time you run
xargo build, thecorelibrary and various others need to be built. - open another terminal and run
st-util(win:st-util.exeis located instlink-1.3.1-win32\bin, which was unziped for setup) - go back to your first terminal
- run
sh gdb.sh(rungdb.batfor win) - (optional) run
semihosting-enableto enable semihosting support - The code has now been flashed and is ready to run. Type
c(forcontinue) and observe your controller.
cargo doc --open --target x86_64-unknown-linux-gnu