Have a look into the "System Reference Guide" for PSoC4 from Creator Help menu. Keep an eye on the impact writing to flash has on the clock system. There are several #defines describing the flash organization. When not using a bootloader, the upmost rows will be free to use.
Bob