EmbDev.net

Forum: ARM programming with GCC/GNU tools Helios GDB hardware debugging & JLink


Author: wayne roberts (dudmuck)
Posted on:

Rate this post
0 useful
not useful
I try Helios (for C/C++), using GDB hardware debugging with JLink.
It has CDT already installed, and I installed GDB Hardware Debugging 
7.0.0.201109151620

I try it with Segger J-Link, with gdb command arm-none-eabi-gdb from 
eclipse.
I am building STM32Test from yagarto.
I pasted scripts stm32_ram_jlink_[12].gdb into startup tab of Debug 
Configurations, but...

When I start debugging, I get error dialog "Error in final launch 
sequence"
with details of:
Error message from debugger back end:
Undefined command: "".  Try "help". ,Failed to execute MI command:


Yet the SEGGER J-Link GDB server log window shows success:
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x20005000)
Target endianess set to "little endian"
JTAG speed set to 5 kHz
Resetting target
Sleep 100ms
Select auto JTAG speed (2000 kHz)
Writing 0x20000000 @ address 0xE000ED08
Read 4 bytes @ address 0x00000000 (Data = 0x20005000)
Connection closed!

So the J-Link GDB server is executing commands properly, but eclipse is 
not seeing that success.

Author: Zox (Guest)
Posted on:

Rate this post
0 useful
not useful
what happens if you start the gdb manually and have it connect to the 
dgb-server (target remote command)?

If that works you can check the helios - gdb connection

Zox

Author: 900ss (Guest)
Posted on:

Rate this post
0 useful
not useful
In the manual of the J-Link is a description how to use it with Eclipse.
And it works :-)

Author: wayne roberts (dudmuck)
Posted on:

Rate this post
0 useful
not useful
Thanks for the reply.

#### I try gdb from command line:
$ arm-none-eabi-gdb.exe -se test_ram.elf
GNU gdb (GDB) 7.2
Copyright (C) 2010 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-pc-mingw32 
--target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>;...
Reading symbols from C:\src\stm32test/test_ram.elf...done.
0x00000000 in ?? ()
Target endianess set to "little endian"
JTAG speed set to 5 kHz
Resetting target
Sleep 100ms
Select auto JTAG speed (2000 kHz)
Writing 0x20000000 @ address 0xE000ED08
(gdb) load test_ram.elf
Loading section .text, size 0xf3c lma 0x20000000
Loading section .data, size 0x18 lma 0x20000f3c
Start address 0x20000000, load size 3924
Transfer rate: 61 KB/sec, 1962 bytes/write.
(gdb) n
Single stepping until exit from function gVectors,
which has no line number information.
HardFault_Handler () at src/vectors_stm32f10x_md.c:173
173     void HardFault_Handler (void) { while(1); }
(gdb)

#### and log of segger jlink gdb server:
Select auto JTAG speed (2000 kHz)
Writing 0x20000000 @ address 0xE000ED08
Downloading 3900 bytes @ address 0x20000000
Downloading 24 bytes @ address 0x20000F3C
Writing register (PC = 0x20000000)
Read 4 bytes @ address 0x20000000 (Data = 0x20005000)
Performing single step...
...Target halted (PC = 0x2000074C)
Reading all registers
Read 4 bytes @ address 0x2000074C (Data = 0xBF00E7FE)
WARNING: Failed to read cacheable memory @ address 0xFFFFFFF8
Read 4 bytes @ address 0xFFFFFFF8 (Data = 0xBF00E7FE)

So gdb and segger jlink appears to work correctly.
(the yagarto STM32Test.zip may not be perfect for my STM32F103RBT6)
I think my problem is with helios to gdb interface.

Author: wayne roberts (dudmuck)
Posted on:

Rate this post
0 useful
not useful
I was using indigo.
My mistake.  Works fine with Helios 3.6.2
Yet looking further now, it seems the ODeV/stf12 effort might be better.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.