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
unable to start Debug on Nucleo-144 (GDB error 0x1) (Read 442 times)
anatom74
Junior Member
**
Offline



Posts: 31
unable to start Debug on Nucleo-144 (GDB error 0x1)
Aug 6th, 2022 at 10:07am
 
Hi,

I recently tried to evaluate Nucleo-L496ZG and tried to debug (Blinky), but it seems to fail to enter debug as I get an error as seen from the picture.
Any Ideas on how to deal with this?


Code:
Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -l "{C:\Users\xxx\AppData\Local\Temp\VMBuilds\Blink\STMicroelectronics_Nucleo_144\Debug/Blink.ino_DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/stlink.cfg" -f "target/stm32l4x.cfg" -c "init; reset halt"
Starting: "C:\Users\xxx\AppData\Local\arduino15\packages\STMicroelectronics\tools\xpack-arm-none-eabi-gcc\10.3.1-2.3/bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" exited with code 1 (0x1).
 




and this is Debug output:
Code:
openocd: Open On-Chip Debugger 0.11.0+dev-gb1de116 (2021-12-09-11:34)
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 (xPack GNU Arm Embedded GCC i386) 10.2.90.20210621-git
Copyright (C) 2021 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:
<https://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"
Note: automatically using hardware breakpoints for read-only addresses.
Reset_Handler () at C:\Users\xyz\AppData\Local\arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc\startup_stm32f446xx.s:61
61	  ldr   sp, =_estack      /* set stack pointer */

Program received signal SIGINT, Interrupt.
__empty () at C:\Users\xyz\AppData\Local\arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino\hooks.c:33
33	}

Program received signal SIGINT, Interrupt.
__empty () at C:\Users\xyz\AppData\Local\arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino\hooks.c:33
33	}

Breakpoint 3, loop () at XXX\Programming projects\Arduino\My Examples\Blink/Blink.ino:34
34	  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
@"halted: PC: 0x0800026e\n"

Breakpoint 3, loop () at XXX\Programming projects\Arduino\My Examples\Blink/Blink.ino:34
34	  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
@"halted: PC: 0x0800026e\n"

Breakpoint 3, loop () at XXX\Programming projects\Arduino\My Examples\Blink/Blink.ino:34
34	  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
@"halted: PC: 0x0800026e\n"

Breakpoint 4, loop () at XXX\Programming projects\Arduino\My Examples\Blink/Blink.ino:37
37	  delay(1000);  // wait for a second
@"halted: PC: 0x08000288\n"

Breakpoint 3, loop () at XXX\Programming projects\Arduino\My Examples\Blink/Blink.ino:34
34	  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
The thread 0xfffffffe has exited with code 0 (0x0).
[Inferior 1 (Remote target) killed]
The program '' has exited with code 0 (0x0).
 

Back to top
« Last Edit: Aug 8th, 2022 at 2:45pm by anatom74 »  

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1457
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #1 - Aug 8th, 2022 at 10:44am
 
Thanks for the report, so we can investigate further could you attach the full build output with the options shown at the top of the page?

Also please attach the below file:
Code:
C:\Users\xxx\AppData\Local\Temp\VMBuilds\Blink\STMicroelectronics_Nucleo_144\Debug/Blink.ino_DebugOpenOCD.log 



Can you also confirm if it did attach and work when getting the output shown in the Debug window, but then failed to attach again afterwards? Or has it never attached?
Back to top
 
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #2 - Aug 8th, 2022 at 1:20pm
 
Log in the attachment

Also I noticed that despite I have put it into board.txt, I cannot override debugger version.

Micro Build output:
Code:
Memory Programming ...
	The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: "file:///D:/xxx/XXX%20Synology/XXX_WORK/Programming%20projects/Arduino/My%20Examples/Blink/Debug/"
Opening and parsing file: Blink.ino.bin


