Skip to content

Commit

Permalink
quickstart: adjust to macOS
Browse files Browse the repository at this point in the history
JIRA: CI-264
  • Loading branch information
mateusz-bloch committed Nov 22, 2023
1 parent 183729f commit 3485c52
Show file tree
Hide file tree
Showing 13 changed files with 259 additions and 30 deletions.
Binary file added quickstart/_images/imxrt106x-ls-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/imxrt106x-ls-mac2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/imxrt117x-ls-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/imxrt117x-ls-mac2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/stm32l4x6-ls-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/stm32l4x6-ls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/zynq7000-ls-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/zynq7000-ls2-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions quickstart/armv7a9-zynq7000-qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,61 @@ Firstly, you need to have the docker installed.

</details>

<details>
<summary>How to get docker (macOS)</summary>

You can find the up-to-date instructions on <https://docs.docker.com/desktop/install/mac-install/>

To make this process simpler below is an example of installation for Mac with the Intel chip:

Download the installer:

```bash
curl -o Docker.dmg "https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&amp;utm_medium=webreferral&amp;utm_campaign=docs-driven-download-mac-amd64"
```

Run the following commands to install Docker:

```bash
sudo hdiutil attach Docker.dmg && \
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install && \
sudo hdiutil detach /Volumes/Docker
```

Then add the path to `docker` binaries to the `PATH` environment variable:

```bash
export PATH="/Applications/Docker.app/Contents/Resources/bin:$PATH"
```

It's recommended to place it in `.zshrc` startup script to export it every time during startup:
```bash
echo 'export PATH=/Applications/Docker.app/Contents/Resources/bin:$PATH' >> $HOME/.zshrc
```
- Check if Docker is properly installed by checking its version:
``` bash
docker --version
```
- Check if running docker images without sudo works properly:
``` bash
docker run hello-world
```
*If you see the following error: `ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.`
you can try to install `colima` and check once again:
```bash
brew install colima && \
colima start
```
</details>
Now, with docker installed you can run Phoenix-RTOS using the following command:
```bash
Expand Down
53 changes: 47 additions & 6 deletions quickstart/armv7a9-zynq7000-zedboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,29 @@ The onboard UART-USB converter is used here.

- Now you should verify, what USB device on your host-pc is connected with the `UART` (console). To check that run:

- On Ubuntu:

```bash
ls -l /dev/serial/by-id
```

<img src="_images/zynq7000-ls.png" width="700px">

- On macOS:

```bash
ls -l /dev/tty.*
```

<img src="_images/zynq7000-ls-mac.png" width="700px">

If your output is like in the screenshot above, the console (`UART` in the evaluation board) is on the `ACM0` port.

- When the board is connected to your host-pc,
open serial port in terminal using picocom and type the console port (in this case ACM0)

```bash
picocom -b 115200 --imap lfcrlf /dev/ttyACM0
picocom -b 115200 --imap lfcrlf /dev/tty[port]
```

<details>
Expand All @@ -84,6 +94,17 @@ The onboard UART-USB converter is used here.
</details>
</br>

<details>
<summary>How to get picocom (macOS)</summary>

```bash
brew update &&\
brew install picocom
```

</details>
</br>

You can leave the terminal with the serial port open, and follow the next steps.

## Flashing the Phoenix-RTOS system image
Expand Down Expand Up @@ -140,21 +161,31 @@ Please wait until erasing is finished.
To flash the disk image, first, you need to verify on which port plo USB device has appeared.
You can check that using `ls` as follow:
```plaintext
- On Ubuntu:
```bash
ls -l /dev/serial/by-id
```
<img src="_images/zynq7000-ls-2.png" width="700px">
- On macOS:
```bash
ls -l /dev/tty.*
```
<img src="_images/zynq7000-ls2-mac.png" width="700px">
To share disk image to the bootloader, `phoenixd` has to be launched with the following arguments
(choose suitable ttyACMx device, in this case, ttyACM1):
```plaintext
```bash
cd _boot/armv7a9-zynq7000-zedboard
```
```plaintext
sudo ./phoenixd -p /dev/ttyACM1 -b 115200 -s .
```bash
sudo ./phoenixd -p /dev/tty[port] -b 115200 -s .
```
<img src="_images/zynq7000-phoenixd.png" width="700px">
Expand Down Expand Up @@ -186,16 +217,26 @@ To run it you should follow the steps below:
- Check which port the console appeared on:
- On Ubuntu:
```bash
ls -l /dev/serial/by-id/
```
<img src="_images/zynq7000-ls-3.png" width="700px">
- On macOS:
```bash
ls -l /dev/tty.*
```
<img src="_images/zynq7000-ls-mac.png" width="700px">
- connect to that port:
```bash
picocom -b 115200 --imap lfcrlf /dev/ttyACM0
picocom -b 115200 --imap lfcrlf /dev/tty[port]
```
- restart the chip using the `PS-RST` button to print initialization logs:
Expand Down
82 changes: 73 additions & 9 deletions quickstart/armv7m4-stm32l4x6-nucleo.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,84 @@ To communicate with the board you will need to use a UART-USB converter, like `P

<img src="_images/stm32l4x6-connections.png" width="400px">

- Now you should verify, what USB device on your host-pc is connected with the `UART` (console). To check that run:

- On Ubuntu:

```bash
ls -l /dev/serial/by-id
```

<img src="_images/stm32l4x6-ls.png" width="700px">

- On macOS:

```bash
ls -l /dev/tty.*
```

<img src="_images/stm32l4x6-ls-macos.png" width="700px">

- Open serial port in terminal using picocom

```bash
picocom -b 115200 --imap lfcrlf /dev/ttyUSB0
picocom -b 115200 --imap lfcrlf /dev/tty[port]
```

<details>
<summary>How to get picocom (Ubuntu 20.04)</summary>
<summary>How to get picocom and run it without privileges (Ubuntu)</summary>

```bash
sudo apt-get update && \
sudo apt-get install picocom
```

To use picocom without sudo privileges run this command and then restart:

```bash
sudo usermod -a -G tty <yourname>
```

</details>

<details>
<summary>How to get picocom (macOS)</summary>

```bash
brew update &&\
brew install picocom
```

</details>
</br>

You can leave the terminal with the serial port open, and follow the next steps.

## Flashing the Phoenix-RTOS system image

To flash the image to the board you will need `openocd` in version 0.11. When installing openocd using `apt-get` version
can be out of date (0.10). You can check it using
To flash the image to the board you will need `openocd` in version 0.11 or 0.12. You can check it using

```bash
openocd -v
```

<details>
<summary>How to get openocd in version 0.11 (Ubuntu 20.04)</summary>
<summary>How to get openocd in version 0.11 (Ubuntu 22.04)</summary>

To install from the default repositoriy:

- use `apt-get`

```bash
sudo apt-get install openocd
```

- check if the version is correct

```bash
openocd -v
```

To install manually:

- download `openocd-0.11.0-rc2` from [here](https://launchpad.net/ubuntu/+source/openocd)
- enter the downloaded directory
Expand All @@ -84,15 +132,31 @@ openocd -v

- check if the version is correct

```bash
```bash
openocd -v
```

</br>
<img src="_images/openocd-version.png" width="700px">
</br>
</details>

<details>
<summary>How to get openocd (macOS) </summary>

- install openocd

```bash
brew update &&\
brew install open-ocd
```

- check if the version is correct

```bash
openocd -v
```

</details>
</br>

If you have openocd, next you can use the following script:

Expand Down
Loading

0 comments on commit 3485c52

Please sign in to comment.