From 811b3138edec23db8fa6d433a701379319cca754 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 9 Jun 2021 19:32:23 -0700 Subject: [PATCH 1/2] Grammar and formatting A couple minor tweaks to the README to (hopefully) make it a little bit clearer and easier to follow. --- README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f7c757386..2152aa727 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The repository contains the Arduino APIs and IDE integration files targeting a g ## Installation -Clone the repository in `$sketchbook/hardware/arduino-git` +### Clone the repository in `$sketchbook/hardware/arduino-git` ```bash mkdir -p $sketchbook/hardware/arduino-git @@ -12,29 +12,40 @@ cd $sketchbook/hardware/arduino-git git clone git@github.com:arduino/ArduinoCore-mbed mbed ``` -Then clone https://github.com/arduino/ArduinoCore-API in a directory at your choice. +### Clone https://github.com/arduino/ArduinoCore-API into a directory of your choice. ```bash git clone git@github.com:arduino/ArduinoCore-API ``` -Remove the symlink to `api` you can find in `$sketchbook/hardware/arduino/mbed/cores/arduino` and replace it with a symlink to `ArduinoCore-API/api` +### Update the `api` symlink -Open Arduino IDE; you should now see three new targets under `MBED boards` label +Remove the symlink to `api` in `$sketchbook/hardware/arduino/mbed/cores/arduino` and replace it with a symlink to `ArduinoCore-API/api`. + +### Test things out + +Open the Arduino IDE. + +You should now see three new targets under the `MBED boards` label. + +*This procedure does not automatically install the required ARM compiler toolchain.* + +If the toolchain is missing, you'll see errors like this when you try to build for an mbed-os enabled board.: -You may also need to install ARM build tools if you see an error like the following when you attempt to build for one of the mbed-os enabled boards. ``` fork/exec /bin/arm-none-eabi-g++: no such file or directory ``` -The missing ARM build tools can be installed by using the `Boards Manager` option in the Arduino IDE to add the `Arduino mbed-enabled Boards` board package. +To install ARM build tools, use the `Boards Manager` option in the Arduino IDE to add the `Arduino mbed-enabled Boards` package. ## Adding an mbed target -Adding a target is a mostly automatic procedure that involves running https://github.com/arduino/ArduinoCore-mbed/blob/master/mbed-os-to-arduino after setting `BOARDNAME` and `ARDUINOCORE` env variables. +Adding a target is a mostly automatic procedure that involves running https://github.com/arduino/ArduinoCore-mbed/blob/master/mbed-os-to-arduino after setting the `BOARDNAME` and `ARDUINOCORE` env variables. Actions marked as TODO must be executed manually. -**Minimum Example**: `./mbed-os-to-arduino -r /home/alex/projects/arduino/cores/mbed-os-h747 PORTENTA_H7_M7:PORTENTA_H7_M7` +**Minimum Example**: ```cd $sketchbook/hardware/arduino-git/mbed +./mbed-os-to-arduino -r /home/alex/projects/arduino/cores/mbed-os-h747 PORTENTA_H7_M7:PORTENTA_H7_M7 +``` ### How to build a debug version of the Arduino mbed libraries * Modify `mbed-os-to-arduino ` From a2ee0df38624ae3123a9323e2902d799259c3499 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 10 Jun 2021 09:35:10 -0700 Subject: [PATCH 2/2] Fix a formatting error. Co-authored-by: per1234 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2152aa727..e37fa0434 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ To install ARM build tools, use the `Boards Manager` option in the Arduino IDE t Adding a target is a mostly automatic procedure that involves running https://github.com/arduino/ArduinoCore-mbed/blob/master/mbed-os-to-arduino after setting the `BOARDNAME` and `ARDUINOCORE` env variables. Actions marked as TODO must be executed manually. -**Minimum Example**: ```cd $sketchbook/hardware/arduino-git/mbed +**Minimum Example**: +``` +cd $sketchbook/hardware/arduino-git/mbed ./mbed-os-to-arduino -r /home/alex/projects/arduino/cores/mbed-os-h747 PORTENTA_H7_M7:PORTENTA_H7_M7 ``` @@ -67,4 +69,3 @@ You can use this core as a standard mbed library; all APIs are under `arduino` n The opposite is working as well; from any sketch you can call mbed APIs by prepending `mbed::` namespace. -