Forum Replies Created
-
AuthorPosts
-
tm123Participant
Point one is what I was looking for, just wanted to see a proper utilization calculation. Thanks
tm123ParticipantYup it’s fixed. Thanks!
tm123ParticipantIt seems to be happening when VisualGDB starts the “Loading project structure…” process. This triggers whenever the CMakeLists.txt file gets saved. It loads everything except the header files.
tm123ParticipantTried it out and it works! Good job guys!
On a special note since users might stumble upon this, I had to jump through some hoops to get my J-Link Mini EDU working with this through OpenOCD.
This was regarding this error;
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Warn : Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.
Error: No J-Link device found.
- Update your J-Link firmware with J-Link Configurator
- Download Zadig from https://zadig.akeo.ie/
- Go to Options -> List All Devices
- Select “J-Link” in the drop-down
- Replace the driver with “WinUSB” one
All your regular J-Link apps like Commander and Configurator will stop working until you uninstall it from Device Manager but OpenOCD should now detect it and work with the Pico.
Cheers.
- This reply was modified 3 years, 9 months ago by tm123.
tm123ParticipantAwesome, thanks.
tm123ParticipantIf it’s any help this is the actual error;
VisualGDB version: 5.5.7.3666
------------------ System.InvalidOperationException ------------------
System.InvalidOperationException: There is an error in XML document (2, 2). ---> System.InvalidOperationException: <device xmlns=''> was not expected.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMCUDefinition.Read8_MCUDefinition()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at BSPEngine.XmlTools.LoadObject[_Ty](String xmlFile, Type[] extraTypes)
at VisualGDB.Add_In.Tool_Windows.WPF.HardwareRegisters.HardwareRegistersToolControl.ControllerImpl.ImportRegisterDefinition(Boolean isAuxiliary)
trace=[System.Xml.Serialization.XmlSerializer.Deserialize:283, System.Xml.Serialization.XmlSerializer.Deserialize:21, BSPEngine.XmlTools.LoadObject:49, VisualGDB.Add_In.Tool_Windows.WPF.HardwareRegisters.HardwareRegistersToolControl+ControllerImpl.ImportRegisterDefinition:147]
------------------ Inner exception ------------------
------------------ System.InvalidOperationException ------------------
System.InvalidOperationException: <device xmlns=''> was not expected.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMCUDefinition.Read8_MCUDefinition()
trace=[Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMCUDefinition.Read8_MCUDefinition:0]
tm123Participanthttps://mcuxpresso.nxp.com/download/0fe377594c9f733529173adcf7bde340
The file was under devices>MIMXRT1021, it’s just labelled “MIMXRT1021.xml”
tm123ParticipantThe file originally ships as a .xml extension and it seems renaming the file to the .svd extension fixed it. It loaded in properly after feeding it in. Awesome, glad it’s supported.
tm123ParticipantNo worries, thanks for pointing out the tutorial and the tool, I’ll attempt it at some point.
tm123ParticipantAwesome, it is working again. Great work!
tm123ParticipantThat made it further however there’s still more issues, apparently it can’t see it as an L4 or WB.
Open On-Chip Debugger 0.10.0 (2020-02-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 500 kHz
Info : STLINK v3 JTAG v6 API v3 M2 VID 0x0483 PID 0x374E
Info : using stlink api v3
Info : Target voltage: 3.294400
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : Stlink adapter speed set to 200 kHz
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 56724 for gdb connections
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : Stlink adapter speed set to 200 kHz
Info : Unable to match requested speed 500 kHz, using 200 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08003310 msp: 0x20005800
VisualGDB_OpenOCD_Ready
Info : Listening on port 6666 for tcl connections
Info : Listening on port 56723 for telnet connections
Info : accepting 'gdb' connection on tcp/56724
Warn : Cannot identify target as an STM32 L4 or WB family device.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
tm123ParticipantYou’re right, it is an STM32 issue. My apologies.
I did find the issue however. Inside “stm32f7xx_hal_conf.h” the HSE_VALUE is defined as “25000000” which is incorrect. The MCO clock (HSE) coming from the ST-Link is 8MHz so it needs to be changed to “8000000”. There is no 25MHz clock anywhere on this board.
#if !defined (HSE_VALUE)
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */tm123ParticipantGood to know but this is a file I wrote from scratch and I only ever used and learned to write ARM assembler using Keil.
tm123ParticipantProblem solved! I put the .thumb directive in the wrong place and needed .syntax unified to go with it;
I had to convert;
AREA |.text|, CODE, READONLY, ALIGN=2
THUMB
PRESERVE8To this;
.thumb
.syntax unified
.section .text, “ax”
.balign 4
.eabi_attribute Tag_ABI_align_preserved, 1It compiles now.
tm123ParticipantSo apparently it’s because Keil uses different assembly directives than GCC and I switched to the proper ones.
Now the issue is that Keil assembly allows you to access registers 8 to registers 12 using thumb mode but GCC doesn’t. And if you force arm mode it doesn’t compile because the processor won’t let it.
-
AuthorPosts