Page 1 of 1

Any kind of firmware update guide?

Posted: Sat Jun 16, 2007 3:12 am
by Lightbird67
Ok i have read the readme file and everything, but am I just supposed to do "Start>Run>CMD"

Then I type lejosdl. I get a thing that doesn't help me(just saying it's not recognized or whatever)....WHAT DO I DO??

Posted: Mon Jun 18, 2007 3:57 pm
by imaqine
Is this post before or after your successful run posted here, Please try to keep issues pertaining to the same topic in one thread rather then posting the same/similar issue in more then one thread. It is easier for everyone to keep track of how everything progresses.

From the post you left above it seems like you need to learn dos/command prompt. This may help you start understanding dos, Remember - Google is your friend. Use it. :D

cd - changes the directory you are currently in
dir - lists the contents of the directory you are currently in

The two commands above are two crucial yet simple commands you need to know esp. to use leJOS.

Hope this helps.

Posted: Tue Jun 19, 2007 5:10 am
by Lightbird67
Oh well I just saw your post under mine of the link you posted, and it never said anything about me having the firmware, and there is no screen on it. Is there supposed to be a screen? I'm gonna kill myself, got this book few weeks ago, and not getting past page 29 Lol.

Sorry about posting in different spots, but I sorta found out something and I didn't wanna double post.

And yes, Google is my friend. If there was no Google(or something similar like Yahoo, Ask, etc.) I would DIE lol.

Thanks for the help!

Posted: Tue Jun 19, 2007 5:10 pm
by imaqine
Currently, leJOS NXJ 0.2.0, does not support a menu system and that is why you do not have a screen that pops up. The only screen output you will see is when you load a program it will show leJOS NXJ on the screen for a second then it will disappear. This should of happened when you loaded the tune program. Keep in mind that the book has some sections that are different from what is support in leJOS NXJ 0.2.0.

If you can answer the following questions then it can help us direct you in the right direction:

- What have you got accomplished thus far?
- What issues are you having?
- What are the EXACT errors are you getting?
- What questions do you have with cmd?

If you got the tune program working as you posted in then you have the firmware loaded and you can go and create your own test program to run it. The best way to attempt this is to edit and compile it then load it to the brick. Since the code is already there - you could add an addition or cut the tune off a bit to see if everything is working correctly for you.

Out of curiousity, how much of a background in programming do you have? The current release or leJOS is intended for individuals with an understanding of programing - such as working from command prompt to compile and run programs. It's great that you want to give leJOS a shot and I commend you for it but if it becomes too difficult I would try to work with java in its true form first before moving to the leJOS. For example, try to compile and run java programs from command prompt (could be as simple as a Although with that being said, I think you are very close to getting leJOS working properly. :wink:

As I have said before, I hope I am leading you in the right direction. :)

