...
To change the build configuration, ensure that your main project is selected (the options will be greyed-out otherwise) and choose Project | Build Configurations | Set Active | Release.
Ensure that the Release build is also used for your current Run Configuration, so the correct executable is sent to the board.
For more information on GCC optimisation flags, see the GCC manual.