cancel
Showing results for 
Search instead for 
Did you mean: 

flash linker script for STM32H750IBT6 with external QUADSPI and SDRAM for TouchGFX

AEng7
Associate III

I am using below component tools

MCU: STM32H750IBT6

IDE: STM32CubeIDE Version: 1.20.0

GUI: TouchGFX Version: 4.26.0

SDRAM: IS42S32400J-6TLI

FLASH: MT25QL512ABB8ESF-0SIT (QUADSPI)

 

I have made my own external loader that proves works for the QUADSPI IC using this video: https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/external_QSPI_loader.html

 

Thank you in advance!

16 REPLIES 16
AEng7
Associate III

Bit confused here and can we call them by there proper names. 'External Loader' and 'Bootloader'.

 

I have created an 'External Loader' using this tutorial here for the QUADSPI Flash. https://youtu.be/YFIvJVsvIsE?si=5Pt0JuSpm3BTKfg0

 

I am questioning why a bootloader is needed at all here?

https://www.youtube.com/watch?v=ELMK35I86QE - Does not use a bootloader and uses an external flash. I know my internal flash is only 128kb.

 

Do I create the ExtMem_Boot within my main project which is creating the firmware?

Let me be clrear:

The "External Loader" is the application that will upload your assets either the code application/ constants to the external memories while flashing the binaries. That should have .stldr extension that you should add to your IDE.

The application loader (example: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H750B-DK/Templates/ExtMem_Boot/Src) that's another stuff. As I said previously that's the boot application that boots from the internal Flash. The application is mapped at the external QSPI Flash. So you need to develop that loader by inspiring from the example provided.

If your application doesn't exceed 128KB (the size of the internal Flash), that's something you can skip and use only the internal memory for the code but for TouchGFX there are assets (images and so on..) that consumes huge memory size that need to be placed in the external memory (the QSPI memory in your case) and you need that External QSPI Flash Loader you've already developed/validated.

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.

Thanks for the explanation. Can you explain why the bootloader is needed then?

 

That "bootloader" is used to boot from the flash and prepare the external memory: GPIO configuration, QSPI interface configuration. So when that "bootloader" gives the stage to the application which is already located into the QSPI flash memory, the latter is ready and the application can be executed from the QSPI. Maybe you need to have a look at this link https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H750B-DK/Templates/ExtMem_Boot/Src to understand more the operation.

Here is the external memory configuration:

  /*##-1- Configure Required Memory #########################################*/
  if(Memory_Startup() != MEMORY_OK)
  {
    Error_Handler();
  }

Here jumping to the application located to the External memory:

  JumpToApplication = (pFunction) (*(__IO uint32_t*) (APPLICATION_ADDRESS + 4));
  __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
  JumpToApplication();

Again, that "bootloader" is not needed if your application can fit the internal Flash memory. 

Hope it's clear now.

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.

Thank you this is well explained, I will investigate this and get back to you!

As I will need the "bootloader' as my internal flash memory is 128Kb, I am assuming the code from GitHub can be carefully inserted into my firmware and allow the bootloader to load from flash, and then prepare the external memory.

 

Would I still need the "External Loader"?

 

How is bootloader.bin generated? For the flash linker.

As I said previously:

The "External Loader" is the application that will upload your assets either the code application/ constants to the external memories while flashing the binaries (Flashing the application). That should have .stldr extension that you should add to your IDE.

That application will responsible to download the assets to your QSPI Flash

The "bootloader" is responsible to prepare and configure the QSPI memory so the application can access the assets already Flashed by the "External Loader" or the FlashLoader you've already developed.

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.