VS Arduino
>> >> unable to start Debug on Nucleo-144 (GDB error 0x1)
https://www.visualmicro.com/forums/YaBB.pl?num=1659776825

Message started by anatom74 on Aug 6th, 2022 at 9:07am

Title: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 6th, 2022 at 9: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).
[/code):




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).

err1.png ( 10 KB | 1 Download )

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by Simon@Visual Micro on Aug 8th, 2022 at 9: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[/code]

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?

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 8th, 2022 at 12: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).
[/code]
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Blink_ino_DebugOpenOCD.ino ( 0 KB | 8 Downloads )

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by Simon@Visual Micro on Aug 8th, 2022 at 12: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.

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 8th, 2022 at 1:37pm
Yes, there were several tryouts made with different settings. Here are the files and logs from the latest one:


https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=build_output_019.txt ( 1407 KB | 2 Downloads )
settings_001.jpg ( 231 KB | 0 Downloads )

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 8th, 2022 at 1:38pm
2nd pack of attachments
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=debug_output.txt ( 0 KB | 2 Downloads )
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Blink_ino_DebugOpenOCD.txt ( 0 KB | 3 Downloads )

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by Simon@Visual Micro on Aug 8th, 2022 at 4: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-stmicroelectronics.pdf

Can you also confirm whether you have changed the LED Output pin in your sketch for this board?

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 8th, 2022 at 5: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?

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 8th, 2022 at 7:52pm
I installed new version of Arduinio and now it suddenly worked.
:)

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by Simon@Visual Micro on Aug 9th, 2022 at 12: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?

Title: Re: unable to start Debug on Nucleo-144 (GDB error 0x1)
Post by anatom74 on Aug 9th, 2022 at 5: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?

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