VS Arduino
Visual Micro >> General Board >> J-Link Pro + Portenta H7
https://www.visualmicro.com/forums/YaBB.pl?num=1661971939

Message started by rs 77tmp on Aug 31st, 2022 at 6:52pm

Title: J-Link Pro + Portenta H7
Post by rs 77tmp on Aug 31st, 2022 at 6: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

Title: Re: J-Link Pro + Portenta H7
Post by rs 77tmp on Aug 31st, 2022 at 7:37pm
These are the same as the last email I sent (for the previous forum post 1661903359).

Resent.

Robert

Title: Re: J-Link Pro + Portenta H7
Post by Simon@Visual Micro on Aug 31st, 2022 at 7: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.

Title: Re: J-Link Pro + Portenta H7
Post by rs 77tmp on Aug 31st, 2022 at 8: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

Title: Re: J-Link Pro + Portenta H7
Post by Simon@Visual Micro on Aug 31st, 2022 at 8: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

Title: Re: J-Link Pro + Portenta H7
Post by rs 77tmp on Aug 31st, 2022 at 8: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

Title: Re: J-Link Pro + Portenta H7
Post by rs 77tmp on Aug 31st, 2022 at 10: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'[/code):




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.

Title: Re: J-Link Pro + Portenta H7
Post by Simon@Visual Micro on Sep 1st, 2022 at 2: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).


Title: Re: J-Link Pro + Portenta H7
Post by Simon@Visual Micro on Sep 1st, 2022 at 4: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[/code]

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.


VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.