2025-02-06 09:52 PM
hi,
I am trying to external loader connect with stm32h723zgt6 + w25q128 .
before loading the stldr file into debugger i need know why cube ide not compiling the data into qspi location ?
In the main.c file constant data has been declared as below .
const __attribute__((section(".extFlash"))) uint8_t buff[] = "Hello world from H723 QSPI";
In the flash id file has been modified as below.
QSPI_FLASH (r) : ORIGIN = 0x90000000, LENGTH = 16M
.extFlash :
{
*(.extFlash)
} >QSPI
after compiling why memory details not showing in the below menu
Solved! Go to Solution.
2025-02-07 06:34 AM
@MMARI.1 wrote:
hi, @unsigned_char_array , @SofLit
finally problem solved by using external flash constant data declared and used inside the code ! .
Please accept as solution the comment that guided you to it.
2025-02-07 07:04 AM - edited 2025-02-07 08:02 AM
@MMARI.1 wrote:hi, @unsigned_char_array , @SofLit
sincere many thanks :) for your deep finding .
finally problem solved by using external flash constant data declared and used inside the code ! .
Glad the problem is solved.
@MMARI.1 wrote:hi, @unsigned_char_array , @SofLit
Please suggest me which BSP examples or Any other link i should follow for dual quad spi in octal mode for a init , read , write and memory map driver file.
Based on your suggestion i can build my own custom stldr file for dual quad in octal mode .
Coincidentally I wrote my own dual-quad SPI flash driver and flash loader for the MT25TL256 on the STM32H7 two years ago:
https://community.st.com/t5/stm32-mcus-products/need-help-with-flashloader-driver-for-stm32h7a3zit6q-with-octo/td-p/82580
I suggest you either use a standard supported flash or use my driver as writing one yourself is quite a challenge.
If you have further questions please create a new topic on that subject as it is a complicated subject and this topic has been resolved.
2025-02-07 09:00 AM
The linker will do dead-code elimination based on what's called and what's used.
You can use the KEEP() directive in the linker script
https://github.com/cturvey/stm32extldr/blob/main/ExternalLoader_H5.ld#L43
.extFlash :
{
*(.extFlash)
*(.extFlash*)
} >QSPI
This will address .extFlash.xxx .extFlash.yyy naming, say the compiler's using a "section per function" directive to give fine grain granularity to cherry picking what blocks of code are dependent in the dead-code removal, when dealing with .C files in similar ways to .A/.LIB