BricxCC for Mac OS ?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
palbarede
Posts: 4
Joined: 10 Jan 2011, 07:57

BricxCC for Mac OS ?

Post by palbarede »

Hello,

I am reading Hansen's book Lego Mindstorm Nxt power programming 2009 p. 6 "Versions of the BricxCC are available for Windows, Mac OS X and Linux".

However, I cannot find the Mac OS X version. Do you know where it is or is it a mistake in the book ? Thanks.
m-goldberg
Posts: 73
Joined: 29 Sep 2010, 12:05

Re: BricxCC for Mac OS ?

Post by m-goldberg »

The short answer is: not yet. John Hansen is working on it, but I'm afraid he was a little too optimistic about the completion date when he wrote the book. I think he expected to have it ready by the time the book was available for sale, but it was not to be.

I write NXC program on a Mac running OS X 10.6.6 using John's NexT Tools and a code editor (TextMate in my case) and run the nbc compiler from Terminal. It's not as convenient as having BricxCC, but it gets the job done.
Regards, Morton
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

Re: BricxCC for Mac OS ?

Post by nxtboyiii »

How did you get the latest compiler?
Where is it?
Thanks, and have a nice day,
nxtboy III

programnxt.com
m-goldberg
Posts: 73
Joined: 29 Sep 2010, 12:05

Re: BricxCC for Mac OS ?

Post by m-goldberg »

nxtboyiii wrote:How did you get the latest compiler?
Where is it?
I'm using Next Byte Codes Compiler version 1.2 (1.2.1.r3, built Thu Jul 1 08:05:50 CDT 2010). AFAIK, it's the latest version for the Mac although somewhat behind the compiler included with BricxCC. I downloaded it from John Hansen's sourceforge page. Follow this link.

So far, although I would like to have a more up-to-date release, what I have is still good enough for what I'm doing.
Regards, Morton
nxt-ai
Posts: 36
Joined: 10 Jan 2011, 05:02

Re: BricxCC for Mac OS ?

Post by nxt-ai »

I personally use Xcode from the install dvd (in the optional installs folder)

Make a new project: other > external build system and then use a makefile like this:

Code: Select all

# Config
USB=-U

# Path to the NXC compiler relative to the Makefile
NXC=/Applications/mindstorms/NXT/nbc
NXTCOM=/Applications/mindstorms/NXT/nxtcom

# Options to pass to the compiler
OPTIONS=-Z2

# Change the name of the program helloworld to be whatever you want
# to name the final executable
PROGRAM=helloworld

all: $(PROGRAM).rxe 
# make's input files
$(PROGRAM).rxe: $(PROGRAM).nxc
# command to run
	$(NXC) -O=$(PROGRAM).rxe \
				$(OPTIONS) \
		        $(PROGRAM).nxc
# download instructions (used by download target)
download: $(PROGRAM).rxe
	$(NXTCOM) $(USB) $(PROGRAM).rxe

# clean build products
clean:
	/bin/rm -vf $(PROGRAM).rxe
learned it from: http://www.mastincrosbie.com/Marks_LEGO ... _10.5.html

Instead of spending time rewriting BricxCC why not just make an Xcode extension?
-http://xcodeplugins.sourceforge.net/
-http://code.google.com/p/xcode-plugin/
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: BricxCC for Mac OS ?

Post by afanofosc »

I will look into the xcode plugin route since the editor component that I use (synedit) is causing me grief on Mac OSX.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
palbarede
Posts: 4
Joined: 10 Jan 2011, 07:57

Re: BricxCC for Mac OS ?

Post by palbarede »

Hello,

I have tried

http://www.mastincrosbie.com/Marks_LEGO ... _10.5.html

However, as I have nbc installed (Unix style) in /usr/local/nbc,
I needed to modify the makefile as follows :

Code: Select all

# Config
USB=-U

# Path to the NXC compiler relative to the Makefile
NXC=/usr/local/nbc/bin/nbc
NXTCOM=/usr/local/nbc/bin/nxtcom

# Options to pass to the compiler
OPTIONS=-Z2

# Change the name of the program helloworld.rxe to be whatever you want
# to name the final executable
PROGRAM=helloworld

all: $(PROGRAM).rxe download

$(PROGRAM).rxe: ./source/$(PROGRAM).nxc ./Makefile
	$(NXC) -O=./build/$(PROGRAM).rxe \
				$(OPTIONS) \
		        ./source/$(PROGRAM).nxc

download: ./build/$(PROGRAM).rxe
	$(NXTCOM) $(USB) ./build/$(PROGRAM).rxe
	
clean:
	/bin/rm -vf ./build/$(PROGRAM).rxe
		   
and select Absolute path in Xcode Info.

The "Build and Run" button is greyed out, but Build (in the Build menu) works, provided the NXT is connected and no program is running.

The program can be run or killed remotely on the NXT with NeXT tools, NXT explorer, select the program and run, not very practical indeed.

In conclusion, basically, Xcode works and is likely to please most Mac users but an Xcode plugin to emulate the BricxCC would be even better.
dsjove
Posts: 56
Joined: 22 Jan 2011, 23:22

Re: BricxCC for Mac OS ?

Post by dsjove »

afanofosc wrote:I will look into the xcode plugin route since the editor component that I use (synedit) is causing me grief on Mac OSX.

John Hansen
That will rock! If you want a hand with any part of that effort let me know.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 25 guests