2019-05-12 06:26 PM
After I click DEBUG ,it shows that
Error in initializing ST-LINK device.
Reason: No device found on target.
I think it's not hardware's problem because I can download my program in Keil uvision successfully. and my debug configuration is showed as follows:
2019-05-13 07:52 AM
Under the "Enable live expressions" there's a box where you can enable a log. Can you activate that one, make a new try to debug and then send me the log?
2019-05-13 08:31 PM
I was getting that same issue. I uninstalled cubeIDE and reinstalled by right-clicking and run as administrator. All good now. I think there was some driver configuration issue.
2019-05-13 10:17 PM
I activated it, and this is the contents of the file “st-link_gdbserver_log.txt�?
[0.001] initConfigParams(): Configuration flags start
[0.001] initConfigParams(): config-file ""
[0.001] initConfigParams(): persistent false
[0.001] initConfigParams(): +log-file "/Users/ruanjinhao/文档/CubeMXFiles/TEST/Debug/st-link_gdbserver_log.txt"
[0.001] initConfigParams(): +log-level 31
[0.001] initConfigParams(): +port-number 61234
[0.001] initConfigParams(): +verbose true
[0.001] initConfigParams(): refresh-delay 15
[0.001] initConfigParams(): +verify true
[0.001] initConfigParams(): +swd true
[0.001] initConfigParams(): swo-port 61234
[0.001] initConfigParams(): cpu-clock 8000000
[0.001] initConfigParams(): swo-clock-div 128
[0.001] initConfigParams(): initialize-reset false
[0.001] initConfigParams(): debuggers false
[0.001] initConfigParams(): serial-number ""
[0.001] initConfigParams(): +apid 0
[0.001] initConfigParams(): attach false
[0.001] initConfigParams(): shared false
[0.001] initConfigParams(): erase-all false
[0.001] initConfigParams(): memory-map ""
[0.001] initConfigParams(): ext-memory-loaders false
[0.001] initConfigParams(): extload ""
[0.001] initConfigParams(): +stm32cubeprogrammer-path "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_1.0.0.201904021149/tools/bin"
[0.001] initConfigParams(): temp-path ""
[0.001] initConfigParams(): preserve-temps false
[0.001] initConfigParams(): licenses false
[0.001] initConfigParams(): ignore-rest false
[0.001] initConfigParams(): version false
[0.001] initConfigParams(): help false
[0.001] initConfigParams(): Configuration flags end
[0.001] init(): STMicroelectronics ST-LINK GDB server. Version 5.2.3
Copyright (c) 2019, STMicroelectronics. All rights reserved.
[0.007] Device_Initialise(): Target no device found
[0.007] initServerContext():
Error in initializing ST-LINK device.
Reason: [0.007] initServerContext(): No device found on target.
2019-05-13 10:20 PM
Thank you, but it still doesn't work.
2019-05-14 05:35 AM
How is your workspace and installation set up?
I noticed the log gets logged to "文档/CubeMXFiles/TEST/Debug/st-link_gdbserver_log.txt" and any non-ascii characters in workspace path, installation path, project name or workspace name can give bad results.
2019-05-14 08:31 AM
Aren't we all using UNICODE these days? I worked on Windows stuff a decade or so ago, you really can't expect file system stuff to all be "Western/European", the Japanese and Chinese versions of Windows allow for completely different configurations/expectations.
Spaces in files, "faux" files on the Desktop, and in Program Files directories should also be handled. If using 8-bit file paths, be conscious of double-byte character codes.
2019-05-14 04:51 PM
I changed my workspace path into English and reinstalled CubeIDE, but this error still exists. and this is the new "st-link_gdbserver_log.txt"
[0.000] initConfigParams(): Configuration flags start
[0.000] initConfigParams(): config-file ""
[0.000] initConfigParams(): persistent false
[0.000] initConfigParams(): +log-file "/Users/ruanjinhao/STM32CubeIDE/workspace_1.0.0/TEST/Debug/st-link_gdbserver_log.txt"
[0.000] initConfigParams(): +log-level 31
[0.000] initConfigParams(): +port-number 61234
[0.000] initConfigParams(): +verbose true
[0.000] initConfigParams(): refresh-delay 15
[0.000] initConfigParams(): +verify true
[0.000] initConfigParams(): +swd true
[0.000] initConfigParams(): swo-port 61234
[0.000] initConfigParams(): cpu-clock 8000000
[0.000] initConfigParams(): swo-clock-div 128
[0.000] initConfigParams(): initialize-reset false
[0.000] initConfigParams(): debuggers false
[0.000] initConfigParams(): serial-number ""
[0.000] initConfigParams(): +apid 0
[0.000] initConfigParams(): attach false
[0.000] initConfigParams(): shared false
[0.000] initConfigParams(): erase-all false
[0.000] initConfigParams(): memory-map ""
[0.000] initConfigParams(): ext-memory-loaders false
[0.000] initConfigParams(): extload ""
[0.000] initConfigParams(): +stm32cubeprogrammer-path "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_1.0.0.201904021149/tools/bin"
[0.000] initConfigParams(): temp-path ""
[0.000] initConfigParams(): preserve-temps false
[0.000] initConfigParams(): licenses false
[0.000] initConfigParams(): ignore-rest false
[0.000] initConfigParams(): version false
[0.000] initConfigParams(): help false
[0.000] initConfigParams(): Configuration flags end
[0.000] init(): STMicroelectronics ST-LINK GDB server. Version 5.2.3
Copyright (c) 2019, STMicroelectronics. All rights reserved.
[0.006] Device_Initialise(): Target no device found
[0.006] initServerContext():
Error in initializing ST-LINK device.
Reason: [0.006] initServerContext(): No device found on target.
2019-05-15 06:37 AM
So neither workspace path nor installation path have any non-ascii characters now?
Is it some kind of custom board? I would make sure contact with the board is good and also make sure you point out the correct ST-Link in the debug configuration if you have multiple connected or perhaps a previous one saved.
Do you have TrueSTUDIO or stand alone CubeProgrammer installed? If so, what are the results with those tools?
This error is usually due to a simple connectivity issue.
Regarding the support of japanese and chinese characters for example, @Community member :
It would probably not take too much of an effort for the IDE part to support it but there were so many critical components that we integrate into CubeIDE that does not support it that we decided against it.
2019-05-16 12:58 AM
yes,both paths are correct. I haven't tried truestudio so I don't how it runs in my mac. I use Keil MDK now, it works very well. I think I will give up using cubeIDE…