Michael0x2a
Michael0x2a

Reputation: 64278

How to compile WindRiver/Eclipse C++ projects from the command line?

I'm currently running a variant of Eclipse known as WindRiver, which is designed for embedded systems programming using C++ (specifically, I'm part of my high school's FIRST Robotics team).

I'm able to successfully compile and build the project from within Eclipse (Project > Build Project) but I'm looking for ways to automate this process by compiling by using the command line.

The project already contains a makefile and everything, so ideally I want to be able to just run that without making any manual changes. I pastebin'd the makefile in case its relevant.

Does anybody know where I can find more information on compiling C++ programs from the command line for either Eclipse or WindRiver or on running makefiles on Windows? I tried looking at "How to run a makefile in Windows?" but following the first answer didn't work (it gave a syntax error for the makefile).

I'm currently using a Windows 8 laptop. As best as I can tell, the current varient of WindRiver I'm using is based on Eclipse version 3.3.1.

Upvotes: 5

Views: 6007

Answers (2)

Michael0x2a
Michael0x2a

Reputation: 64278

Thanks to Mat Petersson's answer, I was able to identify everything I needed and create a batch file that could compile the file for me:

@echo off

setlocal

set PATH=%PATH%;C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin;C:\WindRiver\utilities-1.0\x86-win32\bin;C:\WindRiver\setup\x86-win32\bin
set WIND_BASE=C:\WindRiver\vxworks-6.3

cd My_Project\PPC603gnu

make --no-print-directory BUILD_SPEC=PPC603gnu DEBUG_MODE=1 TRACE=1

Upvotes: 3

Mats Petersson
Mats Petersson

Reputation: 129524

You will need a make utility, I believe your WindRiver / Eclipse setup would come with "gnumake" (probably called either make or gmake). You'd nee dto set up the command line path to lead to the compiler and the make executable. Unfortunately, this is not a great answer, as I can't give you exact links to the make and compiler locations (it would of course also depend on where you installed things). I just thought I'd lead you somewhat on the right path, since the question has been up for a little while and no one jumped at it.

Upvotes: 3

Related Questions