Skip to content

Commit

Permalink
📝 Explain how to build apps/demos
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce committed Mar 28, 2024
1 parent 0b8683e commit 0017d8b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
15 changes: 0 additions & 15 deletions mkdocs/contributor_guide/vscode_setup.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
- [🗃️ Organization](contributor_guide/organization.md)
- [🎨 Style Guide](contributor_guide/style.md)
- [🔹 Library Development Guide](contributor_guide/library_guides.md)
- [💻 VSCode Setup](contributor_guide/vscode_setup.md)
- [⬆️ Upgrade Device Library to 3.x.y](contributor_guide/upgrade_to_libhal_3_device_library.md)
- [🏗️ Architectural Design Decisions](contributor_guide/architecture.md)
- 📊 Project Information
Expand Down
15 changes: 14 additions & 1 deletion mkdocs/user_guide/setup_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ the following benefits:

## Enabling `clangd`

### For a libhal project
### For a libhal library projects

If you are contributing to libhal project/repo, then those libraries and demos
will already be using `libhal-cmake-util/[^4.0.5]` which will automatically enable the
Expand All @@ -52,6 +52,13 @@ conan build .

And it will be generated.

If you are attempting to do with is a demo or an application you will need to
specify the platform and compiler like usual.

```bash
conan build . -pr lpc4078 -pr arm-gcc-12.3
```

### For your own project

You can either add a `self.requires("libhal-cmake-util/[^4.0.5]")` to your
Expand All @@ -72,6 +79,12 @@ add_custom_target(copy_compile_commands ALL
Now run `conan build .` (where `.` is the path to your project or library) and
it should generate the `compile_commands.json` file.

Ensure that you include the necessary profiles added to the build.

```bash
conan build . -pr stm32f103 -pr arm-gcc-12.3
```

### Refreshing the LSP

Now that you should have your `compile_commands.json` in the right location,
Expand Down

0 comments on commit 0017d8b

Please sign in to comment.