Hi Markel,
Please take a closer look at the attached UM11325 and follow the steps described in chapter 3.4.1 "Programming a project using the debugger".
To program a project using the flash programmer, please follow the steps described in chapter 3.4.2 "Programming a project using the flash programmer".
Also from the UM11325:

Best regards,
Tomas