arm FlashFS

Hi!
I'm using your FlashFS with LPC2119;but I Don't know How
to add __ram to IAP_Execute.c file ,There are five fountions in it:

void IAP_Execute (struct sIAP *pIAP)
U32 GetSecNum (U32 adr)
int fs_Init (U32 adr, U32 clk)
int fs_EraseSector (U32 adr)
int fs_ProgramPage (U32 adr, U32 sz, U8 *buf)

each of them must add __ram or some of them need add __ram?
Thanks!

Parents
  • It is not required for any of the Flash Programming functions to be located in RAM for LPC2119 if you want to use internal flash for storing files.

    Flash programming functions call IAP functions from the Boot Loader. IAP functions handle this automatically. The critical code is copied to RAM and executed within RAM. You should reserve the top 32 bytes from internal RAM for IAP under Options for Target - LA Locate.

    For the fs_EraseSector() and fs_ProgramPage() functions, you should disable all interrupts. You may however leave the interrupts enabled if you remap interrupt vectors to RAM and locate interrupt handlers also to internal RAM. Othervise your application may crash.

Reply
  • It is not required for any of the Flash Programming functions to be located in RAM for LPC2119 if you want to use internal flash for storing files.

    Flash programming functions call IAP functions from the Boot Loader. IAP functions handle this automatically. The critical code is copied to RAM and executed within RAM. You should reserve the top 32 bytes from internal RAM for IAP under Options for Target - LA Locate.

    For the fs_EraseSector() and fs_ProgramPage() functions, you should disable all interrupts. You may however leave the interrupts enabled if you remap interrupt vectors to RAM and locate interrupt handlers also to internal RAM. Othervise your application may crash.

Children
More questions in this forum