cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare image to allocate memory space in SDRAM?

Javad
Associate III

Hi guys,

I use STM32F429+stemwin GUI. I have many image to show on display. Due to space limitation, I try to declare image to allocate memory space in SDRAM as following line:

unsigned char _acMY_LOGO[]__attribute__((at(SDRAM_BANK_ADDR + IMAGE1_ADDR))) = { .......

the program is complied without error but when I program it, the compiler show the following warning:

No Algorithm found for: D0408000H - D040FFFFH

No Algorithm found for: D0410000H - D0416AFFH

Partial Programming Done (areas with no algorithms skipped!)

it seem the complier cannot write on SDRAM address. my complier is keil. I'm pleased if you help me "How to declare image to allocate memory space in SDRAM?"

3 REPLIES 3
KnarfB
Principal III

If the images are const (like icons etc..), you should put them into external flash if you have it on board. The tools can program that external flash if you configure them right. This is ment by "algorithm" here. Programming a SDRAM does not make sense, SDRAM does not hold its contents across power cycles. Therefore, there is "No Algorithm" for doing so.

MM..1
Chief II

When you plan application run from Keil load it and leave running without reset or power lost then your idea SDRAM images is usable, but load method you need create. In normal is images to SDRAM loaded in code run for example from SDCARD...

RAM content (SRAM or SDRAM) has to be unpacked from the ROM/FLASH image. To do this the RAM regions live within the "Load Region" for IROM1, and these get moved after SystemInit() is called, and the scatter-loader is call by __main to initialize the statics.

Perhaps read up on the chapter(s) for the Scatter File, Scatter Loader, and Load Regions.

Also, I'd recommend you avoid the AT type directives, and let the linker do it's job.

>>..it seem the complier cannot write on SDRAM address.

Except that's not an error from the compiler.. that's the debugger complaining about what you told the linker to do.

You need to further insure that the SDRAM, QSPI, etc are brought up and functional by code in, or called by, SystemInit()

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..