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.
Dear Keil Support Team
I'm facing a problem with the File System Driver and SD Cards. For memory optimizations I moved the FS_CONFIG.o (+ZI) section to the external RAM. However, if I'm doing so a cannot write to the SD Card and sometimes even fmount() fails with an fsMediaError. NAND acces works fine. If I move the FS_CONFIG.o (+ZI) back to the internal RAM everything works.
What is neccessary to do if I want to move this section?
Thak you in advance for your help.
Regards Benjamin
The call to __main gets that done prior to calling your main() function.
It's important that external memory gets initialized in the earlier call to SystemInit().
See code in ResetHandler, startup_arch.s
Thanks for your reply, I checked it and my MemoryController (FMSC_Setup()) gets called within SystemInit() before __main is called.
I think you really just want to locate the Drive Cache to an external memory location.
This can be done in the *FS_Config_MCx.h* file with the option Locate Drive Cache and Drive Buffer*. Just enter a fixed memory address and verify in the debugger that this memory is available for the system.
@Reinhard Well that would work for the moment. Thx. By the way to you know how I can reserve this memory section so that the linker isn't using it for other this or is that already done by enabling that option in config file?
The memory is automatically reserved and linker will not use it for anything else.
As Robert describes, enabling this option already reserves the memory. The linker allocates space for the buffer in this case.
Thank you all for helping me!