CodeLite for Embedded Development (ARM Cortex)

General questions regarding the usage of CodeLite
ktownsend
CodeLite Curious
Posts: 3
Joined: Fri May 07, 2010 5:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite for Embedded Development (ARM Cortex)

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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
Make sure you have read the HOW TO POST thread
User avatar
ac.verbeck
CodeLite Curious
Posts: 7
Joined: Tue Oct 25, 2011 11:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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
Make sure you have read the HOW TO POST thread
ndivner
CodeLite Enthusiast
Posts: 37
Joined: Sun Mar 16, 2008 12:49 pm
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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.
User avatar
ac.verbeck
CodeLite Curious
Posts: 7
Joined: Tue Oct 25, 2011 11:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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
ktownsend
CodeLite Curious
Posts: 3
Joined: Fri May 07, 2010 5:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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.
User avatar
ac.verbeck
CodeLite Curious
Posts: 7
Joined: Tue Oct 25, 2011 11:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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
rakesh.safir
CodeLite Curious
Posts: 2
Joined: Fri Jun 15, 2012 1:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite for Embedded Development (ARM Cortex)

Post 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
Post Reply