Using GDB with Atmel Studio on samb11?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't generally use Atmel Studio because it just doesn't fit with the way I prefer to work;  unfortunately, Atmel decided (and Microchip hasn't yet corrected) that the SAMB11 would require various Windows binaries to program its serial flash, and there is no support for it in OpenOCD, so I'm stuck using Atmel studio for a debugger.  I would dearly love to be able to use GDB instead - there are clues in some of the menus that it should be possible, but I have not yet figured out how.

Can anyone point me at the right menus to tweak (and the things to set!) so I can use command-line gdb to debug the SAMB11?  I just really, really don't grok Visual Studio as a working environment - it's never clear to me where anything should get set.

 

Thanks!

+j

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can run atbackend (the debug system from Atmel Studio) as a gdb server (not battle tested, so mileage may vary). To do this, run atbackend /armM-gdb-ports=ports (where ports is the port numbers you want). 

 

Do note however that the B11 needs a lot of tweaks to get going. In Studio this is written in a special python hook file that the debug system runs on launch. This file should be copied to your project that you have (called debughooks.py).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ooh, I'd never really looked at debughooks.py before - it does seem to have a lot of the info I've been missing.  I can see that certain function locations get patched in - any idea how that gets generated (since it seems to be different from project to project) ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not generated (as far as I know at least)...

 

You can find the source in the SAMB11 DFP. (open it with a zip viewer, the debughook and project override file is in the studio folder).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Mon. Nov 6, 2017 - 08:15 PM