2015-12-25 04:08 AM
Hi
I am using STM32F429 based board with IAR tool chain for compilation. I have tested SDRAM using test program and its working fine. Now I want to move heap, stack and all readwrite variables on SDRAM hence updated default icf file. Please find attached icf file. I have also defined DATA_IN_ExtSDRAM in system_stm32f4xx.c But I get hardfault interrupt after SystemInit(). Can you please help understanding whats going wrong in this icf file. Thanks Sapana2015-12-25 06:09 AM
The initial stack pointer described in the vector table CANNOT point to SDRAM, it's not initialized when the processor starts.
If it Hard Faults after SystemInit() perhaps you need to be looking at that code rather than the .ICF? Perhaps you're not initializing the SDRAM properly? You'd want to double check that before using it. I'm also at a bit lost as to the benefits of using the SDRAM for the STACK, as it's significantly slower, and will slow the execution of all your subroutines and local/auto variables.