Skip to content
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
54 changes: 47 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,66 @@ instructions.

## 📡 Installing Profiles

Coming soon, see important notice.
> [!INFO]
> Make sure you have installed the default conan profile for your mac OS before
> proceeding.

## 🏗️ Building Demos
Profiles define which platform you mean to build your project against. These
profiles are needed by the conan files to determine which files to build for demos and for libraries. In order to build binaries using libhal for the mac OS, run the following command.

```bash
conan config install -sf conan/profiles/v1 -tf profiles https://github.com/libhal/libhal-mac.git
```

The `mac-hal` profile will be added to your conan `profiles` directory. Now
that you have that installed, you can build demos and libraries.

> [!NOTE]
> ON the device that is to run this code, a computer that is the same OS and
> architecture, or inside the provided docker container.
## 🏗️ Building Demos

To build demos, start at the root of the repo and execute the following command:

```bash
conan build demos -pr macosx
conan build demos -pr mac-hal
```

If you'd like to make a minimum sized binary or a debug binary use the following commands:

```bash
# For minimum sized binaries (optimized for small code size)
conan build demos -pr mac-hal -s build_type=MinSizeRel
```

```bash
# For debug binaries (low optimization)
conan build demos -pr mac-hal -s build_type=Debug
```

We default to `Release` builds when building for Mac OSX.
By default the binaries will be built in the `./demos/build/mac/Release`
directory. There you can find your executables and build artifacts.
For `MinSizeRel` the binaries will be in `./demos/build/mac/MinSizeRel`.
For `Debug` the binaries will be in `./demos/build/mac/Debug`.

## 💾 Executing Programs

To execute the program simply run the following:

For `Release` builds:

```bash
./demos/build/mac/Release/mac_demos_serial
```

For `MinSizeRel` builds:

```bash
./demos/build/mac/MinSizeRel/mac_demos_serial
```

For `Debug` builds:

```bash
./build/.../app
./demos/build/mac/Debug/mac_demos_serial
```

## Contributing
Expand Down
Loading