2018-08-28 04:47 PM
Hi, I have a project based on STM32F427IGH with external SRAM AS6C6416 (64M). for some functions I need a lot of memory, for another -fast access, as the SRAM not fast (50 nSec) I would like to use it only for dynamically allocation memory. After all configuration for the SRAM I am able read/write data to region 0x64000000 and higher, but when I tryed call function malloc(), it not working - Hardfault error. So, I have 2 questions:
My SRAM.ICF file for the project in the attachment.
Thanks.
2018-08-29 03:26 PM
This is purely toolchain-related question, as you are apparently using IAR you will want to go for suport there.
JW
2018-08-29 06:15 PM
SDRAM needs to be initialized in SystemInit() so it is viable to the run-time code that sets of the statics.
Usually the HEAP section is defined in the startup.s file, and associated with memory via linker script or scatter file.
On Keil tricks can be done to add memory ranges into the allocator chain, similar things could be done with IAR if you understood how it works.
2018-09-01 01:25 PM
Thanks all for helping, I found the isssue .. I it was my msitake. I lost one zero in start address in the SRAM.ICF file, was:
define symbol __ICFEDIT_region_FMC11_start__ = 0x6400000;
should be -> 0x64000000