2019-12-04 10:21 AM
I have 3 pictures 544K in size (ARGB). Please write in more detail how each time do not overwrite the data to QSPI during debugging. The reading of the IAR HELP "Linking using ILINK section" did not add to the understanding.
Thanks in advance. Sorry for my English.
2019-12-04 12:37 PM
If they are not part of your application image, I'd suggest writing some code to combine them, providing a table the app can access, and output them as a .HEX file, with an address starting at 0x90000000
Write that image with the STM32 Cube Programmer, using the External Loader for the QSPI memory (N25Q128 as I recall), and don't tell IAR about it.
Have you application set up the QSPI memory, and then access your table/images from there using normal memory access, ie pointers, structures, etc.
2019-12-05 06:30 AM
Thanks! It really works.
#define Pic1Addr 0x90000000
#define Pic2Addr 0x90088000
#define Pic3Addr 0x90110000
...................
Transfer_DMA2D_flag = 1;
if (HAL_DMA2D_Start_IT(&hdma2d, (uint32_t)Pic2Addr, ((uint32_t) 0xC0000000), 512, 272) == HAL_OK)
{
while (Transfer_DMA2D_flag);
}
However, this applies to the last paragraph of the description of the issue in the documentation: "Another easier alternative consists in simply removing the already added QSPI Flash memory loader."
Example QSPI_perfs has a trickier data organization.
Main_images.c is highlighted as a separate file
................................
#include "icon_S.h"
#include "icon_T.h"
#include "icon_M.h"
void dummy_init (void);
void dummy_init (void)
{
}
where icon_S.h
#ifndef IMG_NO_DATA
#if defined (__ICCARM__)
#pragma location = ".textqspi"
#else
__attribute __ ((section (". textqspi")))
#endif
const unsigned char icon_S [30800] =
{..................};
#else
extern const unsigned char icon_S [];
#endif
The void dummy_init (void) function is not defined and used anywhere else, which gives me the right to assume that I can write a similar function, for example, to search for a letter in a font and call it directly in QSPI.
In addition, the presence of #ifndef IMG_NO_DATA suggests an attitude towards the paragraph AN4760 pg. 58, which caused me questions.
...the user can simply generate the QUADSPI data related symbol definition file and add it to the project. The symbol definition file is... a *.o file for IAR EWARM; it should replace, in the project, the original source code files (*.c or *.h) that were already programmed.
2019-12-05 08:05 AM
Yes, so you can either compile the source or provide a precompiled object file, and the linker will bind that instead.
I'm not going to try and second guess the writer of the App Note, if you have a handle on the mechanics of the compiler, linker and loader roles a number of options/paths should be evident/viable..
2019-12-05 08:54 AM
I would like to deal with this mechanics of the roles of the compiler, linker and loader, a number of options / paths. Independent viewing of IAR HELP did not lead me anywhere.
I have not found a working example anywhere.
2019-12-05 09:05 AM
This example is recommended by STM in the same AN4760 on page 62.
2019-12-05 10:43 AM
IAR help may not cover foundational material, perhaps look for college text books on the "compiler, linker and loader" topic
The other alternative to direct application integration would be to have a file system or resource blob that you construct from the files you want the application to access. This would be similar to the FSDATA structures things like LwIP use to enumerate files/pages to a webserver type application.
2019-12-08 06:33 AM
I asked a question on the STM32 documentation. It’s probably not right to ask it to IAR experts.
Please advise whom to forward my question to at STMicroelectronics. Maybe I just didn’t choose the right topic.
2020-12-09 09:51 AM
Some of the answers to my question are perfectly described in the STMicroelectronics AN4296 documentation.
Use STM32F3/STM32G4 CCM SRAM with IAR™ EWARM, Keil® MDK-ARM and GNU-based toolchains.