Skip to content

Commit e33559a

Browse files
authored
📝 Update installation & building steps (#8)
1 parent 9cb1f09 commit e33559a

1 file changed

Lines changed: 47 additions & 7 deletions

File tree

README.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,66 @@ instructions.
2121

2222
## 📡 Installing Profiles
2323

24-
Coming soon, see important notice.
24+
> [!INFO]
25+
> Make sure you have installed the default conan profile for your mac OS before
26+
> proceeding.
2527
26-
## 🏗️ Building Demos
28+
Profiles define which platform you mean to build your project against. These
29+
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.
30+
31+
```bash
32+
conan config install -sf conan/profiles/v1 -tf profiles https://github.com/libhal/libhal-mac.git
33+
```
34+
35+
The `mac-hal` profile will be added to your conan `profiles` directory. Now
36+
that you have that installed, you can build demos and libraries.
2737

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

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

3442
```bash
35-
conan build demos -pr macosx
43+
conan build demos -pr mac-hal
3644
```
3745

46+
If you'd like to make a minimum sized binary or a debug binary use the following commands:
47+
48+
```bash
49+
# For minimum sized binaries (optimized for small code size)
50+
conan build demos -pr mac-hal -s build_type=MinSizeRel
51+
```
52+
53+
```bash
54+
# For debug binaries (low optimization)
55+
conan build demos -pr mac-hal -s build_type=Debug
56+
```
57+
58+
We default to `Release` builds when building for Mac OSX.
59+
By default the binaries will be built in the `./demos/build/mac/Release`
60+
directory. There you can find your executables and build artifacts.
61+
For `MinSizeRel` the binaries will be in `./demos/build/mac/MinSizeRel`.
62+
For `Debug` the binaries will be in `./demos/build/mac/Debug`.
63+
3864
## 💾 Executing Programs
3965

4066
To execute the program simply run the following:
4167

68+
For `Release` builds:
69+
70+
```bash
71+
./demos/build/mac/Release/mac_demos_serial
72+
```
73+
74+
For `MinSizeRel` builds:
75+
76+
```bash
77+
./demos/build/mac/MinSizeRel/mac_demos_serial
78+
```
79+
80+
For `Debug` builds:
81+
4282
```bash
43-
./build/.../app
83+
./demos/build/mac/Debug/mac_demos_serial
4484
```
4585

4686
## Contributing

0 commit comments

Comments
 (0)