cancel
Showing results for 
Search instead for 
Did you mean: 

Issues Setting Up TouchGFX Project for STM32N6570-DK

TerZer
Associate II

I’m running into some trouble when trying to create a new application with TouchGFX Designer version 4.24.2 on the STM32N6570-DK board. After generating the code and opening the project in STM32CubeMX, I encounter a clock configuration error. It seems to resolve itself automatically, but the real issue starts when I move to STM32CubeIDE.

In STM32CubeIDE, I get an error saying the .elf file does not exist. When I try to build the project, I encounter numerous errors like "bad instruction" in tx_initialize_low_level.S.

Has anyone successfully set up a TouchGFX project for the STM32N6570-DK? Any guidance on how to resolve these issues would be greatly appreciated!

Thanks in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @TerZer ,

 

I have reproduced the steps you did :

  1. Create a STM32N6 project from TouchGFX Designer
  2. Generate code from TouchGFX Designer
  3. Open STM32CubeMX and generate code to fix the clock issue
  4. Open STM32CubeIDE and try to build the application

I do get multiple error when building on step 4, however, I am able to fix these issues by going back to TouchGFX Designer and regenerating code between step 3 and 4.
After generating code from STM32CubeMX, you should re-generate code from TouchGFX Designer aswell.

Edit: You should also use the script mentioned in the readme to flash the board.

 

If this comment solves your issue I invite you to select it as "best answer".
Hope this helps! 

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

3 REPLIES 3
GaetanGodart
ST Employee

Hello @TerZer ,

 

I have reproduced the steps you did :

  1. Create a STM32N6 project from TouchGFX Designer
  2. Generate code from TouchGFX Designer
  3. Open STM32CubeMX and generate code to fix the clock issue
  4. Open STM32CubeIDE and try to build the application

I do get multiple error when building on step 4, however, I am able to fix these issues by going back to TouchGFX Designer and regenerating code between step 3 and 4.
After generating code from STM32CubeMX, you should re-generate code from TouchGFX Designer aswell.

Edit: You should also use the script mentioned in the readme to flash the board.

 

If this comment solves your issue I invite you to select it as "best answer".
Hope this helps! 

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
TerZer
Associate II

Hi @GaetanGodart ,

That helped, but now when I run the application, I get the following error: "Could not verify ST device! Please verify that the latest version of the GDB-server is used for connection."

Here’s the full console output:

STMicroelectronics ST-LINK GDB server. Version 7.9.0 Copyright (c) 2024, STMicroelectronics. All rights reserved. Starting server with the following options: Persistent Mode : Disabled Logging Level : 1 Listen Port Number : 61234 Status Refresh Delay : 15s Verbose Mode : Disabled SWD Debug : Enabled InitWhile : Enabled Waiting for debugger connection... Debugger connected Waiting for debugger connection... Shutting down... Target is not responding, retrying... Target is not responding, retrying...

Using OpenOCD:

 

Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : STLINK V3J15M7 (API v3) VID:PID 0483:3754 Info : Target voltage: 3.273307 Info : clock speed 8000 kHz Info : stlink_dap_op_connect(connect) Info : SWD DPIDR 0x6ba02477 Info : [STM32N657X0HxQ.ap0] Examination succeed Error: Failed to read memory at 0x701320d4 Error: [STM32N657X0HxQ.cpu] Examination failed Warn : target STM32N657X0HxQ.cpu examination failed Info : gdb port disabled Info : starting gdb server for STM32N657X0HxQ.cpu on 3333 Info : Listening on port 3333 for gdb connections Info : accepting 'gdb' connection on tcp/3333 Error: Failed to read memory at 0x701320d4 Error: Failed to read memory at 0x701320d4 Error: [STM32N657X0HxQ.cpu] Examination failed Info : [STM32N657X0HxQ.cpu] AP write error, reset will not halt Error: Failed to read memory at 0x701320d4 Error executing event gdb-attach on target STM32N657X0HxQ.cpu: C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.0.202411041438/resources/openocd/st_scripts/gdb_helper.tcl:18: Error: TARGET: STM32N657X0HxQ.cpu - Not examined in procedure 'gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.0.202411041438/resources/openocd/st_scripts/target/stm32n6x.cfg", line 272 in procedure 'first_gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.0.202411041438/resources/openocd/st_scripts/gdb_helper.tcl", line 18 Info : New GDB Connection: 1, Target STM32N657X0HxQ.cpu, state: reset Error: Target STM32N657X0HxQ.cpu not examined yet, refuse gdb connection 1! Error: attempted 'gdb' connection rejected shutdown command invoked

It seems like the debugger cannot read memory. I also noticed that using STM32CubeProgrammer, I am unable to read memory after running the application. However, after unplugging and reinserting the cable, I can read memory again.

Any ideas on how to resolve this?

Hello @TerZer ,

 

The steps to run the STM32N6570-DK are a bit different.
Have you followed the steps mentioned in the readme file? You should not flash the board yourself but instead use scripts that we provide.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)