picolibrary-microchip-megaavr

Usage

Table of Contents

  1. Dependency
    1. Configuration Options
    2. avr-libcpp Configuration Requirements
    3. picolibrary Configuration Requirements
  2. Development

Dependency

To use picolibrary-microchip-megaavr as a dependency, simply add the subdirectory containing the repository to a CMake build, and link with the picolibrary-microchip-megaavr static library.

add_subdirectory( picolibrary-microchip-megaavr )
target_link_libraries(
    foo
    picolibrary-microchip-megaavr
)

The picolibrary-microchip-megaavr static library does not include ::picolibrary::Microchip::megaAVR::version(). To use ::picolibrary::Microchip::megaAVR::version(), link with the picolibrary-microchip-megaavr-version static library.

target_link_libraries(
    foo
    picolibrary-microchip-megaavr
    picolibrary-microchip-megaavr-version
)

Configuration Options

picolibrary-microchip-megaavr supports the following project configuration options:

avr-libcpp Configuration Requirements

If PICOLIBRARY_MICROCHIP_MEGAAVR_USE_PARENT_PROJECT_AVRLIBCPP is ON, avr-libcpp must be configured as follows:

picolibrary Configuration Requirements

If PICOLIBRARY_MICROCHIP_MEGAAVR_USE_PARENT_PROJECT_PICOLIBRARY is ON, picolibrary must be configured as follows:

Development

The repository’s Git pre-commit hook script is the simplest way to configure, and build picolibrary-microchip-megaavr during development. See the pre-commit script’s help text for usage details.

./git/hooks/pre-commit --help

Additional checks, such as static analysis, are performed by the repository’s GitHub Actions CI workflow.