Hi,
This is the flash example code based on CodeWarrior for DSP56800E ver8.x.
Pls refer to it.
Regarding your question, the flash erasing/programming code must be located in flash and copied to p RAM, you have to run the erasing/programming code in RAM to manipulate the flash.
Hope it can help you
BR
XiangJun Rong