XGATE has access to about 30k of flash and you can use this for whatever purpose you want including code space.
Be aware that XGATE will run at half the speed when fetching code from flash (i.e. same bus speed as the CPU - 40MHz max.) and this is the reason that RAM is the primary recommendation. Essentially flash is slow compared to RAM.
To place XGATE code in RAM you define the appropriate code segment in the linker file and the linker will place the code where you want it to be.