Having trouble running FX2 frameworks code in external flash memory using the EA=1 configuration

Question: What is change that should be made when using EA=1 configuration in FX2?

 

Answer:

When using the EA=1 configuration, you must change the following line in fw.c:

*((BYTE xdata *)IntDescrAddr+i) = *((BYTE xdata *)ExtDescrAddr+i);

to:

*((BYTE xdata *)IntDescrAddr+i) = *((BYTE code *)ExtDescrAddr+i);