Welcome! Log In Create A New Profile

Advanced

Compile and upload with Eclipse?

Posted by Phizinza 
Compile and upload with Eclipse?
March 02, 2013 11:35PM
Can anyone give me directions on how to compile and upload teacup firmware (mainly Cyberwizzard's lookahead version) with eclipse instead of Arduino?
Re: Compile and upload with Eclipse?
March 03, 2013 06:52AM
Use Eclipse as a text editor only and "make" or "make program" from the command line. Eclipse is waaay to complex for my taste.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Compile and upload with Eclipse?
March 03, 2013 08:03PM
Ahh, ok. I also can't figure out how to do the make/makefile thing as I have Windows 7. I'm starting to think I need to install a copy of Linux in a virtual machine to do this firmware stuff!
Re: Compile and upload with Eclipse?
March 04, 2013 03:06AM
You're right. The only way to make Windows a decent open source development machine is to install Linux, a BSD, or at least all the development stuff from Linux (make, avr-libc, avr-gcc).


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Compile and upload with Eclipse?
March 04, 2013 11:36AM
This peaks my interest in learning how to push compiled software from the command line. I've done it once but that was kind of a step-by-step kinda thing and I didn't take notes.

Linux is friendly for doing that, where as on Windows yes you end up installing LOADS of development tools, just to get at a single file you may need to compile something.
Re: Compile and upload with Eclipse?
March 04, 2013 02:19PM
If for some reason you don't want to use the Arduino IDE, the tools to build and download are still available at the command line. Instead of Arduino, you could use the WinAVR package, which is what I used for AVR programming. There are web articles about how to use Eclipse for AVR programming, some people love it, though personally I am not a fan of Eclipse.

Then there is also the Atmel Studio.

Linux is great, but seems like overkill just to get an AVR programming environment. Generally, AVR projects are pretty simple and don't require all the tools that Linux provides.
Re: Compile and upload with Eclipse?
March 04, 2013 05:30PM
Can WinAVR replace Arduino IDE?
Re: Compile and upload with Eclipse?
March 04, 2013 06:08PM
Phizinza Wrote:
-------------------------------------------------------
> Can WinAVR replace Arduino IDE?

Sure, there is nothing special about the Arduino IDE. [www.youtube.com]

Arduino just provides a convenient package of editor, compiler, downloader, tailored for particular MCU boards, but you can do all those with any other setup. The Arduino libraries are all open source, so there is no problem building outside Arduino.

Teacup has minimal dependencies on Arduino, so is very easy to build outside Arduino.
Re: Compile and upload with Eclipse?
March 05, 2013 09:57PM
I get this bunch of output when I try and compile with WinAVR and PN
> "make.exe" all
rm -f build/depend
mkdir -p build
avr-gcc -DF_CPU=20000000L -mmcu=atmega644p -g -Wall -Wstrict-prototypes -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Winline -fno-move-loop-invariants -fno-tree-scev-cprop -Os -ffunction-sections -finline-functions-called-once -mcall-prologues -save-temps=obj -MM analog.c clock.c copier.c crc.c dda.c dda_lookahead.c dda_maths.c dda_queue.c debug.c delay.c gcode_parse.c gcode_process.c graycode.c heater.c home.c intercom.c mendel.c pinio.c sd.c serial.c sermsg.c sersendf.c temp.c timer.c usb_serial.c watchdog.c > build/depend
avr-gcc.exe: unrecognized option '-save-temps=obj'
  CC        build/analog.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/clock.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/copier.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/crc.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/dda.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/dda_lookahead.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/dda_maths.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/dda_queue.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/debug.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/delay.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/gcode_parse.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/gcode_process.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/graycode.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/heater.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/home.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/intercom.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/mendel.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/pinio.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/sd.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/serial.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/sermsg.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/sersendf.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/temp.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/timer.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/usb_serial.o
avr-gcc: unrecognized option '-save-temps=obj'
  CC        build/watchdog.o
avr-gcc: unrecognized option '-save-temps=obj'
  LINK      build/teacup.elf
avr-gcc: unrecognized option '-save-temps=obj'
  OBJCOPY   teacup.hex
  OBJDUMP   build/teacup.lst
  SYM       build/teacup.sym
/usr/bin/sh: perl: command not found
    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
/usr/bin/sh: perl: command not found
make.exe: ***  Error 127

> Process Exit Code: 2
> Time Taken: 00:19

Any hints to make it work?
I'm trying the compile Cyberwizzard's teacup (the one with look ahead)
Re: Compile and upload with Eclipse?
March 05, 2013 10:42PM
Phizinza Wrote:
-------------------------------------------------------
> I get this bunch of output when I try and compile
> with WinAVR and PN

> CC build/analog.o
> avr-gcc: unrecognized option '-save-temps=obj'

That seems to be a relatively new compiler option that is not supported. It shouldn't affect the build.

> SYM build/teacup.sym
> /usr/bin/sh: perl: command not found
> SIZES ATmega... '168 '328(P)
> '644(P) '1280
> /usr/bin/sh: perl: command not found

The makefile uses some perl commands to post-process some informational output, shouldn't affect build either.

> make.exe: *** Error 127

Despite the error message, it probably has worked, you should find a .bin or .hex file in the build directory.
Re: Compile and upload with Eclipse?
March 09, 2013 08:58PM
Using the Programmer's Notepad that came with WinAVR I managed to upload it using the WinAVR tools that are preinstalled in PN. I had to change the linux path to the USB to the Windows recognised COM4, but it worked after that. Thanks!
Sorry, only registered users may post in this forum.

Click here to login