cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 IAR QSPI Verification error

Alex_777
Associate III

Hello.

I am using mb1191-F746NGH6-C01, IAR Embedded Workbench for ARM 9.50.1.69506, CubeMX V6.12.1 and

TouchGFX V6.22.0. I generated the project in TouchGFX for IAR. TouchGFX locate the backgrounds and widgets in external flash memory. The Discovery STM32F746 board has MT25QL128ABA1EW9 memory.

In IAR I select "Use Flash Bootloader"

Alex_777_0-1729149690940.png

Select STM32F746G-DISCO_QSPI.flash

Alex_777_1-1729149852762.png

When I press the button "Download and Debug"

Alex_777_2-1729150404102.png

I have the next information in the log:

Wed Oct 16, 2024 21:00:42: Hardware reset with strategy 0 was performed

Wed Oct 16, 2024 21:00:42: Verification error at 0x9000'0000: mem = 0x00, file = 0x0B

Wed Oct 16, 2024 21:00:42: Download completed but verification failed.

Wed Oct 16, 2024 21:00:42: Hardware reset with strategy 0 was performed

Wed Oct 16, 2024 21:00:42: Target reset

Wed Oct 16, 2024 21:00:42: There were 1 error and 1 warning during the initialization of the debugging session.

Memory window in the IAR

Alex_777_3-1729150648359.png

Part of the array where it is stored backgrounds image

LOCATION_PRAGMA("ExtFlashSection")

KEEP extern const unsigned char image_alternate_theme_images_backgrounds_480x272_gradient_dark[] LOCATION_ATTRIBUTE("ExtFlashSection") = { // 480x272 RGB565 pixels.

    0x0b, 0x2a, 0x0b, 0x2a, 0x0b, 0x22, 0x2c, 0x2a, 0x2b, 0x2a, 0x2c, 0x2a, 0x0b, 0x2a, 0x2b, 0x2a,

    0x2c, 0x2a, 0x0b, 0x22, 0x2c, 0x2a, 0x2c, 0x2a, 0x2b, 0x2a, 0x0b, 0x2a, 0x2c, 0x2a, 0x2c, 0x2a,

    0x2c, 0x2a, 0x2b, 0x22, 0x2c, 0x2a, 0x2c, 0x2a, 0x2c, 0x2a, 0x2c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a,

    0x2c, 0x2a, 0x2c, 0x2a, 0x2c, 0x2a, 0x2c, 0x2a, 0x4c, 0x2a, 0x2c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a,

    0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a,

    0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x4c, 0x2a, 0x6d, 0x32, 0x4c, 0x2a, 0x4c, 0x2a,

    0x4c, 0x2a, 0x4c, 0x2a, 0x4d, 0x2a, 0x6d, 0x32, 0x6c, 0x32, 0x6d, 0x2a, 0x6d, 0x32, 0x6d, 0x32,

 

1) I can't understand what the file = 0x0B means in the following error?

Wed Oct 16, 2024 21:00:42: Verification error at 0x9000'0000: mem = 0x00, file = 0x0B

2) Where can I find this file?

3) I don't understand why there is a verification error? Where did I make a mistake?  Perhaps additional settings need to be made? I would be very grateful for any help and ideas.

The project is attached to this post.

Thanks!

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

The N25Q128 is just a much earlier variant of the Micron part, perhaps with an older die, when ST/Micron were fab partners. I'd imagine the newer parts have shrunk die to increase wafer yield as part of Micron's longevity model, which is form-fit-function not making the same die for decades, allowing them to pivot into new tighter geometries as fab tech advances. 

Similarly the page size of both the Micron and Winbond are 256 bytes. The loader does the deblocking internal when given a large buffer. Cube Programmer uses this value as a guide to how to align Write() requests on a address and size basis.

The Winbond and Micron have slightly different architecture, and management of status registers and mode.

Old and new Micron parts are subtly different but shouldn't cause failure. Some issue with IAR's script here

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

View solution in original post

17 REPLIES 17

File would be the .ELF and the section within the object file describing the 0x90000000 address space.

The memory dump from the debugger, via memory mapping looks ok.

The external loader from IAR seems to be having less success reading the content it just wrote.

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

Great thanks for answer.

I did't find the .elf file in the iar directory with my project.

Do I understand correctly that the equivalent of an .elf file is a file with the .out extension ?

I looked at the contents of the .out file and didn't find the section within the object file describing the 0x90000000 address space.

Do I understand correctly that the verification error is only related to the IAR, and everything is fine on my side?

What development environment would you recommend instead IAR Embedded Workbench?

Thanks.

