compiler generating bad .elf file
Hello STM,
I noted that the compiler generated a bad .elf file using an STM32H7R3L8H6H MCU. I made a small demo project(attachment) that demonstrated the problem.
I'm using an external PSRAM with HEXASPI on XSPI1 port. I reserved a place on fixed addresses in the PSRAM where I placed my buffer.
This is the definition in the linker script:
/* ========================================================================= */
/* USER-PSRAM section definitions */
/* ========================================================================= */
.user_psram_sec 0x90000000 :
{
/* ----- USER_PSRAM_MEM_01 - 10240 Bytes ----- */
. = ABSOLUTE(0x90000000);
*(.USER_PSRAM_MEM_01)
/* ----- USER_PSRAM_MEM_02 - 40960 Bytes ----- */
. = ABSOLUTE(0x90002800);
*(.USER_PSRAM_MEM_02)
/* ----- USER_PSRAM_MEM_03 - 10240 Bytes ----- */
. = ABSOLUTE(0x9000C800);
*(.USER_PSRAM_MEM_03)
} >USER_PSRAM
This is the definition for the buffer in main.c:
static UCHAR user_psram_mem_01_buffer[USER_PSRAM_MEM_01_POOL_SIZE] __attribute__((section(".USER_PSRAM_MEM_01")));
static UCHAR user_psram_mem_02_buffer[USER_PSRAM_MEM_02_POOL_SIZE] __attribute__((section(".USER_PSRAM_MEM_02")));
static UCHAR user_psram_mem_03_buffer[USER_PSRAM_MEM_03_POOL_SIZE] __attribute__((section(".USER_PSRAM_MEM_03"))) ;
I can compile the program without error, but the download will fail. I tried using the STM32CubeProgrammer, but I got the same results.
Here is a screenshot from the download in the programmer:
I'm not 100% sure, but it looks like it ties to writing my byte buffer into the flash memory instead of 0x90000000.
The STM32H7RS series MCUs seem to be very powerful devices, but I'm beginning to understand why few people use them. It's simply not worth the hassle. Who in their right mind wants to become a volunteer bug-finder for STM?
You know, Microsoft came up with a slogan once. It goes something like this:
"Knowledge shared is knowledge squared."
STM could introduce the "Bug Finder Badge."
OK, guys, keep hunting those bugs, and don't forget:
"Always be yourself unless you can be a pirate. Then always be a pirate."
