Skip to content

Grammar and formatting #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,50 @@ 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
cd $sketchbook/hardware/arduino-git
git clone [email protected]: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 [email protected]: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 `
Expand All @@ -56,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.