0
votes

So I've just switched to d to Linux Mint rosa from Windows 10. I'm trying to figure out how download the firmware through eclipse. Whenever I click the plug-in and then the firmware I get;

"starting nxjflashg failed org.lejos.nxt.ldt.util.LeJOSNXJException: NXJ_HOME is not set. Please specify it in the plug-in's preferences See Eclipse error log for detailed stack trace."

I know when I was using windows 10 I had to change environmental variables and download the NXJ drivers also, I'm not sure how to do this w/ Linux

1

1 Answers

0
votes

You have 3 steps to flash a NXT on Linux with eclipse (once Java is working):

  • install the libusb driver
  • install LeJOS
  • install the LeJOS eclipse pugin

I think you only installed the eclipse plugin, so you need to follow the instructions here : http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStartedLinux.htm

Summary :

  • sudo apt-get install libusb-dev ant (install libusb driver and ant, a kind of make for java)
  • download leJOS, unizp it and put it where you want (/opt for instance)
  • set the NXT_HOME in the window > Preferences > leJOS NXT > NXJ_HOME to the path you copied leJOS
  • run ant in $NXJ_HOME/build to build the usb driver
  • to access to your USB port without su rights
    • edit your udev rules (1)
    • add your user to the group lego (sudo groupadd lego && sudo gpasswd -a $USER lego)
    • log out and log in to update the rules

(1) udev rule : vim /etc/udev/rules.d/70-lego.rules

# Lego NXT brick in normal mode
SUBSYSTEM=="usb", DRIVER=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0002", GROUP="lego", MODE="0660"
# Lego NXT brick in firmware update mode (Atmel SAM-BA mode)
SUBSYSTEM=="usb", DRIVER=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", GROUP="lego", MODE="0660"