Monday, December 11th 2017, 6:40am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

victortomov

Beginner

Date of registration: Aug 16th 2017

Posts: 12

1

Tuesday, August 22nd 2017, 7:04pm

[SOLVED] SES Initializing QSPI on STM32F7

Hello there,

Let suggest that we have QSPI on an STM32F7 disco board and the code is developed in SES. If we initialize the QSPI as memory mapped and we use:

C/C++ Source code

1
__attribute__ ((section (".textqspi")));


to store an array in the QSPI, is there a way with SES to automatically download the data from the elf file to QSPI when running the build? I assume that there is correct flash placement XML file with

Source code

1
 <ProgramSection alignment="4" load="Yes" name=".textqspi" /> 


To be more clear, is there a way to configure SES to do that or I have to use J-Flash with the loader program and data for QSPI?

Thank you in advance,
Victor

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 430

2

Wednesday, August 23rd 2017, 10:03am

Hello Victor,

The whole programming aspect of ES is handled by the J-Link DLL.
Currently you will need to use a flash loader to program the QSPI on the discovery board.
For that you can use our open flash loader interface.
A example project can be found here: https://wiki.segger.com/STM32F746_Discovery

But we are planning to release out-of-the-box QPSI support for the STM32F7 discovery board so you don't need to write any additional flash loaders.
It will be released in the next couple of weeks.
Keep in mind that only the "default" QSPI Flash that is on the discovery board will be supported out of the box.

Best regards,
Nino

victortomov

Beginner

Date of registration: Aug 16th 2017

Posts: 12

3

Wednesday, August 23rd 2017, 10:38am

Hellow Nino,

Thank you for the information above. I think I understand the aspect of ES interfacing the J-Link DLL. Is there a way if the flash loader is configured with the J-link and JLinkDevices.xml, to configure SES to execute this flash loader for QSPI when downloading the code to the target (together with the internal flash)? Furthermore, the data for the QSPI, for example, is stored inside the C code in .textqspi section instead of hex or other formats.

I don't know if I explained myself very well. Please, let me know if something is unclear.

Thank you.
Victor

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 430

4

Wednesday, August 23rd 2017, 3:18pm

Hello Victor,

Quoted

Is there a way if the flash loader is configured with the J-link and JLinkDevices.xml, to configure SES to execute this flash loader for QSPI when downloading the code to the target (together with the internal flash)? Furthermore, the data for the QSPI, for example, is stored inside the C code in .textqspi section instead of hex or other formats.


This is possible. A in depth tutorial can be found here.
You have basically two options here. Either add the QSPI support yourself as described in the Wiki articles or wait for us to implement it in the next couple of releases.
Either way to make sure ES is using the DLL with the flash loader you will need to rename (or remove) the J-Link DLL in the ES installation directory.
It can be found under the following path: $(ESInstallPath)\bin
Depending on the OS you are using (32- bit or 64- bit) the DLL is called "JLinkARM.dll" or "JLink_x64.dll". Simply rename that file to e.g. "JLink_x64.dll.bak".
Then ES will use the latest J-Link Software Package that is installed on your computer instead. If you have added the QSPI flash loader to that package you can now program the QPSI Flash with Embedded Studio as you described.


EDIT: Pardon, the crossed out information is not 100% correct/necessary. To be able to use the latest added devices (including QSPI support) all you need to do download the latest J-Link Software and Documentation Pack and let the J-Link DLL updater update the DLL in the ES installation folder.

Best regards,
Nino

victortomov

Beginner

Date of registration: Aug 16th 2017

Posts: 12

5

Thursday, August 24th 2017, 8:52am

Hello Nino,

It is clear for me, now. Thank you for the support.

Victor

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 430

6

Thursday, August 24th 2017, 8:59am

Hello Victor,

You are welcome.
I will consider this thread as solved now.

Best regards,
Nino