cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE Debugging -- Proper Sequence?

Chandler
Associate II

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**

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

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

View solution in original post

24 REPLIES 24
HP
Senior III

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.

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

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.

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

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

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
Associate II

Hi @Chandler​ ,

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

Regards,

Augustin

DamageG
Associate II

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
Associate II

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.