Fwd: STM32F07x GDB remote debug

20 views
Skip to first unread message

Tony Wang

unread,
Aug 3, 2014, 11:10:51 PM8/3/14
to chaos....@gmail.com, g.de...@cobra-at.com, rt-threa...@googlegroups.com, rt-thre...@googlegroups.com, bernar...@gmail.com
Hi grissiom and bernard,

Giordano is interested in the gdb stub on cortex M profile, and
preparing to implemented it on m0. As I think rt-thread is already
doing so, maybe you can have a brief introduction about the gdb stub
based on rt-thread as the CSDN are all in Chinese. You can refer to
this link for more detailed information:
https://answers.launchpad.net/gcc-arm-embedded/+question/251829.

Hi Giordano,

Grissiom and Bernard are the maintainer of rt-thread, and they're
preparing to implement a gdb stub you mentioned on the launchpad. I
think if you can implement the m0 version based on their framework, it
would be much easier for you to achieve your goal.

BR,
Tony

bernard

unread,
Aug 4, 2014, 4:38:41 AM8/4/14
to Giordano De Maria, Tony Wang, Grissiom Gu, rt-thread用户组, rt-thre...@googlegroups.com
Hi Tony & Giordano,
I think wzyy2 & grissiom's gdb stub implementation is based on ARM Cortex-A8, BeagleBone Board. However, in ARM Cortex-M, the code is running on the built-in flash of chip. It's hard to change or modify code to plug a software breakpoint there. I have no idea about gdb stub implementation on Cortex-M chip.  




Best Regards, 
Bernard Xiong



2014-08-04 15:00 GMT+08:00 Giordano De Maria <g.de...@cobra-at.com>:
Hi Tony,
thank you for the info: I will wait for details.
Kind regards.

        Giordano


Da: Tony Wang <wangzh...@gmail.com>
Per: chaos....@gmail.com, g.de...@cobra-at.com, rt-threa...@googlegroups.com, rt-thre...@googlegroups.com, bernar...@gmail.com
Data: 04/08/2014 05:10
Oggetto: Fwd: STM32F07x GDB remote debug


Tony Wang

unread,
Aug 4, 2014, 4:52:57 AM8/4/14
to bernard, Giordano De Maria, Grissiom Gu, rt-thread用户组, rt-thre...@googlegroups.com
Hi bernard,

Thanks for your reply. Is it possible to move the flash code to ram if the user image isn't so big, or use the hardware debug unit? It looks like the debug unit can only be accessed by dap.

BR,
Tony

Grissiom

unread,
Aug 4, 2014, 10:22:46 AM8/4/14
to Tony Wang, jacobc...@foxmail.com, Giordano De Maria, bernard, rt-thread用户组, rt-thre...@googlegroups.com
Hi Tony and Giordano,

The GDB stub for RT-Thread project is currently on: https://code.csdn.net/wzyy2/gdbstub4rtt and is not merged to RTT yet. You may get a brief idea from there but the code is subjected to refactories.

On Mon, Aug 4, 2014 at 4:52 PM, Tony Wang <wangzh...@gmail.com> wrote:
Hi bernard, 
Thanks for your reply. Is it possible to move the flash code to ram if the user image isn't so big, or use the hardware debug unit? It looks like the debug unit can only be accessed by dap.


IIRC, the current implementation is based on the instruction substitution. So it is suitable for code that running in the RAM. But it is *technically possible* to take use of hardware breakpoints(Break Point Unit(BPU) and Data Watchpoint Unit(DWU) in the ARM Cortex-M0 core). So it could break on the code in flash. This method has limitations and one cannot set more break points than the hardware supports.

The debug units are just memory-mapped IO and can be accessed by any code, including the GDB stub itself.



--
Cheers,
Grissiom
Reply all
Reply to author
Forward
0 new messages