cancel
Showing results for 
Search instead for 
Did you mean: 

Error in flashing STM32N6570-DK with TouchGFX

AngeloCardone
Associate II

Hi all,

I used STM32H7S78-DK and everything was fine: I was able to load and flash the "HVAC Iot Demo" from TouchGFX Designer at the first time and develop my application using STM32CubeIDE.

Then I bought an STM32N6570-DK and did the same procedure as before, but I was not able to flash that demo.

I can successfully generate the code inside the TouchGFX Designer (version 4.26.0) but, when I push the button "Program and run target", I get this kind of error:

 

Erasing memory corresponding to segment 0:
Erasing external memory sector 0
Error: failed to erase memory


Error: failed to erase memory
c:/TouchGFXProjects/STM32N6570DK/IotDemo/MyApplication/gcc/include/flash_sections_int_ext.mk:18: recipe for target '_fsblflash_' failed
make[2]: *** [_fsblflash_] Error 1
makefile_fsbl:45: recipe for target 'flash' failed
make[1]: *** [flash] Error 2
../../gcc/Makefile:8: recipe for target 'flash' failed
make: *** [flash] Error 2
Failed
Failed

 

Can anyone please help me?

1 ACCEPTED SOLUTION

Accepted Solutions
AngeloCardone
Associate II
3 REPLIES 3
JohanAstrup
ST Employee

Hello @AngeloCardone.

First of all, just to confirm, have you remembered to set the boot switch in the correct position?

Best regards,
Johan

 

Hello @JohanAstrup,

both boot switch are in the correct position, i.e. on the "L" side.

Moreover, I performed two different procedures to load the demo on the dk, but both failed.

 
1) Using TouchGFX Designer
  • Launch TouchGFX
  • Select the right board (STM32N6570-DK)
  • Select demo "HVAC IoT Demo"
  • The project compile successfully
  • When I try to "Program and Run Target" I get the error above
In several forums, I found that the "Program and Run Target" procedure via TouchGFX is unreliable for this board and often fails. That's why I tried a second, more comprehensive procedure.
 
2) Manual procedure

The steps performed are as follows:

 

  • Select the correct board and demo using TouchGFX
  • Generate code using the "Generate Code" command

 

  • Open the project and the .ioc file using CubeMX
  • Generate all needed libraries using "Generate Code"

 

  • Open the project using STM32CubeIDE
  • Compile the FSBL project in Debug mode to generate the .elf file (compile fails in Release mode)
  • Compile the Appli project in Debug mode to generate the .elf file (Compile fails in Release mode)

 

  • Set the BOOT1 switch to the "H" position and power the board via USB (red LED on)
  • Open STM32CubeProgrammer and connect to the board via SWD (connection recognized successfully)
  • Select the board's external loader
  • Program the board by first loading the FSBL file and then the Appli file (operation completed without errors)
  • Set the BOOT1 switch to "L" position
  • Pressing the RESET button

 

Now the board reboots with the default Demo project (present at the time of purchase) and not with the project I loaded.
The same procedure was repeated with other TouchGFX demos and with a new project created from scratch containing only one button.

All these priocedure fail.
I would like to know if the procedure is correct or I miss something.
Thank you very much for the support
AngeloCardone
Associate II