2016-02-11 06:25 AM
Hi.
I try to test emWin example – MEMDEV_AttitudeIndicator.c. To be able to run it 1024 * 700 bytes of memory are required. I took HelloWorld StemWin example as a starting point. When I try to increase the necessary memory in GUIConf.c file from 1024*150 to 1024*700 the error occurred:unable to allocate space for sections/blocks with a total estimated minimum size of 0xafb74 bytes (max align 0x8) in <[0x20000000-0x2004ffff]> (total uncommitted space 0x50000).
So necessary RAM is bigger than what we have.
But we also have external RAM. Is it possible to include it somehow? Or is there any other solution?
Thanks.
2016-02-11 08:27 AM
You'd probably want to get the SDRAM up and running via your SystemInit() code, make sure the memory is described in your linker script or scatter file, and then either place your heap in that section, or your large static allocations.
These wouldn't be materially different in concept to the discussions about the F429I and F469I DISCO boards.2016-02-16 06:29 AM
Hi Clive,
can you kindly link the discussions about this argument.Thank you a lotMarco2016-02-16 01:00 PM
I'd just have to trawl through Google..
Which IDE or tool chain are you using, might help pulling most specific threads.2016-02-18 02:14 PM
Hi,
if you are out of internal SRAM space - two options: a) If your data, e.g. a background image for LCD, a huge look-up table ... has const data (just read, no need to modify) - you can put it into FLASH (ROM). This is done automatically by adding ''const'' to the C-code array definition. b) You can also use external SDRAM. Just enable it via the SystemConfig function. BTW: if you use the LCD it should be already enabled, the frame buffer for LCD is on SDRAM. So, you should have a huge amount of SDRAM. Just: the linker does not know your SDRAM (sure, not available at boot time, no way to let load code via debugger there). You have to manage and organize the data and access to SDRAM yourself. Best is to use the macros which define base address and size of SDRAM and use a pointer to SDRAM. BTW: if you have a data array in image (code) and you want to have it on SDRAM - you had to memcpy() during runtime to SDRAM: SDRAM is not loaded by debugger and only available after your system init was executed. Other option is: QSPI (I use it already): you can enable QSPI flash device and map it (as NOR). It would become readable as any other memory, but not write-able: you had to flush the QSPI with your data (e.g. LCD images, pictures, audio files ...) using the ST-LINK utility. Works great for huge data (as RO, const), just a bit slow, but working transparent in C-code as any other RO memory.2016-02-22 03:27 AM
Hi Clive,
thank you for your suggestion.Marco