Page 1 of 1

CodeLite for Embedded Development (ARM Cortex)

Posted: Fri May 07, 2010 5:28 pm
by ktownsend
I've been putting together a set of tutorials on using CodeLite + GCC as a development toolset for ARM embedded devices, and have been able to get GDB server working to properly program the MCUs, but haven't had any luck actually getting breakpoints to work. I'm just curious if anyone has successfully been able to setup CodeLite to debug any embedded device via GDB Server to know whether it's possible or not.

The tutorials I've put together so far are visible here:

http://www.microbuilder.eu/Projects/LPC ... orial.aspx
http://www.microbuilder.eu/Projects/LPC ... rial2.aspx

I know there were some modifications required to get Eclipse working with GDB server for embedded devices (see http://opensource.zylin.com/embeddedcdt.html), but I'm not sure if any effort has been made to make CodeLite compatible. It would definately be nice to have another open-source IDE alternative than Eclipse for ARM development.

Kevin Townsend

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Fri May 07, 2010 11:32 pm
by eranif
ktownsend wrote:but I'm not sure if any effort has been made to make CodeLite compatible
Non that I know of. However, maybe someone on this forum has done it - we will just have to wait and see :)

Eran

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Mon Oct 31, 2011 9:27 pm
by ac.verbeck
Kevin / Eran,

I read this post (as well as others) about debugging Cortex M3 using CodeLite. I have a modified the DebuggerGDB.dll to support Cortex M3 development.
It supports the following:
- Load symbols from the target
- Download the firmware
- Breakpoints (at main and otherwise)
- Run
- Break / Pause
- All the data functions (read RAM/FLASH, stack frames, local variables, etc.) worked without modification.

Configuration:
- Win7 x64
- YARGTO 18.03.2011 (Binutils-2.21, Newlib-1.19.0, GCC-4.6.0, GDB-7.2)
- CodeLite v3.0.5041 and v3.0.5181..5186 (via svn)
- SEGGER J-Link GDB Server V4.36b
- SEGGER J-link
- MicroBuilder LPC1343 Reference Design

The only modifications had to do with initializing GDB, starting the application, and pausing. The changes are not intrusive but I don't have the experience to integrate them properly.

The main reason I am posting is to ask if there is any interest in integrating Cortex M3 debugging into CodeLite.

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Tue Nov 01, 2011 12:47 am
by eranif
Extend codelite's capabilities is always welcomed. If you don't know how to submit the changes - then send me the modified files and I will create a proper patch and apply it (assuming it does not break anything else)

Eran

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Wed Nov 02, 2011 2:28 am
by ndivner
ac.verbeck wrote:The only modifications had to do with initializing GDB, starting the application, and pausing. The changes are not intrusive but I don't have the experience to integrate them properly.
I would like to have a bash at adding disassembly and register tabs, so to save me from re-inventing wheels, would it be possible for you to post a zip of your changed files.

Many thanks,

Noel Diviney.

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Wed Nov 02, 2011 10:05 am
by ac.verbeck
Hello all,

I will post everything. Currently it's a bit of a hash. Got it working on Sunday night and haven't had a chance to get back to it.

I think I have worked out a plan that will not break the standard debug functionality while adding ARM Cortex M3 debugging.

ACV

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Thu Nov 03, 2011 11:48 pm
by ktownsend
I tested this out myself this week, and was really excited to finally have a genuinely open source option for debugging embedded projects in an IDE. The lack of assembler output and being able to step through the assembly code is kind of a bummer for embedded work (since you often need to compile with -0s to save precious flash memory meaning your original code has no resemblance to the generated code), but it's still a huge improvement, and with some improvements on the UI I can see CodeLite getting a lot of traction in the embedded world.

It's be nice to see these changes make their way into the official build, though, so you don't lose this functionality after any update. Great work on this, though! Made my week.

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Tue Nov 08, 2011 9:46 pm
by ac.verbeck
Hello All,

Thanks to Kevin for testing this for me. It's great having outside confirmation that it works.

I have re-worked the standard GDBdebugger.dll into another "debugger" dll. It can be invoked completely separate from the "standard" GDB debugger. I will post source, a compiled version and notes before the weekend.

ACV

Re: CodeLite for Embedded Development (ARM Cortex)

Posted: Tue Aug 21, 2012 8:04 pm
by rakesh.safir
ac.verbeck wrote:Hello All,

Thanks to Kevin for testing this for me. It's great having outside confirmation that it works.

I have re-worked the standard GDBdebugger.dll into another "debugger" dll. It can be invoked completely separate from the "standard" GDB debugger. I will post source, a compiled version and notes before the weekend.

ACV
Its a long time now when i am reading this post. Are you done with your changes. If not I'm willing to be of some help if required. I want to extend the same library to support FT2232, FTDI's USB2.0 -> JTAG chips.

Congratulations for such a nice job.

rakesh