EmbDev.net

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


von wayne r. (dudmuck)


Rate this post
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.

von Zox (Guest)


Rate this post
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

von 900ss (Guest)


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

von wayne r. (dudmuck)


Rate this post
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.

von wayne r. (dudmuck)


Rate this post
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.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.