Re: Cross compiler project setup help
Eric Ludlam <[email protected]>
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
On 09/25/2014 01:46 PM, Zack wrote: > Hello- > > I'm looking for help getting a cross compiler environment working > through CEDET/EDE/Semantic. Right now I'm using Eclipse and it's giving > me fits... it works erratically and I've been unable to get my multiple > development machines to work alike. So I'd really like to use CEDET, but > I'm struggling with it and probably missing the obvious. > > My first environment I'd like to get working is avr-gcc (simpler to > start with, I'm thinking, than the arm-eabi toolchain). From my > understanding of the documentation, I need to define another > ede-$NAME-compiler for avr-gcc. Those are defined in ede/proj-obj.el > but should I edit that directly, or is there a method for declaring that > new compiler in my personal config? > > And before this goes any further, I want to make sure I'm not barking > completely up the wrong tree. I'd really like to be able to set up the > EDE project with the correct MCU compiler flags and have Semantic > correctly index the relevant code (not a huge problem with AVRs, but a > headache with Cortex processors). > > I'm running emacs 24.3.1 and CEDET from git. Hi Zack, For your direct question, you can define new compiler variables anywhere you like, just make sure you load EDE, the ede/proj-comp library, then your compiler variables library, then the project that uses the compilers. These will let you configure what goes into the generated Makefiles. As much as I like to recommend the EDE project Makefile generators, etc, I'm going to guess that your project may be a couple steps too complex for what is currently there. If you are just compiling some C code with some compilers and linkers into some libraries and programs, you may be ok. If it is more complex than that, there are some other options. Your best bet for a complex project is to write your Automake files by hand, and use the EDE project type that will auto-detect your hand-written Automake project as a convenience for compiling, debugging, and adding files to targets. Automake, as I understand it, does well with cross compiling. I note that you are using avr-gcc, and talking about MCU which sounds like arduino. If so, there is a customer arduino EDE project type. If you configure your arduino IDE sketch directory, then put your projects under that directory, the Arduino project type will detect that and auto generate nice Makefiles for you. There is a section in the CEDET manual just about arduino. Last but not least, there are generic project types that you could use. These are handy in that you just need to write your own Makefile or whatever is findable, and then do M-x customize-project RET and fiddle with the settings that Semantic uses to do smart completion. That keeps the smart completion engine happy, and you can use EDE for simple compile debug workflows. Good Luck Eric ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk