Skip to content
README.md 1.06 KiB
Newer Older
Marcelo Salazar's avatar
Marcelo Salazar committed
# MCU-Driver-HAL for Arm platforms
Hugues Kamba-Mpiana's avatar
Hugues Kamba-Mpiana committed

Marcelo Salazar's avatar
Marcelo Salazar committed
This repository contains the driver implementation for Arm hardware platforms.
Wilfried Chauveau's avatar
Wilfried Chauveau committed

## Building

```sh
# Configure
cmake -S . -B build
# Build
cmake --build build -j
```

Hugues Kamba Mpiana's avatar
Hugues Kamba Mpiana committed
You may want to add optional arguments to those lines to customize your build. For example the configure
Wilfried Chauveau's avatar
Wilfried Chauveau committed
stage accepts:

Hugues Kamba Mpiana's avatar
Hugues Kamba Mpiana committed
- `-DCMAKE_BUILD_TYPE=Release` will build your applications optimised for size. See
Wilfried Chauveau's avatar
Wilfried Chauveau committed
  [here](./MCU-Driver-HAL/tools/cmake/profiles) for more details.
- `-DCMAKE_VERBOSE_MAKEFILE=ON` will make your build tool more verbose, typically printing the
  command lines invoking the compiler.
Hugues Kamba Mpiana's avatar
Hugues Kamba Mpiana committed
- `-DCMAKE_EXPORT_COMPILE_COMMANDS=1` generates a build database that can be used by IDEs to provide
Wilfried Chauveau's avatar
Wilfried Chauveau committed
  better completion.
- `-DMBED_TOOLCHAIN=ARM` can be defined to use the ARM toolchain instead of the default `GCC_ARM`.

The build stage can be passed a specific target name after a `--` to build only that target or `clean` to remove
the build products (objects and executables). E.g.

```sh
cmake --build build -j -- clean
cmake --build build -j -- foo-bar-hal-example-serial
```