I try to write in the flash bank 1 with the ST library functions:
EIC_IRQConfig(DISABLE); FLASH_Init(); FLASH_WritePrConfig(FLASH_B1F0, DISABLE); FLASH_SectorErase(FLASH_B1F0); FLASH_WordWrite(SAVE_FLASH_BASE, 0x123456); EIC_IRQConfig(ENABLE); The program is running in bank 0. When I run the section with the debugger and everything is ok, but the program don't starts himself by power up without debugging. May be I have to start the flash writing sequence from RAM??? How can I copy the function from Flash into RAM and running there??? Can anybody helps me
I solved the problem. You must copy the flash library into RAM, because the first FLASH writing cycle must be started from there. Change your scatter file as shown below:
Thank you very much for your reply. Unfortunately I don’t know what is the “scatter� file. Yes, I’m newbie in ARM’s. I tried to find information on IAR website, googleing and here but I don’t know what exactly I must to modificate. Could you please explain me in detail? 1000 thanks. Regards.
Thank you very much for your reply. Unfortunately I don’t know what is the “scatter� file. Yes, I’m newbie in ARM’s. I tried to find information on IAR website, googleing and here but I don’t know what exactly I must to modificate. Could you please explain me in detail? 1000 thanks. Regards.
You can avoid having to resort to modifying the scatter file. One way of doing it is to embed the body of the RAM function into a static variable. This way the runtime library will copy its contents from ROM to RAM during static variable initialization phase:
On 18-04-2008 at 18:04, Anonymous wrote: I forgot to say that I'm ussing IAR WORKBENCH 5.1 and STR711 processor (tested in Evaluation board and selfmade board). Alfa One more thing. I seem to recall that there is the __ramfunc keyword in IAR EWARM which does the trick automatically. Not sure if it wasn't removed in the new version 5, though.