Skip to content

Instantly share code, notes, and snippets.

@piccaso
Last active January 10, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piccaso/eb111cda6ae209377d9153cbf20d7c76 to your computer and use it in GitHub Desktop.
Save piccaso/eb111cda6ae209377d9153cbf20d7c76 to your computer and use it in GitHub Desktop.
# todo: see if --device can be used
docker run --rm -it --privileged -v $PWD:/pwd -w /pwd ubuntu:19.10
docker run --rm -it --privileged -v $PWD:/pwd -w /pwd debian:10
# make, curl, git, ...
# stlink-tools (https://github.com/texane/stlink#installation)
# gcc-arm-toolchain (https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
apt-get update && apt-get install -y make git-core stlink-tools gcc-arm-none-eabi
# FreeJoy
git clone https://github.com/vostrenkov/FreeJoy
cd FreeJoy
# Build
make
# flash with ST-Link v2 debugger
st-flash --format ihex write FreeJoy.hex
# flash USB-UART converter
stm32flash -b 115200 -w build/FreeJoy.bin -v /dev/ttyUSB0
##-- old stuff
# arm-toolchain - https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
apt-get install tar bzip2 curl
curl -L 'https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2' | tar -xvj
export PATH="$PATH:$PWD/gcc-arm-none-eabi-9-2019-q4-major/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment