Auto-launch arm-none-eabi-gdb after upload script

User avatar
RogerClark
Posts: 6911
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by RogerClark » Wed May 13, 2015 11:12 am

Hi Rick,

FYI.

I posted to the Arduino Developers mailing list (i.e the IDE developers), to find out how they intended to support he in-circuit debugging on the Arduino Zero

Well, I havent got a response from the dev's yet (I may never), but someone suggested I use DDD

I'd tried to compile DDD on windows but it won't, as it looks like it was never test compiled under MingW on windows

So I thought I'd try compiling on my Linux 32 machine.

Well, its just as bad. :-( but fails differently

Firstly its a sod to get all the necessary development libs installed, there doesn't seem to be a list of the required libs, or a script to apt-get install them for you. (as far as I can tell)

So I had to run configure over and over again and each time it failed with a cryptic message, I'd have to track down the necessary lib and install it.

When I finally got past the configure script stage, and ran Make, it fails to compile

So...

It looks like DDD is another non starter

Hence Exclipse is looking the best bet at the moment, but...

But I can't find any docs on whether there is a Windows version of the Eclipse Standalone debugger.

The percentage of Linux users is probably 20% on this forum , possibly lower.

So unless we can get a cross platform solution, I'm not sure how much take up there would be

Albeit if we an get a Windows version working, I think it would be a game changer ;-)

User avatar
ahull
Posts: 1597
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by ahull » Wed May 13, 2015 11:01 pm

I don't want to sound smug, but ddd installs first time and launches without problems on Linux (Ubuntu 14.04.2 LTS )

I think the magic you are looking for is...

Code: Select all

sudo apt-get install ddd libmotif-common libmrm4 libuil4 libxm4 ddd-doc pydb glibc-doc
- Andy Hull -

User avatar
RogerClark
Posts: 6911
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by RogerClark » Wed May 13, 2015 11:09 pm

@ahull

Thanks

I'll give that a try

It does however mean that DDD is a Linux only solution, because we can't do the same thing

Well, I know it won't work under MinGW


I've posted to the Eclipse forum in the hope someone can help on how to install the debugger under Windows

User avatar
RogerClark
Posts: 6911
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by RogerClark » Thu May 14, 2015 10:08 am

Edit.

I've instaleld using the apt-get you sent, and DDD now seems to run, but I'm not going ot have time until the weekend to see how to use it.

BTW. I posted to the Eclipse users forum to find out about the Standalone debugger on windows, but my post has to be moderated so I don't know when if ever I'll get a reply

victor_pv
Posts: 1650
Joined: Mon Apr 27, 2015 12:12 pm

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by victor_pv » Tue Jun 02, 2015 7:33 pm

To add some to this thread, based on the work from Roger and Rick, I wrote a batch for Windows that launches Texane and GDB after a DFU upload.
I'm sure the same could be done for an stlink upload, I just don't use that upload method. I want to test it a bit more and then will post the batch and the modified platform file here.

User avatar
martinayotte
Posts: 1222
Joined: Mon Apr 27, 2015 1:45 pm

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by martinayotte » Tue Jun 02, 2015 9:39 pm

Do you mean that after upload using dfu-util, you start texane/st-util for debugging with GDB ?
I will try to linuxify your script when it will become available, because I still didn't received my STLink clone from China.

victor_pv
Posts: 1650
Joined: Mon Apr 27, 2015 12:12 pm

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by victor_pv » Wed Jun 03, 2015 8:23 pm

martinayotte wrote:Do you mean that after upload using dfu-util, you start texane/st-util for debugging with GDB ?
I will try to linuxify your script when it will become available, because I still didn't received my STLink clone from China.
That's right, my batch launches the maple_dfu upload, then Texane, and GDB.
I dont know how the dfu-util works in Linux, but I got the idea from Rick's BMP upload, so I'm sure it can be linuxified ;)

User avatar
martinayotte
Posts: 1222
Joined: Mon Apr 27, 2015 1:45 pm

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by martinayotte » Tue Jun 09, 2015 10:43 pm

@victor, could you attached your batch file here ? (I've just received today my STLink from China :) )

User avatar
martinayotte
Posts: 1222
Joined: Mon Apr 27, 2015 1:45 pm

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by martinayotte » Wed Jun 10, 2015 1:39 am

I've started playing with my STLink tonight !
I seems to work fine with STM32F4Stamp board (an F405) with txeane/st-util and gdb, that will be nice for my future debugging.
But trying the same on my Maple Mini Baite clone, st-util responded "stlink-common.c: unknown chip id! 0xe0042000" ... :(
Is there something I missed ? Are those Baite clones really use genuine chip ? or is it a bug in texane ?

User avatar
Rick Kimball
Posts: 1014
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by Rick Kimball » Wed Jun 10, 2015 1:43 am

It is because the maple mini disables the SWD pins.

https://github.com/rogerclarkmelbourne/ ... rd.cpp#L48

You can hold the boot1 pin high, and press reset. That will let you at least get in. The better solution is to delete this code and never use the SWD pins except for debugging.

-rick
-rick

Post Reply