Sysprogs forums › Forums › VisualGDB › VisualGDB with STM32L432KC
- This topic has 8 replies, 4 voices, and was last updated 7 years, 8 months ago by support.
-
AuthorPosts
-
September 13, 2016 at 15:56 #9050honestappleParticipant
Hello,everyone. I am newbie to VisualGDB. I have downloaded the VisualGDB 5.1r6 for Windows 7 32bit and tried to debug Nucleo STM32L432KC. The OpenOCD test is ok.
Open On-Chip Debugger 0.9.0 (2016-09-01) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
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
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.257369
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
adapter speed: 480 kHz
stm32l4x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001a0 msp: 0x20000408When I pressed “F5” to debug the device, the program could be downloaded into the device successfully. The debug process could not be started and the following error was reported.
“The memroy location used for the stack (0x2000bffc) is not writable. Please check the selected device type and the link script. You can disable automatic stack checking via VisualGDB Project Properties”
The VisualGDB output:
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
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.255790
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
adapter speed: 480 kHz
stm32l4x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001a0 msp: 0x20000408
adapter speed: 4000 kHz
VisualGDB_OpenOCD_Ready
Info : accepting ‘gdb’ connection on tcp/50665
Info : device id = 0x10016435
Warn : Cannot identify target as a STM32L4 family.
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 rejectedI checked the user manual of STM32L432KC.It seems that the memory address 0x2000bffc locates in SRAM1(0x20000000-0x2000C000). I couldn’t understand why this memory address could not be writable. I tried to disable automatic stack checking through uncheck the option for validate the stack pointer, visualgdb did not check stack memory, but the above error remain.
Would anyone help me to solve this problems?
“Warn : Cannot identify target as a STM32L4 family”.
Does this warning indicate that there some wrong with the config file of OpenOCD? How to disable gdb_memory_map?September 13, 2016 at 19:26 #9052supportKeymasterHi,
This is a known issue. Basically, OpenOCD does not know the current device ID and cannot detect the FLASH characteristics for it:
Warn : Cannot identify target as a STM32L4 family.
Normally the device IDs are added by the OpenOCD maintainers fairly quickly, so we would recommend simply waiting a month or two until an update is available. We could also provide brief instructions on building OpenOCD from scratch and patching it to support the new device if you don’t want to wait for the OpenOCD guys to do that for you.
September 14, 2016 at 01:50 #9054honestappleParticipantThank you.
Would you like to give me the url about how to build and patch OpenOCD from scratch?
September 15, 2016 at 01:59 #9065supportKeymasterHi,
You can build the OpenOCD fork that we use from the sources here: https://github.com/sysprogs/openocd
You can use this MinGW environment that has all the necessary libraries: http://sysprogs.com/files/tmp/MinGW.7z
Simply search the source code for the “Cannot identify target as a STM32L4 family” line and you will see the table that checks the device IDs and selects the FLASH size based on them. Adding your device there should solve the problem.
October 11, 2016 at 23:30 #9264MartinFParticipantHi,
I’m having the same issue (I’m trying to use VisualGDB with the STM32L443RCT6) and am having some trouble getting the dependencies for this version of OpenOCD. Would you please provide a link again to the MinGW environment?
Thank you,
Martin
October 12, 2016 at 05:12 #9266supportKeymasterHi,
No problem. We have re-uploaded the MinGW archive to the old location mentioned above.
October 12, 2016 at 16:03 #9269MartinFParticipantThank you!
April 11, 2017 at 21:46 #10969sdziengeParticipantIs the MinGW environment linked above current? I’m having trouble with the STM32L496 series not being supported by OpenOCD. I pulled down the most recent source from the fork linked above and the MinGW environment, but I’m getting errors when running ./bootstrap about libtoolsize being required but not found.
April 11, 2017 at 22:33 #10975supportKeymasterThe bootstrap script (and other autotools) don’t work very well on Windows.
We would recommend getting a checkout of our OpenOCD fork that uses CMake and manually merging it with the latest code from the main OpenOCD repository. We will also do that on our side in the next couple of weeks, so you can simply wait for that.
-
AuthorPosts
- You must be logged in to reply to this topic.