Hi Stefan,
I recommend looking at this post from @hudakz How to shorten compilation time up to six times
To add a .mbedignore file to your project please right-click your project in a file tree and select New File.
Thanks,
Arek - Mbed Studio team