This header-only macro library provides common GCC utility macros.
- Add the fetch file to your repo:
wget https://github.com/intercreate/ic-macros/releases/latest/download/fetch_ic_macros.cmake
- Include and link in your CMakeLists.txt:
include(fetch_ic_macros.cmake) #... target_link_libraries(my_cmake_project PRIVATE ic_macros)
- Include in your source code:
#include <ic_macros.h>
- Fork this repository: https://github.com/intercreate/ic-macros/fork
- Clone your fork:
git clone [email protected]:<YOUR_FORK>/ic-macros.git
- then change directory to your cloned fork:
cd ic-macros
- then change directory to your cloned fork:
- Enable the githook:
git config core.hooksPath .githooks
. ./envr.ps1
test
lint
The following assumes that you are on an x86 machine and would like to run tests in QEMU after cross-compiling.
sudo apt install qemu-user qemu-user-static
- Install
xpm
:npm install --global xpm@latest
- Install the Arm GNU toolchain:
xpm install @xpack-dev-tools/[email protected]
Add to your envr-local
if the path and/or version is different from the one specified in envr-default
:
[VARIABLES]
TOOLCHAIN_GNU_ARM_NONE_EABI_PATH=$HOME/my_path_to/the_toolchain/bin
Run the tests: test arm-none-eabi-gcc
Reference: https://docs.zephyrproject.org/latest/develop/getting_started/index.html#install-zephyr-sdk
cd ~
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.4/toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz
tar -xf toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz # unpacked at ~/arm-zephyr-eabi
cd ~/<back to this repository>
Run the tests: test arm-zephyr-eabi-gcc
Add to your envr-local
if the path and/or version is different from the one specified in envr-default
:
[VARIABLES]
TOOLCHAIN_GNU_ARM_ZEPHYR_EABI_PATH=$HOME/my_path_to/the_toolchain/bin
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
Run the tests: test aarch64-linux-gnu-gcc