Archlinux build setup
Main build documentation: https://github.com/JF002/InfiniTime/blob/develop/doc/buildAndProgram.md
CLion setup : https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion
Prerequisite
Install the following packets:
- aur/nrf5x-command-line-tools
- aur/nrf5-sdk
- community/arm-none-eabi-newlib
- community/arm-none-eabi-gcc
Not sure about:
- community/arm-none-eabi-binutils
- community/arm-none-eabi-gdb
CLion configuration
Base config
Then modify CMake options in CLion>Settings>Build,Execution,Deployment>CMake>CMake options
-DARM_NONE_EABI_TOOLCHAIN_PATH=/usr
-DNRF5_SDK_PATH=/opt/nrf5-sdk
JLink
If using JLink to
-DUSE_JLINK=1
-DNRFJPROG=/usr/bin/nrfjprog
Troubleshooting
The C (or C++) compiler XXXXXX is not able to compile a simple test program.
If XXXXXXX is not the arm compile : `/usr/bin/arm-none-eabi-g++` or `/usr/bin/arm-none-eabi-gcc`
If you have errors related to checking the compiler works (e.g. "-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - broken") add those two variables :
-DCMAKE_C_COMPILER_FORCED=1
-DCMAKE_CXX_COMPILER_FORCED=1
My (Zorvalt) issue came from CLion using "normal" `cc` instead of the arm toolchain.
No Comments