Hello @Alex_777,

TouchGFX supports IAR Embedded Workbench, and if you use the provided TouchGFX Board Setup (TBS) for the STM32F746G Discovery Kit, then you can open the STM32CubeMX project (.ioc file), and change the Toolchain/IDE from the "Project Manager" tab to EWARM, and press generate code. Then, from your TouchGFX project, you have generate code as well. By navigating to the EWRAM folder in your project's directory, you can access the IAR project. The required settings are already provided; therefore, you don't need to change anything. 

TBS for STM32F746G Discovery KitTBS for STM32F746G Discovery Kit

EWARM directoryEWARM directory

If you still have trouble downloading the program to your board, you can compile the program by IAR, and use the outputted .hex file to download on your board with STM32CubeProgrammer. You can read more about this process here.

I hope this helps you! 

Mohammad MORADI
ST Software Developer | TouchGFX
Alex_777
Associate III

Hello, Mohammad MORADI ESFAHANIASL

Thanks for reply.

You wrote the next:

TouchGFX supports IAR Embedded Workbench, and if you use the provided TouchGFX Board Setup (TBS) for the STM32F746G Discovery Kit, then you can open the STM32CubeMX project (.ioc file), and change the Toolchain/IDE from the "Project Manager" tab to EWARM, and press generate code. Then, from your TouchGFX project, you have generate code as well. By navigating to the EWRAM folder in your project's directory, you can access the IAR project. The required settings are already provided; therefore, you don't need to change anything. 

I know about it and it was my first actions yesterday. If I do as you write, I get the following error:

Flash download warning: 358130 out of 358130 bytes from data record CODE:[0x9000'0000,0x9005'76f1] will not be flashed. 

If I enter the settings that I wrote above, I get an error only with verification.

What could be the problem?

Thanks.

Alex_777
Associate III

As for the program STM32CubeProgrammer, it does not support the memory MT25QL128, you need to create the .stldr file manually.

Memory chips N25Q128A and W25Q128J has the same page size - 256 bytes.

Why do we see different page sizes in STM32CubeProgrammer?

 

Alex_777_1-1729165483015.png

 

 mb1191-F746NGH6-C01

Is this board the STM32F746G_DISCO? External flash loaders should match the board (actually, pinout of QSPI controller and the flash chip).

The .board files of IAR EWARM are text files that list the used "external loaders" and their parameters. A board can have several external memories and several loaders.

I did't find the .elf file in the iar directory with my project.

IAR creates tweaked .elf files with extensions "out" and "sim" (simplified?). 

 

The N25Q128 is just a much earlier variant of the Micron part, perhaps with an older die, when ST/Micron were fab partners. I'd imagine the newer parts have shrunk die to increase wafer yield as part of Micron's longevity model, which is form-fit-function not making the same die for decades, allowing them to pivot into new tighter geometries as fab tech advances. 

Similarly the page size of both the Micron and Winbond are 256 bytes. The loader does the deblocking internal when given a large buffer. Cube Programmer uses this value as a guide to how to align Write() requests on a address and size basis.

The Winbond and Micron have slightly different architecture, and management of status registers and mode.

Old and new Micron parts are subtly different but shouldn't cause failure. Some issue with IAR's script here

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

Yes, I have STM32F746G DISCO. I understand that the external flash loaders should match the board.

In the IAR I use the file FlashSTM32F746G-DISCO_QSPI.flash

Below is the content of this file:

<?xml version="1.0" encoding="iso-8859-1"?>
<flash_device>
<exe>$TOOLKIT_DIR$/config/flashloader/ST/FlashSTM32F7xx_QSPI_MICRON.out</exe>
<page>256</page>
<block>256 0x10000</block>
<flash_base>0x00000000</flash_base>
<macro>$TOOLKIT_DIR$/config/flashloader/ST/FlashSTM32F746G-DISCO_QSPI.mac</macro>
<aggregate>1</aggregate>
</flash_device>

Do I understand correctly that QSPI_MICRON is the MT25QL128?

How can one be sure of this?

Perhaps by reviewing the file in a "File/HexViewer"

So of IAR's implementation is scripts.

Size, make and model can be derived from the JEDEC ID (0x9F) to manage a group of devices.

I think the .MAC relates QSPI peripheral, bank and pins of specific board implementation.

Where as ST's implementation is more rigid, built for board specific hardware situation.

Keil has loaders in \Keil\ARM\Flash, and within the .PACK (.ZIP) files, some of the new STM32 models have loader source within the packs, along with the binary .FLM (.ELF) objects. You need enough RAM allocation for the loader/data being executed on the STM32 side.

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