- Download GNU Arm Embedded Toolchain
- Unpack:
tar xf arm-none-eabi-gcc-<version>.tar.bz2 - Edit your
.bashrcor.bash_profileor similar:- Add to
PATHas a LAST member:export PATH="$PATH:$HOME/gcc-arm-none-eabi-9-2019-q4-major/bin" - Create
~/binand add toPATHas a first member:PATH=$HOME/bin:$PATH
- Add to
- Install ccache:
sudo apt install ccacheorbrew install ccache - Add links to
$HOME/bin:
cd ~/bin
for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done
Do not add GCC_ARM path into mbed config, this will skip the PATH end effectively skip the ccache.
Add following to your .bashrc:
export MBED_BUILD_TIMESTAMP=hardcoded_value_to_enable_ccache
This allows ccache to kick in on the preprocessor phase as well, because timestamps do not change anymore.