Skip to main content
Chandler
Associate II
January 30, 2020
Solved

Cube IDE Debugging -- Proper Sequence?

  • January 30, 2020
  • 12 replies
  • 9438 views

Hi -- just wondering if anyone has tried importing a project generated by the Designer to the Cube IDE, and then had any success running it using the GDB debugger on either a 746 or 769 Discovery board? Everything seems to build fine in Designer and IDE, and the projects can run on the target board directly from Designer, but I can't get the IDE debugger to work after importing them. On the 746 Disco board, I get this message, right as the switch is being made from flash to debug mode:

----

Download verified successfully

(Read)Failed determine breakpoint type

Error! Failed to read target status

Debugger connection lost.

Shutting down...

----

On the 769 disco board, I don't even get that far. There is a popup saying "Error in final launch sequence. Failed to execute MI command"...

Pictures of the screens are attached.

Maybe I misunderstand what is supposed to happen between the Designer build phase and the IDE debugging phase? I thought IDE is supposed to import the GFX generated project, create the hex code, and all is good, no? If anyone knows how to get to this stage, please share details. Thanks to all. **Cube IDE 1.2 GFX 4.13, all templates version 3**

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Before i finalize this and upload it, i just want to make sure it's working for you as well in CubeIDE (Version will be bumped to 3.0.1).

Unzip the file and find a .tpa, template file inside. Overwrite your existing .tpa file at %APPDATA%/TouchGFX-4.13.0\STM32F746G_DISCO\3.0.0.

Make sure to define an external flashloader for the external flash on the F746G-DISCO in the CubeIDE debugger settings.

/Martin

12 replies

HP_it
Senior II
January 30, 2020

I know that I can get that error if I try to start the debugging before the flash is done verifying.

Usually there's a percentage in the lower right corner on how far the progress is. I know it's a longshot but doublecheck that its really done with everything before you start (or resume) from the main breakpoint.

Chandler
ChandlerAuthor
Associate II
January 30, 2020

Yes, the code looks like it's completed the download sequence. See the "verified" status in the error description of the 746 based project. The 769 based project does not get even that far, though. It fails for another reason, which is disturbing. Have you in fact been able to debug a project created in Designer, with one of its templates, in the Cube IDE's GDB debugger? Maybe we can swap projects and see what happens? This is very strange, and discouraging to be so close and bomb at the last step. Again, I think the process is 1) create a project in Designer with a v3 template 2) import the project to the Cube IDE 3) build the hex code in the IDE and 4) debug. Is this a correct view? If so, are you getting from step 3 to step 4?

Michael K
Senior III
January 31, 2020

The error in final launch sequence is because the linker script generated in CubeIDE doesn't allocate a memory space for QUADSPI, so it just places all that at the beginning of the file and tries to overwrite reserved memory. Copy the linker script from the gcc folder into your CubeIDE project and it should solve that issue.

Embedded UI/UX Consulting: cadenza.design
Chandler
ChandlerAuthor
Associate II
January 31, 2020

Thanks for that tip. I found the link file (STM32F746NGHX_FLASH.ld) in the gcc folder as you said, and replaced the link file generated in my project with it. I get the same result. I also note that the original file I replaced does seem to allow for the QUADSPI, as indicated here:

/* Memories definition */

MEMORY

{

 RAM    (xrw) : ORIGIN = 0x20000000, LENGTH = 320K

 FLASH  (rx)  : ORIGIN = 0x8000000,  LENGTH = 1024K

 QUADSPI (r)   : ORIGIN = 0x90000000, LENGTH = 16M

}

I also did a side by side comparison of the two link files, using a text compare program. There are subtle differences, but I get the impression they are both doing the same thing. Good idea, but this does not seem to be the issue, unless I misunderstood your instruction. Thanks again.

DamageG
Associate II
February 2, 2020

The best I've been able to achieve is getting a TouchGFX project, that runs fine in the designer, to build in the CubeIDE but the graphics are messed up. Is there a method to debug TouchGFX designer generated code in the CubeIDE for the 769I-DISCO? As a starting point, I want to tie a gui slider to send data via UART.

Thanks in advance for any direction

LSylv
Associate II
March 14, 2020

Hi GStoc.1,

I've exactly the same problem with my cubeIDE + touchgfx.

Have you found a solution ?

(Read)Failed determine breakpoint type
Error! Failed to read target status 
Debugger connection lost.
Shutting down...

Thanks.

AGodi.1
Visitor II
April 7, 2020

Hi @Chandler​ ,

I have the exact same problem and couldn't find a solution. Have you found one yet ?

Regards,

Augustin

DamageG
Associate II
April 7, 2020

Not yet. I was able to build and connect to the debugger but the graphics are messed up for CubeIDE build. It's been so long that I forgot the steps to get past the failed breakpoint. I think you want to change the debugger settings to "under software reset"

Chandler
ChandlerAuthor
Associate II
April 7, 2020

Thanks. I have given up on this thing. I did submit a ticket and ST acknowledged they could reproduce the problem, and a fix was coming in Q2. We will see.

AGodi.1
Visitor II
April 7, 2020

Thanks for the answer, in fact I saw an answer by @Martin KJELDSEN​ in this thread. He experienced the same issues and I quote him : "I have a fix for this CubeIDE debugger issue. I just forgot to upload a new template - Will get on it ASAP!".

Martin KJELDSEN
Principal III
April 7, 2020

For now, manually add the startup code (.s) file to your project for linking. The issue is that Eclipse based IDEs somehow define a weak symbol for the reset handler (in the .s file), but the .s file is not in the Application Template.

/Martin

AGodi.1
Visitor II
April 8, 2020

Thanks a lot, this works well !

Martin KJELDSEN
Principal III
April 8, 2020

That's great! I added the .s file for gcc to the AT - It's in the top of this post. You could try that out and get back to me and i'll be sure to upload it.

/Martin

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
April 8, 2020

Before i finalize this and upload it, i just want to make sure it's working for you as well in CubeIDE (Version will be bumped to 3.0.1).

Unzip the file and find a .tpa, template file inside. Overwrite your existing .tpa file at %APPDATA%/TouchGFX-4.13.0\STM32F746G_DISCO\3.0.0.

Make sure to define an external flashloader for the external flash on the F746G-DISCO in the CubeIDE debugger settings.

/Martin

AGodi.1
Visitor II
April 8, 2020

The TouchGFX project generation works but I can't import it in CubeIDE.

There is no error message but the project doesn't show up in the project explorer

edit: I already had a projet with the default name ...

Chandler
ChandlerAuthor
Associate II
April 28, 2020

I have confirmed that this works, as Diego B. has also attested. The new tpa file, used in conjunction with selecting the correct external loader option in the debugger configuration, fixes the problem. We now have a fully integrated, seamless connection between IDE and GFX, at least for the 746 board (also of note, I am using IDE v1.3.1, for what it's worth). I will assume this is rolling out across the spectrum of all the available templates. At long last, this is a beautiful working system. Thanks to all.

Martin KJELDSEN
Principal III
April 28, 2020

I think i forgot to update the external flashloader configuration in version 3.0.1 of the AT. It'll get updated while you do it manually in the meantime.

/Martin