cancel
Showing results for 
Search instead for 
Did you mean: 

qspi data not compiling

MMARI.1
Senior

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 

MMARI1_0-1738907478474.png

 

12 REPLIES 12

@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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

@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.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

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

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