Keil gives you a drop down to select many options, one of these is to use ARM micro.
Mbed Studio homepage quote:
Build your code with Arm Compiler 6, included for free with Mbed Studio. With no restrictions on code size or optimization levels, you can get the most out of your MCU and focus on your application development.
So how do we change from ARM_STD to ARM_MICRO and set different optimization levels?
This would help with smaller targets up to 128k when you just need that little bit more space.