Hello!
Can you help me?
How include Keil C/C++ compiler in Eclipse IDE? Whether it is possible? Whether debugging with OpenOCD will earn?
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...
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
Andrew You can explain how you should set up the three points. I can't find much documentation
Thanks
DS5 is Eclipse-based - perhaps you could look there for ideas...?
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
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!
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?
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.
uhm, nevermind, working perfectly now. damn typo.
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