Author Topic: Debugging ARM in Eclipse  (Read 6585 times)

0 Members and 2 Guests are viewing this topic.

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Debugging ARM in Eclipse
« on: December 01, 2012, 04:52:36 am »
So after trailing a few IDEs, I ended up going the free approach with Eclipse, Sourcery G++ and OpenOCD.  All seems to work OK, albeit far from the ideal IDE experience (that's probably largely in part due to my lack of in-depth knowledge of Eclipse, and how to set up the seemly millions of options.)  But it's manageable enough.

So the debugging aspects work reasonably, and I found the memory monitor which I can monitor addresses.  However, it would be really nice not to have to work out 0x48000810 is the PORTC ODR whenever I want to have a quick look at it (as an example.)

Is there any way to label memory addresses in Eclipse debugger?  I've done quite a bit of searching, and it seems like you have to build an Eclipse plugin.  It seems a bit nonsensical not to be able to just define a bunch of memory address labels in a file. :-//
 

Offline enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Debugging ARM in Eclipse
« Reply #1 on: December 01, 2012, 09:25:34 am »
Take a look at http://embsysregview.sourceforge.net/.
Don't know the current status of the project, but last year i used it with an Energy-Micro Cortex-M3 and it worked well.

Regards,
Martin
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: Debugging ARM in Eclipse
« Reply #2 on: December 01, 2012, 11:41:33 am »
Thanks Marin, that's great :-+

Really good plugin with all the definitions as well.

They probably just need to throw a keywords section in their webpage, because it's not all that easy to find with google.

Cheers
 

Offline enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Debugging ARM in Eclipse
« Reply #3 on: December 01, 2012, 12:07:21 pm »

They probably just need to throw a keywords section in their webpage, because it's not all that easy to find with google.

Cheers

You're right.
I saw this plugin mentioned in application note AN0023 from Energy-Micro:
http://www.energymicro.com/downloads/application-notes
This is an interesting HowTo for setting up an eclipse toolchain, not only for Energy-Micro devices!
I think they even updated this AppNote in August 2012 to cover the current Indigo-Version of eclipse.

Martin
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Debugging ARM in Eclipse
« Reply #4 on: December 02, 2012, 01:09:12 pm »
Take a look at http://embsysregview.sourceforge.net/.
Hey, that looks potentially useful. Thanks for the tip!  Just installed it and did a few quick tests. The interface for setting register values seems a bit clunky, but for quickly viewing peripheral registers it does the job nicely. :) Tested with an stm32f4 discovery board...

edit: looks like setting register values also works nicely as long as you press the right buttons. :P
« Last Edit: December 02, 2012, 01:22:46 pm by mrflibble »
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: Debugging ARM in Eclipse
« Reply #5 on: December 03, 2012, 06:35:09 am »
Yeah I really like it.  Though it threw me for about 20 min before I worked out you had to double click the icon and turn them green for it to monitor the memory location...
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: pl
  • Troll Cave Electronics!
Re: Debugging ARM in Eclipse
« Reply #6 on: December 03, 2012, 07:13:12 am »
I've switched to Eclipse+OOCD+arm-gcc-eabi recently too. I think that learning curve is like almost vertical at the beggining, but after a while you get used to it. And of course it has the merit of forcing you to look deeper inside the MCU, not only "press compile and it just works".

I'm currently using the toolchain with STLink V1 integrated on STM32 VLDiscovery. Works pretty well. I've managed to connect and debug the base STM32F100 on discovery board and also LPC1768 via ST-Link's SWD. Sadly Stellaris Launchpad is not officially supported by OOCD. Although there is an experimental patch which adds Stallaris ICDI compatibility, but one would have to recompile OOCD from source and I don't feel that hardcore yet :)

I've tried to setup sysregview but i was getting some system-level error (like access violation or something). Anyone of you tried to run that under Windoze 7 32-bit with AVG antivirus installed?
I love the smell of FR4 in the morning!
 

Offline enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Debugging ARM in Eclipse
« Reply #7 on: December 03, 2012, 07:54:09 am »
For me it works with this configuration:
Win 7 64bit, Threadfire and Microsoft Security Essentials
Eclipse Version: Indigo Service Release 2; Build id: 20120216-1857
Embedded Systems Register View (SFR); Version 0.2.2

Martin
 

Offline ToBeFrank

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Debugging ARM in Eclipse
« Reply #8 on: December 03, 2012, 05:39:08 pm »
I've managed to connect and debug ... LPC1768 via ST-Link's SWD.

So the ST-Link works with chips other than ST chips? Just to clarify, you were using SWD with the LPC, not JTAG? I was looking if I could do SWD now with OCD, but it looks like ST-Link is the only one that really works. The ST-Link says it only does their chips, but if I can use it with my LPC Cortex M0 (SWD only) chips, I'll make the switch.
« Last Edit: December 03, 2012, 05:41:45 pm by ToBeFrank »
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: pl
  • Troll Cave Electronics!
Re: Debugging ARM in Eclipse
« Reply #9 on: December 04, 2012, 08:50:52 am »
I did not blink the LED on that LPC, but it seemed to be recognized in OOCD, so I assumed it would work. I will have to check that once again, but I don't have the LPC board anymore (woops+poof+smoke). But i guess same test could be done on Stallaris Launchpad with ICDI disconnected.
I love the smell of FR4 in the morning!
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Debugging ARM in Eclipse
« Reply #10 on: December 04, 2012, 07:51:47 pm »
I was not able to get the ST-Link to work with an LPC over SWD.  I got an error during programming.  Using Crossworks, though, not OOCD.
Mark Higgins
 

Offline ToBeFrank

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Debugging ARM in Eclipse
« Reply #11 on: December 05, 2012, 03:28:49 am »
Damn. But thanks for trying.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 2032
  • Country: dk
Re: Debugging ARM in Eclipse
« Reply #12 on: December 06, 2012, 07:50:19 pm »
I'd give it another try

According to Spence it should work , a LPC1768 via OOCD & ST-Linkv2 SWD
http://tech.groups.yahoo.com/group/versaloon/message/295

I would trust Spence on OOCD stuff , you would too if you know who he is.

/Bingo
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Debugging ARM in Eclipse
« Reply #13 on: December 06, 2012, 08:49:30 pm »
My test was with Crossworks and LPC1114, so I can't speak for anything else.

Anyway, my j-link clone is fast and cheap, so I only tried the once.  Used an ST Link/V2 on my F0 board.
Mark Higgins
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf