Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 

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 and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
J-Link Pro + Portenta H7 (Read 291 times)
rs 77tmp
Junior Member
**
Offline



Posts: 22
J-Link Pro + Portenta H7
Aug 31st, 2022 at 7:52pm
 
I received the above, as well as the Segger cable that is requried as well (8.06.00 - 19/20 pin 0.05" pitch).

I downloaded the software driver from segger and installed it.

IO then did what was said in this video

https://www.youtube.com/watch?v=ZRyg2qzIk2Q

I switched the driver to the WinUSB driver. In device manager, this is the driver installed 6.1.7600.16385, and "the device is working properly".

I then started Visual Studio/micro, and opened my portenta H7 project.

I click Debug: Hardware, but the J-Link never shows up in the field over, just Manual/Custom or F232H Mini Module.

Any ideas what I can try next?

Thanks
Back to top
 
 
IP Logged
 
rs 77tmp
Junior Member
**
Offline



Posts: 22
Re: J-Link Pro + Portenta H7
Reply #1 - Aug 31st, 2022 at 8:37pm
 
These are the same as the last email I sent (for the previous forum post 1661903359).

Resent.

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



Posts: 1459
Re: J-Link Pro + Portenta H7
Reply #2 - Aug 31st, 2022 at 8:44pm
 
Thanks apologies for missing that.

If you install the "Arduino MBED OS Portenta Boards" Package this will show all debug options as expected.

The current "Arduino MBED OS" board package currently installed has been deprecated in favour of being split out into the separate packages for Nano / RP2040 / Portenta.
Back to top
 
 
IP Logged
 
rs 77tmp
Junior Member
**
Offline



Posts: 22
Re: J-Link Pro + Portenta H7
Reply #3 - Aug 31st, 2022 at 9:01pm
 
I never realized I had the wrong board applied the whole time. (I use the correct one in the Arduino IDE)

A couple of questions before I test.

Does the use of the hardware debugger now allow full use of Serial.print mesages as well.

Should I use the
Segger J-Link
or
Segger J-Link NoOpenOCD

Thanks again
Back to top
« Last Edit: Aug 31st, 2022 at 9:03pm by rs 77tmp »  
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1459
Re: J-Link Pro + Portenta H7
Reply #4 - Aug 31st, 2022 at 9:17pm
 
No problem, it has been confusing as these MBED packages have matured, and it may also impact the compile time for your project in a positive way.

The simplest approach is to use the "Segger J-Link" to begin with for the M7 core.

The "Segger JLink NoOpenOCD option is for when you want to debug the M4 core and the M7 core at the same time, which is shown on the "Segger JLink Dual Core" Tab of the below page:
https://www.visualmicro.com/page/PortentaM7-Debugging.aspx
Back to top
 
 
IP Logged
 
rs 77tmp
Junior Member
**
Offline



Posts: 22
Re: J-Link Pro + Portenta H7
Reply #5 - Aug 31st, 2022 at 9:36pm
 
Getting it to work.

Able to look at some vars etc.

Serial.Print seems to work at the same time. (not as necessary any more, but still useful).

Question, because part of the reason for this is that I want to use LVGL to use a USB-C to HDMI connection for video output. I am considering doing the video connection via  the M4 core (although this may not be necessary as the M7 core does not seem to be struggling with everything thrown at it so far).

Will the debugger be able to upload and run with nil attached to the UCB port (except the monitor adapter)? ie everything happens through the JTAG connector.

Thanks one more time
Back to top
 
 
IP Logged
 
rs 77tmp
Junior Member
**
Offline



Posts: 22
Re: J-Link Pro + Portenta H7
Reply #6 - Aug 31st, 2022 at 11:39pm
 
I managed to get it to work a couple of times and now it seems to be unable to upload the compiled code.

I have a project installed and running via Arduino IDE (COM9 is active).

I use Debug->Start Debugging, and it reports No Available DFU (I have removed by macro all the Serial.print statements - just in case)

Code:
Program EnviroWatch size: 495,484 bytes (used 63% of a 786,432 byte maximum) (402.91 secs)
Minimum Memory Usage: 90512 bytes (17% of a 523624 byte maximum)

# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: "file:///Z:/User/SALASOFT/Constr/Envirowatch/Code/MainCode/EnviroWatch/Debug/"

Uploading 'EnviroWatch' to 'Arduino Portenta H7 (M7 core)  (Duplicate)                                                                       (envie_m7_mbed_portenta)' using 'COM9'
dfu-util 0.10-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util 0.10-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

The uploader returned an error
# Copy build result to 'Project>Property Pages>Intermediate Directory'
Warning: Invalid DFU suffix signature
# Destination: "file:///Z:/User/SALASOFT/Constr/Envirowatch/Code/MainCode/EnviroWatch/Debug/"

A valid DFU suffix will be required in a future dfu-util release
No DFU capable USB device available
Build Clean 'EnviroWatch' 




I then double click the reset button on the portenta, and I have COM8 available - which I set on the COM port setting on Visual Studio. I recompile with Debug->StartDebugging. It seems to upload OK (LEDs on J-Link blinks appropriately).  Then the following message comes up

Code:
openocd: Open On-Chip Debugger 0.10.0+dev-01058-g853a05287 (2020-02-13-16:41)
openocd: Licensed under GNU GPL v2
openocd: For bug reports, read
openocd: 	http://openocd.org/doc/doxygen/bugs.html
openocd: debug_level: 2
openocd:
=thread-group-added,id="i1"
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
=cmd-param-changed,param="pagination",value="off"
0x00448290 in ?? ()
Note: automatically using hardware breakpoints for read-only addresses.
Warning: Exceptions are not supported in this scenario.
Debugger was unable to continue the process.

The program '' has exited with code 4294967295 (0xffffffff).
 



I sent the verbose build file by email.

Just to mention, the Portenta is just sitting there, no SOS blink or anything. The code is not running, and no serial ports are exposed (neither COM8 nor the usual runtime COM9 in my case).

All very weird, because it did work once, and was debugging, until it seemed to hang for 10-15 minutes (had to task manager end visual studio to get out), and I have not been able to get it back on line since.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1459
Re: J-Link Pro + Portenta H7
Reply #7 - Sep 1st, 2022 at 3:08pm
 
Can you check in task manager that there are no orphaned OpenOCD.exe or arm-none-eabi-gdb.exe processes?  (If they exist when not debugging they can be killed)

We haven't currently configured the upload via JLink properties for this board, and we can update this thread when this is available, however to upload to both cores would require two separate upload operations (one for each core, after changing the board selection if using one IDE instance).

Back to top
« Last Edit: Sep 1st, 2022 at 5:37pm by Simon@Visual Micro »  
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1459
Re: J-Link Pro + Portenta H7
Reply #8 - Sep 1st, 2022 at 5:38pm
 
One route to try out the (untested) upload facility at your own risk is:

1) First select the vMicro > Uploader > Hardware Programmer : STMicroelectronics STLINK.
2) Then add a Local board.txt to your project (vMicro > Add Code > Add Local Board.txt), and put the below lines in:
Code:
envie_m4.bootloader.programmer=-f interface/jlink.cfg
envie_m7.bootloader.programmer=-f interface/jlink.cfg 



If you try this and have success it will be simple for us to integrate this into the standard list of upload tools available for this board.

Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print