Debugging ARM in Eclipse - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: December 01, 2012, 04:52:36 am
content: 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.

author: enz
author_rank: Regular Contributor
timestamp: December 01, 2012, 09:25:34 am
content: Take a look athttp://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

author: Harvs
author_rank: Super Contributor
timestamp: December 01, 2012, 11:41:33 am
content: Thanks Marin, that's greatReally 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

author: enz
author_rank: Regular Contributor
timestamp: December 01, 2012, 12:07:21 pm
content: Quote from: Harvs on December 01, 2012, 11:41:33 amYou're right.I saw this plugin mentioned in application note AN0023 from Energy-Micro:http://www.energymicro.com/downloads/application-notesThis 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

author: mrflibble
author_rank: Super Contributor
timestamp: December 02, 2012, 01:09:12 pm
content: Quote from: enz on December 01, 2012, 09:25:34 amHey, 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.

author: Harvs
author_rank: Super Contributor
timestamp: December 03, 2012, 06:35:09 am
content: 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...

author: poorchava
author_rank: Super Contributor
timestamp: December 03, 2012, 07:13:12 am
content: 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 yetI'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?

author: enz
author_rank: Regular Contributor
timestamp: December 03, 2012, 07:54:09 am
content: For me it works with this configuration:Win 7 64bit, Threadfire and Microsoft Security EssentialsEclipse Version: Indigo Service Release 2; Build id: 20120216-1857Embedded Systems Register View (SFR); Version 0.2.2Martin

author: ToBeFrank
author_rank: Regular Contributor
timestamp: December 03, 2012, 05:39:08 pm
content: Quote from: poorchava on December 03, 2012, 07:13:12 amSo 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.

author: poorchava
author_rank: Super Contributor
timestamp: December 04, 2012, 08:50:52 am
content: 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.

author: TheDirty
author_rank: Frequent Contributor
timestamp: December 04, 2012, 07:51:47 pm
content: 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.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: December 05, 2012, 03:28:49 am
content: Damn. But thanks for trying.

author: bingo600
author_rank: Super Contributor
timestamp: December 06, 2012, 07:50:19 pm
content: I'd give it another tryAccording to Spence it should work , a LPC1768 via OOCD & ST-Linkv2 SWDhttp://tech.groups.yahoo.com/group/versaloon/message/295I would trust Spence on OOCD stuff , you would too if you know who he is./Bingo

author: TheDirty
author_rank: Frequent Contributor
timestamp: December 06, 2012, 08:49:30 pm
content: 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.