Posted: Tue Jun 19, 2007 6:25 pm
by Lightbird67
Ok so then I should have the firmware. (But if there is no screen, how do I get it to shut off? Usually it goes off after a while but it's been on since like yesterday)

I went to Eclipse setup for now and so i set Eclipse up with leJOS. I went to do the Tun>External Tools>External Tools...

So I did everything it says then it says to select all 3 for the organizing favorites thing. But it only told me 2 to do. So i went to do Link myself.

So I found the file lejoslink.bat for location. For Working Directory I went to Variables like on the other 2 and I did project_loc. But on arguments they are both different on the other 2. It could be ${java_type_name}.java



or something else for all I know. I think it is ${java_type_name}.lej but I don't know. So any help on that would be appreciated too.

And now when I go to "leJOS Compile" "leJOS Link" or "leJOS Download" I always get "Variable references empty selection: ${project_loc}" So what do I do?

Posted: Wed Jun 20, 2007 1:30 pm
by imaqine
Ok so then I should have the firmware. (But if there is no screen, how do I get it to shut off? Usually it goes off after a while but it's been on since like yesterday)

The answer to this is located within the readme.html file itself:
You can stop a program by pressing the ENTER and ESCAPE (orange and grey square) buttons together. This powers down the NXT immediately. Press the ENTER (orange) button to wake it up again.

You can also power down the NXT with ENTER + ESCAPE, after an Exception occurs.

Otherwise, when the program is finished running the NXT will shutoff.

Have you tried writing any programs of your own?

As for Eclipse - I only use it to write my programs. I normally use the command prompt to compile and upload just because I am use to this from working with the RCX. I can look into it later today but for now try refering to what Brian mentioned in this thread, This post espically:

To set up the linker [in Eclipse] you will need to use:

Location (change to location of lejos install): c:\lejos_nxj\lejoslink.bat
Working dir: ${project_loc}
Arguments: -o ${java_type_name}.bin {java_type_name}

* Change .bin to .lej if that is what you use in lejosdl!

I understand that I have directed you to this thread before but I feel that this is what you are trying to do. Oh and .bin and .lej are the same file - the creators of lejos just felt that it would be good to change the extension to something familiar with .lej but it seems to be causing a lot of confusion. Hopefully Brian will chime in and see if he can further help you with Eclipse.

Posted: Wed Jun 20, 2007 2:39 pm
by Lightbird67
Yeah I thought it was Enter + Escape but that didn't do you know about the "project_loc" thing? I tried adding what was there for Linker and that doesn't work either. I think something might be screwed up with that variable or something. But hey, what do I know?

Posted: Wed Jun 20, 2007 4:31 pm
by imaqine
I can't help you out with that, try pming Brian or going to an Eclipse forum to see if they can help.

Why don't you just use the command line?

Posted: Thu Jun 21, 2007 1:51 am
by Lightbird67
Well I did what it says in the book but I got something about the UM File Size. I dunno what to do.

Posted: Thu Jun 21, 2007 12:33 pm
by imaqine
You have to be more specific. What did you do that the book told you? Are you talking about using the command line or Eclipse? I can't help with with such vague statements. I don't have the book in front of me when I read your posts therefore you have to post exactly what the book said to do.

Have you tried searching an Eclipse forum to help with you your issue?

Posted: Mon Jun 25, 2007 3:56 pm
by Lightbird67
Sorry about not being too specific. I will redo everything in the book that it says to show you what I get.


1. Enter the R2MeToo code above into the document and save it.(I actually just downloaded it offline, they don't suggest typing that whole long code).

2. Try compiling R2MeToo from the Tools button in the Eclipse toolbar. When you compile, you probably won't see any output in the console area unless there are errors.

3. Now turn on your NXT brick, plug in the USB cable. and select the leJOS Download tool.

That is what it says in the book, but I don't get past step 2, because I need to compile and it gets this error "Variable references empty selection: ${project_loc}"


1. From a command line prompt, change your code directory.
cd \java\nxj_code

2. Compile the Java file:

3. Now upload the file to the NXT. Plug in your USB cable turn on the NXT by pressing the orange button and type:
lejosdl R2MeToo.lej

So I did EXACTLY as the book says. lejosjc, then plug in NXT and turn on and do: lejosdl R2MeToo.lej and I get:

UM file size is 26832
Error opening java file: File open/handling error


And I already had looked on Google over and over, but then I looked again and found that "Variable references empty selection" means that a project is not selected, but I don't just get that, I get "Variable references empty selection: ${project_loc}" so it is a little different, and a project IS selected when I do hit "leJOS Compile, leJOS Link, or leJOS Download"

Posted: Sun Jul 01, 2007 2:11 am
by Lightbird67
Sorry but I really need help with this because I don't wanna just have something built forever and never use it!(Although eventually I would take it apart).

Posted: Sun Jul 01, 2007 4:59 am
by 99jonathan
then plug in NXT and turn on

Are you sure that you are in firmware update mode?

(from readme)

To go into firmware update mode press the reset button (at the back of the NXT , upper left corner) for more than 4 seconds. Your NXT will audibly tick when it is firmware update mode, but is not running a lejos program.

To switch your NXT on, just press the orange button. It will start to audibly tick.

Posted: Mon Jul 02, 2007 11:50 pm
by Lightbird67

I think it is in firmware update mode....

Posted: Fri Jul 20, 2007 2:25 pm
by imaqine
Have you tried using the new release of lejos?