I'm somewhat new to the micro world of development. I am trying to create a fairly large object in the SRAM on the F429Disco.
I am using the FMC_SDRAM example provided by ST. It compiles and run fine Out of the box, so I wont clutter up the thread with all that code.
/* Program the SDRAM external device */
Right after the above code, I try to creating some large arrays by using a new char and a vector.
char *pMem = new char;
for(int i = 0; i< 4000000 - 1; ++i)
pMem[i] = 0xAA;
The above code goes into a hard fault, I notice that the address of the pointer is 0x20000910 which is not in the SRAM region. Therefore, when I try to initialize the object with 0xAA it goes to hard fault.
When I try to create a vector, same result vector<char> data(4000000); causes death when I try to initialize.
How can I create a large array (block of memory) in the external SRAM?
Thanks in advance!