// MI Debugger Properties
  File          : Blink.ino.bin
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": "C:\\Users\\xyc\\AppData\\Local\\Temp\\VMBuilds\\Blink\\STMicroelectronics_Nucleo_144\\Debug",
  "MIDebuggerPath": "C:\\Users\\xyc\\AppData\\Local\\arduino15\\packages\\STMicroelectronics\\tools\\xpack-arm-none-eabi-gcc\\10.3.1-2.3/bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.11.0.20211209\\bin/openocd.exe",
  "debugServerArgs": "-d2 -l \"{C:\\Users\\xyc\\AppData\\Local\\Temp\\VMBuilds\\Blink\\STMicroelectronics_Nucleo_144\\Debug/Blink.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.11.0.20211209/scripts/\" -f \"interface/stlink.cfg\" -f \"target/stm32l4x.cfg\" -c \"init; reset halt\"",
  "setupCommands": [],
  "program": "C:/Users/xyc/AppData/Local/Temp/VMBuilds/Blink/STMicroelectronics_Nucleo_144/Debug/Blink.ino.elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": "C:\\Users\\xyc\\AppData\\Local\\Temp\\VMBuilds\\Blink\\STMicroelectronics_Nucleo_144\\Debug\\debugger_tmp.natvis",
  "showDisplayString": true
}
  Size          : 32040 Bytes
  Address       : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 15]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.268
RUNNING Program ...
  Address:      : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully 



Debug window:
Code:
Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -l "{C:\Users\xyc\AppData\Local\Temp\VMBuilds\Blink\STMicroelectronics_Nucleo_144\Debug/Blink.ino_DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/cmsis-dap.cfg" -c "adapter speed 1000" -c "transport select swd" -f "target/stm32l4x.cfg" -c "init; reset halt"
Starting: "C:\Users\xyc\AppData\Local\arduino15\packages\STMicroelectronics\tools\xpack-arm-none-eabi-gcc\10.3.1-2.3/bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" exited with code 1 (0x1).
 

Back to top
« Last Edit: Aug 8th, 2022 at 2:42pm by anatom74 »  

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1457
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #3 - Aug 8th, 2022 at 1:28pm
 
Thanks for the log file, and it doesn't really expand on the "no connection" error sadly.

Are you trying to use a different version of GDB and/or OpenOCD?

If you can attach the full build output requested, with the settings shown at the top of the page, and the local board.txt file you have in your project we will be able to assist more easily.
Back to top
 
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #4 - Aug 8th, 2022 at 2:37pm
 
Yes, there were several tryouts made with different settings. Here are the files and logs from the latest one:

Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #5 - Aug 8th, 2022 at 2:38pm
 
2nd pack of attachments
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1457
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #6 - Aug 8th, 2022 at 5:49pm
 
Thanks for the files, I can't see the full output from performing a build in Visual Micro which will help us replicate using the exact same configuration and board packages.

Can you confirm you have connected the CN4 Jumpers indicated in section 5.4.3 of the user manual?
https://www.st.com/resource/en/user_manual/um2179-stm32-nucleo144-boards-mb1312-...

Can you also confirm whether you have changed the LED Output pin in your sketch for this board?
Back to top
 
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #7 - Aug 8th, 2022 at 6:19pm
 
I assume everything is set OK, as I can use debug within STM32CubeIDE.

Regarding full build output - shall I log it in some different way?
Back to top
 
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #8 - Aug 8th, 2022 at 8:52pm
 
I installed new version of Arduinio and now it suddenly worked.
Smiley
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1457
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #9 - Aug 9th, 2022 at 1:20pm
 
Thanks for the update.

Can you clarify if this is a new version of the Arduino IDE, or if you updated the STM32 board package?
Back to top
 
 
IP Logged
 
anatom74
Junior Member
**
Offline



Posts: 31
Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Reply #10 - Aug 9th, 2022 at 6:50pm
 
In fact it seems it was not related to Arduino update (board package was anyway always ver 2.3.0), but USB support option. If enabled, debug error pops out, If disabled (set to None or set to HID), debugging works.
Is this maybe a known limitation?
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print