- Download GNU Arm Embedded Toolchain
- Unpack:
tar xf arm-none-eabi-gcc-<version>.tar.bz2
- Edit your
.bashrc
or.bash_profile
or similar:- Add to
PATH
as a LAST member:export PATH="$PATH:$HOME/gcc-arm-none-eabi-9-2019-q4-major/bin"
- Create
~/bin
and add toPATH
as a first member:PATH=$HOME/bin:$PATH
- Add to
- Install ccache:
sudo apt install ccache
orbrew 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.