cancel
Showing results for 
Search instead for 
Did you mean: 

Own custom build STLDR file creation issue

MMARI.1
Senior

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions

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();

 

 
 
 
 
 

View solution in original post

5 REPLIES 5

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

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

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.

 

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

 

The Log Verbosity Level 3 provides PC side interaction details.

You can instrument your STLDR code to output details/telemetry for the interaction through the entry points on the STM32 side.

I'm not exactly sure what it does on the ELF side of things, but basically it should enumerate through the PROGBIT's sections. Perhaps inspect via OBJDUMP, OBJCOPY or FROMELF type tools.

My loaders simply action the inbound requests. If your build as SPIFLASH it will access memory via Read() interface, rather than Memory Mapped so the JTAG can read instead.

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

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();