Keil Logo Arm Logo

Keil C/C++ compiler in Eclipse IDE

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Ruslan Kashfullin
Posted
28-Nov-2011 17:53 GMT
Toolset
ARM
New! Keil C/C++ compiler in Eclipse IDE

Hello!

Can you help me?

How include Keil C/C++ compiler in Eclipse IDE?
Whether it is possible?
Whether debugging with OpenOCD will earn?

Read-Only
Author
Andrew Neil
Posted
28-Nov-2011 18:30 GMT
Toolset
None
New! RTFMs

You need to study the Eclipse documentation to understand how to adapt it for any compiler;

You need to study the Keil documentation to understand how to control the Keil tools from the command line.

"Whether debugging with OpenOCD will earn?"

Again, you need to study the OpenOCD documentation to understand what debug features it supports, then study the Keil documentation to see what they provide...

Read-Only
Author
Andrew Queisser
Posted
29-Nov-2011 18:33 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

What are you trying to accomplish? Here's how I see it:

1) Using Eclipse as a nicer front-end for editing, including browsing through definitions and references: easily done
2) Feeding error output back to Eclipse so you can fix compile errors outside of Keil uVision: relatively easy
3) Using ARMCC compiler to generate ELF and then debugging natively in Eclipse via OCD: haven't tried this but should work, I think ARMCC output is largely compatible with other ELF/DWARF-producing toolchains

If you want to accomplish 3) you should set up an Eclipse based environment that uses GCC, I think there are several available, and then try to replace the build scripts with your own ARMCC based scripts.

I would love to see Keil dropping uVision completely and going Eclipse but given the large amount of work porting the trace features built into uVision (when used with ULINKPro) I'm not sure this will happen anytime soon. If you're using a cheapo probe that doesn't have trace you're probably just as well off going with a generic GCC/OpenOCD solution.

Andrew

Read-Only
Author
Joldi Lius
Posted
23-Feb-2012 22:00 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

Andrew
You can explain how you should set up the three points.
I can't find much documentation

Thanks

Read-Only
Author
Andrew Neil
Posted
23-Feb-2012 22:16 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

DS5 is Eclipse-based - perhaps you could look there for ideas...?

Read-Only
Author
Andrew Queisser
Posted
24-Feb-2012 00:19 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

Hi Joldi,

I haven't tried the third option of using a non-Keil debugger with the output from the Keil compiler. However, setting up Eclipse as an edit/build environment is pretty easy. You can use the "Import" menu and select "Existing code as Makefile project" under the C/C++ category. At that point you can use the normal Eclipse method of setting up include paths and symbols to match your project (that part is a little tedious).

To launch a build from Eclipse you have to change to a custom build step and call a build script. I put mine in the same directory as the Keil project and call it build.cmd:

c:\keil\uv4\uv4.exe -b RSN.uvproj -o errors.txt
type errors.txt

In the C/C++ Build settings for the project (right-click on the project) I uncheck "Use default build command" and enter "build.cmd" as the build command instead. Now, when I select "Build" for my project Eclipse will launch build.cmd and pipe errors.txt to the "Console" window.

The last step is to define a custom error parser for the armcc compiler output, which is a little different from gcc. In "Window|Preferences|C/C++|Build" you add an error parser with these definitions:

Error: (.*)\((\d+)\):\s+error:\s+(.*)
Warning: (.*)\((\d+)\):\s+warning:\s+(.*)
Info: (.*)\((\d+)\):\s+info(.*)

Finally, back in the "C/C++ Build" settings for your project you enable the newly created error parser.

Done!

For additional goodness I also have Subversion integrated into Eclipse so the only thing I do in Keil is debugging.

Andrew Q

Read-Only
Author
coco toto
Posted
5-Apr-2012 15:40 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

Hi Andrew,

I followed, but I'm still having problems getting the KEIL compile console into eclipse..
any tips that you might have for me would be more than welcome.

Cheers!

Read-Only
Author
Andrew Queisser
Posted
5-Apr-2012 15:54 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

Can you describe how much you've gotten to work? Do you have a batch file to build your project that works outside of Eclipse?

Andrew

Read-Only
Author
coco toto
Posted
5-Apr-2012 16:05 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

ok, so, what's working:

- compiling from eclipse: when I do "Project->Build Project" the KEIL instance is started, i can see stuff compiling there,console output and all.

what's not working:
- I don't see any of the KEIL console text in eclipse.

Read-Only
Author
coco toto
Posted
5-Apr-2012 16:11 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

uhm, nevermind, working perfectly now.
damn typo.

Read-Only
Author
Dino Criss
Posted
12-Jul-2012 10:09 GMT
Toolset
ARM
New! RE: Keil C/C++ compiler in Eclipse IDE

Hi,

I find myself in a similar situation needing to work with keil and I would very much prefer to use Eclipse instead. You said you can use Eclipse to debug the keil project. Can you explain step by step how did you manage to set eclipse in such a way. I am using Eclipse Helios.

Thank you,
Criss

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings