nxtOSEK Installation in Windows XP/Vista/7

 

Setup of nxtOSEK application development environment requires several 3rd party software and most of tools is CUI (Command User Interface) based software. So if you are not familiar with those kind of software, it may make you frustrated, but please be patient to follow the below instructions.

1. Install Cygwin

2. Install GNU ARM

3. Setup nxtOSEK program upload software

4. Set up nxtOSEK

 

 


1. Install Cygwin

Cygwin is a Linux(Unix)-like environment for Windows and it enables to run a lot of Linux software in Windows environment.
  • Install Cygwin 1.5.x or newer version (1.5.24 as of this writing) from Cygwin Site.
  • Execute setup.exe. You can download all the files for a later install, or install directly from Internet. Choice the best for you.

  • Install in the directory that you prefer. (but should not include space or multi-byte character).

  • Choose make 3.81-1 under Devel category.

 

Note(January 6th, 2011):
In case of using the latest Cygwin, Cygwin installer might miss to install some default libraries. To avoid this issue, it is recommeded to keep the below described library under Libs tree manually.


 


2. Install GNU ARM

GNU ARM is a distribution of GCC (GNU Compiler Collection) for ARM core and it supports an ARM7 CPU in the NXT.
  • Download a GCC-4.0.2 tool chain (bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe) from FILES section at GNU ARM Site.
    Note that if you use other version of GCC (i.e. 4.1.1), it may cause unexpected errors while compiling a nxtOSEK application.
    Note that orignal GNU ARM website (www.gnuarm.com/‎) is not available anymore. However, I found a mirror site of the GNU ARM website. In this document, I provided a link to the mirror site. (2014/03/25)
  • Install only selected components in the below picture. ARM7(ATMEL AT91SAM7S256) in the NXT is Little Endian and does not have FPU.

  • Do not check "Install Cygwin DLLs..." because Cygwin was already installed.

  • At the end of the installation, you were asked about adding the tool path to Windows Environment Variables, but it would not be needed.

 

 


3. Set up nxtOSEK program upload software

nxtOSEK supports three ways of program upload to the NXT and those are designed for different purposes. Each way requires installation of different software. Each way has pros and cons and we strongly recommend to use John Hansen's Enhanced NXT firmware because it provides same GUI as the standard LEGO firmware and other programming languages (i.e. NXT-G, NBC/NXC) also can be used without replacing the firmware.

 

NXT firmware
Program upload software
Description
John Hansen's
Enhanced NXT firmware
LEGO MINDSTROMS NXT Driver
John Hansen's NeXTTool

nxtOSEK program is uploaded by using the Enhanced NXT standard firmware.

Pros:
- multiple nxtOSEK applications can be uploaded
- Other programming software (i.e. NXT-G, NXC/NBC) can be used without replacing the firmware

Cons:
- Program size (ROM+RAM) of a nxtOSEK program is up to 64Kbyte

Recommended for:
- most users, especially, users for educational purpose

LEGO MINDSTORMS NXT Driver
John Hansen's NeXTTool
nxtOSEK program is uploaded by using nxtOSEK NXT BIOS.

Pros:
- Program size of a nxtOSEK program is up to 224Kbytes(ROM) and 50Kbytes(RAM)

Cons:
- Only single nxtOSEK program can be uploaded to a NXT

Recommended for:
- users who want to develop a larger program over 64Kbytes
LibUSB nxtOSEK program is uploaded to RAM and directly executed from RAM.

Pros:
- No Flash memory is used

Cons:
- Shut down the NXT makes the program gone
- Program size (ROM+RAM) of a nxtOSEK program is up to 64Kbyte
- Difficult to install LibUSB properly
- Works on only Windows XP

Recommended for:
- none (just keep it for backward compatibility)

 

 


Set up nxtOSEK program upload software for the Enhanced NXT firmware

  • Download LEGO MINDSTORMS NXT Driver (called Fantom Driver) from LEGO software update website and execute setup.exe to install the driver along with instruction. During the installation, installer adds a USB driver to a Windows system directory, thus you need to provide an administrator right to your user account before installing the driver.

    Note that if LEGO standard programming software was already installed in the PC, it does not need to install LEGO MINDSTORMS NXT Driver.

  • Download John Hansen's NeXTTool and extract it to the directory which does not contain space and multi-byte characters (i.e. C:\cygwin\nexttool). NeXTTool is a PC console program and it enables uploading .rxe and .rfw files to the NXT.

    Note that NeXTTool provides a lot of features which communicates with the NXT. However, it does not work with nxtOSEK because nxtOSEK uses non-LEGO standard communication protocol in USB/Bluetooth.
  • Download John Hansen's Enhanced NXT firmware (any version numbered 106 or later includes the native-invocation feature) and store the Enhanced NXT firmware (i.e lms_arm_nbcnxc_106.rfw) to the directory where NeXTTool stored.

 

 

Set up nxtOSEK program upload software for NXT BIOS

  • Download LEGO MINDSTORMS NXT Driver (called Fantom Driver) from LEGO software update website and execute setup.exe to install the driver along with instruction. During the installation, installer adds a USB driver to a Windows system directory, thus you need to provide an administrator right to your user account before installing the driver.

    Note that if LEGO standard programming software was already installed in the PC, it does not need to install LEGO MINDSTORMS NXT Driver.

  • Download John Hansen's NeXTTool and extract it to the directory which does not contain space and multi-byte characters (i.e. C:\cygwin\nexttool). NeXTTool is a PC console program and it enables uploading .rxe and .rfw files to the NXT.

    Note that NeXTTool provides a lot of features which communicates with the NXT. However, it does not work with nxtOSEK because nxtOSEK uses non-LEGO standard communication protocol in USB/Bluetooth.

 

 

Set up nxtOSEK program upload software for No firmware

CAUTION:
We have tested nxtOSEK on only Windows XP SP2. However, some users have tried to install nxtOSEK on Windows Vista. Install LibUSB to Windows Vista seems to be the cause of serious trouble for all USB devices (e.g keyboard, mouse...). Therefore, we do NOT recommend to install LibUSB to a Windows Vista machine.
Unfortunately, if you tried this, all of your usb devices on the PC might stop working. In this case, the following way may fix the problem:
- Plug in legacy ps2 keyboard and mouse devices
- Reboot the PC
- In the device manager, remove all USB devices
- Uninstall LibUSB
- Reboot the PC with the USB keyboard and mouse
  • LibUSB is an open source C library for accessing USB devices. libUSB installer for Windows is included in the nxtOSEK distribution package (nxtOSEK\lejos_nxj\3rdparty\lib\libusb-win32-filter-bin-0.1.12.1.exe). Execute libusb-win32-filter-bin-0.1.12.1.exe to install libUSB.

    According to some user feedbacks on leJOS, LibUsb should be installed to the directory which does not contain spaces and multi-byte characters.

 

 

 


4. Set up nxtOSEK
  • Extract a nxtOSEK package to the directory which does not contain space and multi-byte characters(i.e. C:\cygwin\nxtOSEK). Extracted nxtOSEK package has the following directory structure.

  • Under ecrobot directory, there is tool_gcc.mak file to specify the path to the installed GNU ARM. It needs to modify GNUARM_ROOT to adapt your environment. tool_gcc.mak also contains NEXTTOOL_ROOT macro to specify the path to the installed NeXTTool.
    If you use NeXTTool, you need to modify NEXTTOOL_ROOT to adapt your environment.

# specify GNU-ARM root directory
ifndef GNUARM_ROOT
GNUARM_ROOT = /cygdrive/C/cygwin/GNUARM
endif

# specify NeXTTool root directory
ifndef NEXTTOOL_ROOT
NEXTTOOL_ROOT = /cygdrive/C/cygwin/nexttool
endif

  • Execute Cygwin and change the current directory to nxtOSEK\samples_c\helloworld directory by typing the following command
    (It is assumed that nxtOSEK is extracted under C:\cygwin directory)
    $ cd C:/cygwin/nxtOSEK/samples_c/helloworld
  • Type the following command to build binary executables of helloworld sample
    $ make all
    If everything went well, binary executables and program upload scripts could be generated in the helloworld directory.

 

Note(January 6th, 2011):
If the following compilation error is happened, there might be caused by a failure of Cygwin installations. To avoid the error, please check here.


 

 

Home