We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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!
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.
Thanks Franc Urbanc to repaly my question! Now I found my problems: I don't know how to configure the FlashFS,In LPC2119,I configured asf_flashdev.h and asf_config.c in 4 ways: 1. in asf_flashdev.h #define FLASH_DEVICE DFB(0x02000, 0x00A000), DFB(0x02000, 0x00C000), #define FL_NSECT 2 in asf_config.c #define FL_BADR 0x0000a000 #define FL_SIZE 0x00004000 It don't work; 2. in asf_flashdev.h #define FLASH_DEVICE DFB(0x02000, 0x008000), #define FL_NSECT 1 in asf_config.c #define FL_BADR 0x00008000 #define FL_SIZE 0x00004000 It works well; 3. in asf_flashdev.h #define FLASH_DEVICE DFB(0x02000, 0x008000), #define FL_NSECT 1 in asf_config.c #define FL_BADR 0x00008000 #define FL_SIZE 0x00002000 It works well; 4. in asf_flashdev.h #define FLASH_DEVICE DFB(0x02000, 0x00a000), #define FL_NSECT 1 in asf_config.c #define FL_BADR 0x0000a000 #define FL_SIZE 0x00002000 It don't works; Can you tell me How to configure the FlashFS? Thanks very much!