Skip to content

Commit 9a25f64

Browse files
janconasilseva
authored andcommitted
Add emulator build instructions for MacOS
1 parent ec04e77 commit 9a25f64

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

compiling.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ To verify that radio_tool is in PATH, this should not return an error
183183

184184
## MacOS toolchain setup
185185

186-
The MacOS toolchain setup is similar to that for Linux. Currently, neither the Linux emulator or the Zephyr-based tagets can be built on MacOS. The basic tools required to compile OpenRTX from the sources are _git_ and the _meson_ build system. To build the firmware for one of the radio targets, you'll require also the GCC toolchain for the miosix kernel. In this latter case, also _cmake_ and _libusb_ are required for compiling the external tools for flashing the radio.
186+
The MacOS toolchain setup is similar to that for Linux. Currently, the Zephyr-based tagets can't be built on MacOS. The basic tools required to compile OpenRTX from the sources are _git_ and the _meson_ build system. To build the firmware for one of the radio targets, you'll require also the GCC toolchain for the miosix kernel. In this latter case, also _cmake_ and _libusb_ are required for compiling the external tools for flashing the radio.
187187

188188
#### Installing the basic tools
189189

@@ -195,6 +195,17 @@ You will already have Git and the Xcode tools from the Homebrew installation pro
195195
brew install pkg-config meson
196196
```
197197

198+
#### Additional requirements only for the Emulator
199+
200+
When compiling the Linux emulator version, the following additional packages are required:
201+
* SDL2 development package
202+
* Codec2 development package
203+
* `readline` package
204+
205+
```
206+
brew install sdl2 codec2 readline
207+
```
208+
198209
#### Tools required for firmware images
199210

200211
To build the firmware images ready to be flashed on the radios, the miosix kernel GCC toolchain is required, as well as some additional tools used to encrypt and flash the binary files obtained at the end of the compilation process.
@@ -273,7 +284,7 @@ Where N is the number of cores that you want to allocate to the build process.
273284

274285
---
275286

276-
## Compiling for Linux
287+
## Compiling the Emulator for Linux
277288

278289
The software can be compiled with:
279290

@@ -282,6 +293,13 @@ meson setup build_linux
282293
meson compile -C build_linux openrtx_linux
283294
```
284295

296+
## Compiling the Emulator for MacOS
297+
298+
```
299+
MACOSX_DEPLOYMENT_TARGET=11 meson setup build_darwin
300+
MACOSX_DEPLOYMENT_TARGET=11 meson compile -C build_darwin openrtx_linux
301+
```
302+
285303
**NOTE: if you are using a version of Meson older than v0.55.0, the above command will fail. To compile, use the following command:**
286304

287305
```
@@ -359,3 +377,7 @@ Once you have flashed MCUBOOT on your radio and obtained an OpenRTX image, you c
359377
## Running on Linux
360378

361379
To run OpenRTX on Linux you simply have to execute the binary `build_linux/openrtx_linux`, which was compiled with the instructions above.
380+
381+
## Running on MacOS
382+
383+
To run OpenRTX on MacOS you simply have to execute the binary `build_darwin/openrtx_linux`, which was compiled with the instructions above.

0 commit comments

Comments
 (0)