From 444b45ee92d5db048d9c58d0ecd9f0bc5a68b3c3 Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Mon, 10 Feb 2020 09:01:17 +0100 Subject: [PATCH] OSX/Ubuntu updates --- .vscode/launch.json | 5 +++++ Cargo.toml | 2 +- README.md | 15 +++++++++++---- openocd.cfg | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bbbc55a..7bf8330 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,6 +17,7 @@ "executable": "./target/thumbv7em-none-eabihf/debug/app", "configFiles": [ "interface/stlink.cfg", + // "interface/stlink-v2-1.cfg", // deprecated setup script "target/stm32f4x.cfg" ], "postLaunchCommands": [ @@ -39,6 +40,7 @@ "executable": "./target/thumbv7em-none-eabihf/debug/examples/${fileBasenameNoExtension}", "configFiles": [ "interface/stlink.cfg", + // "interface/stlink-v2-1.cfg", // deprecated setup script "target/stm32f4x.cfg" ], "postLaunchCommands": [ @@ -74,6 +76,7 @@ "executable": "./target/thumbv7em-none-eabihf/debug/examples/${fileBasenameNoExtension}", "configFiles": [ "interface/stlink.cfg", + // "interface/stlink-v2-1.cfg", // deprecated setup script "target/stm32f4x.cfg" ], "postLaunchCommands": [ @@ -98,6 +101,7 @@ "executable": "./target/thumbv7em-none-eabihf/release/examples/${fileBasenameNoExtension}", "configFiles": [ "interface/stlink.cfg", + // "interface/stlink-v2-1.cfg", // deprecated setup script "target/stm32f4x.cfg" ], "postLaunchCommands": [ @@ -122,6 +126,7 @@ "executable": "./target/thumbv7em-none-eabihf/release/examples/${fileBasenameNoExtension}", "configFiles": [ "interface/stlink.cfg", + // "interface/stlink-v2-1.cfg", // deprecated setup script "target/stm32f4x.cfg" ], "postLaunchCommands": [ diff --git a/Cargo.toml b/Cargo.toml index d06d621..42d8d98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ nb = "0.1.2" [dependencies.cortex-m] verison = "0.6.2" -features = ["inline-asm"] +# features = ["inline-asm"] # <- currently requires nightly compiler [dependencies.cortex-m-rt] version = "0.6.12" diff --git a/README.md b/README.md index 3940e16..48bd011 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,16 @@ ``` - For programming (flashing) and debugging - - `openocd` debug host, (install using your package manager). If you are under `Ubuntu` you may need to change the `openocd.cfg` to use the deprecated (older) script (`source [find interface/stlink-v2-1.cfg]`). + - `openocd` debug host, (install using your package manager). + + If you are under `Ubuntu` or `ÒSX` you may need to change the `openocd.cfg` and `.vscode/launch.json` to use the deprecated (older) script (`source [find interface/stlink-v2-1.cfg]`, and `"configFiles": [ + "interface/stlink-v2-1.cfg", + ... + ],` respectively). - - `arm-none-eabi` tool-chain (install using your package manager). In the following we refer the `arm-none-eabi-gdb` as just `gdb` for brevity. + - `arm-none-eabi` tool-chain (install using your package manager). In the following we refer the `arm-none-eabi-gdb` as just `gdb` for brevity. + + If using OSX you can download and install the latest official [GNU ARM](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) toolchain for OSX. You need to unpack the toolchain to your computer and make sure the `bin` directory is in your path. Under OSX the path is defined in `~/.bash_profile`, add `export PATH="<INSTALL>/bin/:$PATH"`, where `<INSTALL>` is the path to the GNU tools (`$HOME/Prog/ARM/gcc-arm-none-eabi-9-2019-q4-major` or similar). (This setting will take effect for all new terminals opened.) - `stlink` (optional) tools for erasing and programming ST microcontrollers (install using your package manager). @@ -26,9 +33,9 @@ > cargo install itm ``` -- `vscode` editor/ide and `cortex-debug` plugin. Install `vscode` using your package manager and follow the instructions at [cortex-debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) (optional for an integrated debugging experience) +- `vscode` editor/ide and `cortex-debug` plugin. Install `vscode` using your package manager and follow the instructions at [cortex-debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) (optional for an integrated debugging experience). -- `rust-analyzer` install following instructions at [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) (optional for Rust support in `vscode`) +- `rust-analyzer` install following instructions at [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) (optional for Rust support in `vscode`). You may first need to install `npm` (through you package manager). --- diff --git a/openocd.cfg b/openocd.cfg index 5e1943b..2db424f 100644 --- a/openocd.cfg +++ b/openocd.cfg @@ -1,5 +1,5 @@ source [find interface/stlink.cfg] - +# source [find interface/stlink-v2-1.cfg] # deprecated transport select hla_swd # increase working area to 64KB -- GitLab