Skip to main content
Graduate
February 15, 2025
Solved

Own custom build STLDR file creation issue

  • February 15, 2025
  • 1 reply
  • 1012 views

hi,

I am trying to build my own STLDR file with STM32H723ZGT6 + w25q128.

I could able to build the stldr file STLDR creation with Separate Project 1 but it's not working with external loader  project 2 it's giving down load error while program download  .

Note : i could able work with external loader Project 2 by using https://github.com/cturvey/stm32extldr/tree/main/h7_w25q128  not by my made STLDR file.

I have referred some existing STLDR creation project with STM32H7B0 + w25q128 found they used 

 

void SystemClock_Config(void)
{
 RCC_OscInitTypeDef RCC_OscInitStruct = {0};
 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

 /*AXI clock gating */
 RCC->CKGAENR = 0xFFFFFFFF;

 

 why they have (RCC -> CKGAENR = 0xFFFFFFFF )gating the AXI clock ?. 

STM32H7B0 reference manual:

https://www.st.com/resource/en/reference_manual/rm0455-stm32h7a37b3-and-stm32h7b0-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf 

STM32H723 reference manual:

https://www.st.com/resource/en/reference_manual/rm0468-stm32h723733-stm32h725735-and-stm32h730-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

how to gate the AXI clock in STM32H723 ?

    This topic has been closed for replies.
    Best answer by MMARI.1

    hi ,

     

    In the Loader_Src file made  the below  changes and now custom stldr  working fine .

     

    instead of __enable_irq();  changed to  HAL_ResumeTick();


    instead of __disable_irq() ; changed to HAL_SuspendTick();

     

     
     
     
     
     

    1 reply

    Graduate II
    February 15, 2025

    You can run the part from the initial HSI (64 MHz)

    You only need to enable the relevant OCTOSPI and OCTOSPIM peripherals, and pins related to the interface

    MMARI.1Author
    Graduate
    February 16, 2025

    hi, 

    i have enabled HSI (64 MHz) with single quad spi in octo mode and made many attempt to successes but nothing happen !. I have attached the stldr creation project (zip). Please give me the  idea about what is missing  ? . The exact error message as below  while downloading via cube ide .

     

    Erasing memory corresponding to segment 0:
    Erasing internal memory sector 0
    Erasing memory corresponding to segment 1:
    Erasing external memory sector 0
    
    
    Download in Progress:
    Error: failed to download Segment[0]
    Error: failed to download the File
    Encountered Error when opening C:\ST\STM32CubeIDE_1.11.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin\STM32_Programmer_CLI.exe
    Error in STM32CubeProgrammer
    Shutting down...
    Exit.

     

    MMARI.1Author
    Graduate
    February 22, 2025

    hi,

    Using my own build STLDR file, I could able to down load the dummy binary file via cube programmer as well as erase and read functions with external loader .

    But i could not able down load the elf ( main code ) file via cube programmer and cube ide debugger.

    From the above analyze code's  are fine . i think cube programmer and cube ide debugger not catching the elf file but i don't know how using  the  https://github.com/cturvey/stm32extldr/tree/main/h7_w25q128   stldr file  is working fine !. 

     

     

     

    MMARI1_0-1740209051613.png

     

    MMARI1_2-1740209453909.png