Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Portenta h7 h7 fails to flash with ThreadDebug (Read 11166 times)
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #20 - Jul 10th, 2021 at 11:45am
Print Post  
Just to update, I have not had success getting the MRI Debugging working on the M4 Core so far.

It appears the Thread Debug Library does support this core, and sends all events via RPC to the M7 core, but have had no success in getting this to connect at present.

Also to use the External Hardware Debuggers, I believe you need the Break Out Board for the portenta to expose the JTAG Connector, which itself is a 10 pin 0.05" connector, so another brreakout may also be needed to connect that to a standard 20pin 0.1" connector.
« Last Edit: Jul 10th, 2021 at 11:48am by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #21 - Jul 10th, 2021 at 1:32pm
Print Post  
Thank you, I hope the M4 problem is resolved soon, I appreciate you letting me know.

I have the Portenta breakout board, and I also have the 10-pin 0.050 to 20-pin 0.1 adapter for the Jlink-Ultra. It seems that the 10-pin 0.050 is the connector of choice for Cortex-based systems these days.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #22 - Jul 14th, 2021 at 7:49am
Print Post  
If you would like to try the JLink probe in advance of us adding it to the software, the attached JSON File can be used (for the M7 core initially).

1) Drop the file into the project directory, change extension from .json.txt, to just .json
2) Change the username and sketchname in the file paths as needed to suit your setup
3) Select Debug: Hardware, and Manual/Custom
4) Build and upload the project as normal, then run Debug > Attach to Process

Let us know if you have any issues around this, and once one is working it should be simple to get the STLink changes made as well.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #23 - Jul 15th, 2021 at 3:48pm
Print Post  
Thank you I will give that a try. I found that the breakout board has a 20-pin 0.05 JTAG connector and not the expected 10-pin. Looks like they made the MCU trace pins available, however, I do not have a J-Trace. Fortunately, I have that Segger adapter, pity Arduino doesn't appear to mark pin 1 on the connector Sad

Using the Segger GDBServer I have been able to connect to the M7, but it would not connect to the M4, I must be missing some magic there.

I will hopefully have a chance to try the JSON file and VisualMicro on the M7 soon.
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #24 - Jul 15th, 2021 at 4:29pm
Print Post  
Do you have a download link for OpenOCD, the version you are using.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #25 - Jul 15th, 2021 at 4:47pm
Print Post  
Thanks for the update, and the detail around the connections.

You will likely already have it installed in C:\ProgramData\VMicro\tools\openocd-0.10.0.20200213.

vMicro automatically downloads this when the tool is used by a pre-configured debugger.
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #26 - Jul 15th, 2021 at 5:00pm
Print Post  
It is not in "C:\ProgramData\VMicro", all that I see in there is "settings.xml".

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #27 - Jul 15th, 2021 at 5:12pm
Print Post  
If you download the below ZIP:
https://www.visualmicro.com/downloads/tools/openocd-0.10.0.20200213/openocd-0.10...

And create the tools folder in C:\ProgramData\VMicro, and extract the ZIP there, you should get the below folder containing multiple files (NEWS.txt etc)
Code
Select All
C:\ProgramData\VMicro\tools\openocd-0.10.0.20200213\ 



This is the same location Visual Micro uses for the future, to save duplicating the OpenOCD software.
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #28 - Jul 15th, 2021 at 5:17pm
Print Post  
Great, I got that installed, now I get a message box when I attach to process, it says "Unable to start debugging. GDB exited unexpectedly with exit code 1 (0x1). Is there a log file I can look at?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #29 - Jul 15th, 2021 at 6:21pm
Print Post  
There isn't one configured in the JSON, however in the Output > Debug window there will be two commands similar to the below:
Code
Select All
Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/jlink.cfg" -c "transport select jtag" -f "target/stm32h7x.cfg" -c "init"
Starting: c\7-2017q4\bin\arm-none-eabi-gdb.exe" --interpreter=mi 



If you run the first one (remove the "Starting: " from the start) it should show if OpenOCD can connect to the JLink and configure the target, and it will show more output in the command prompt.
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #30 - Jul 16th, 2021 at 3:26pm
Print Post  
This is the result of running the first command you posted:

Open On-Chip Debugger 0.10.0+dev-01058-g853a05287 (2020-02-13-16:41)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

jtag
Info : J-Link Ultra V5 compiled Jun 17 2021 16:45:24
Info : Hardware version: 5.00
Info : VTarget = 3.060 V
Info : clock speed 1800 kHz
Info : JTAG tap: stm32h7x.cpu tap/device found: 0x6ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x6)
Info : JTAG tap: stm32h7x.bs tap/device found: 0x06450041 (mfg: 0x020 (STMicroelectronics), part: 0x6450, ver: 0x0)
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (4) in DAP response
Error: JTAG-DP STICKY ERROR
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #31 - Jul 25th, 2021 at 3:34pm
Print Post  
Any comments on the log data I posted, plus, any news on M4 debugging? My project requires that I have the Wi-Fi stack run on the M4 so I am in a holding pattern right now.

Many thanks.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #32 - Jul 26th, 2021 at 2:08pm
Print Post  
Thanks for the update and detail.

We currently get the same error on our setup, and we will advise as soon as the solution is known.

This approach should be able to debug the M4 core as well to my knowledge as both are available via JTAG debugging.
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #33 - Jul 26th, 2021 at 2:11pm
Print Post  
Excellent, reproducibility is the first, large, step to a fix Smiley
  
Back to top
 
IP Logged
 
Sid Price
Junior Member
**
Offline


Posts: 54
Location: Tijeras
Joined: Jun 28th, 2021
Re: Portenta h7 h7 fails to flash with ThreadDebug
Reply #34 - Aug 5th, 2021 at 8:11pm
Print Post  
Just checking in again, my client is beginning to press for some results on getting code running/debugged on the H7/M4.
Thank you.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint