8
23.04.2012 nxtOSEK: Installation Windows 1/8 lejos-osek.sourceforge.net/installation_windows.htm 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).

NxtOSEK_ Installation Windows

Embed Size (px)

Citation preview

Page 1: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

1/8lejos-osek.sourceforge.net/installation_windows.htm

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 belowinstructions.

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).

Page 2: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

2/8lejos-osek.sourceforge.net/installation_windows.htm

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

Page 3: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

3/8lejos-osek.sourceforge.net/installation_windows.htm

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 thebelow 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.

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.

Page 4: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

4/8lejos-osek.sourceforge.net/installation_windows.htm

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 ofdifferent software. Each way has pros and cons and we strongly recommend to use John Hansen's Enhanced NXT firmware because it providessame GUI as the standard LEGO firmware and other programming languages (i.e. NXT-G, NBC/NXC) also can be used without replacing thefirmware.

NXT firmware Program upload software Description

John Hansen'sEnhanced NXT firmware

LEGO MINDSTROMS NXT DriverJohn Hansen's NeXTTool

nxtOSEK program is uploaded by using the Enhanced NXT standardfirmware.

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

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

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

nxtOSEK NXT BIOSLEGO MINDSTORMS NXT Driver

nxtOSEK program is uploaded by using nxtOSEK NXT BIOS.

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

Page 5: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

5/8lejos-osek.sourceforge.net/installation_windows.htm

nxtOSEK NXT BIOSLEGO MINDSTORMS NXT DriverJohn Hansen's NeXTTool

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

Recommended for:- users who want to develop a larger program over 64Kbytes

No firmware 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 installthe driver along with instruction. During the installation, installer adds a USB driver to a Windows system directory, thus you need to providean 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 NXTDriver.

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 becausenxtOSEK 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 theEnhanced NXT firmware (i.e lms_arm_nbcnxc_106.rfw) to the directory where NeXTTool stored.

Page 6: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

6/8lejos-osek.sourceforge.net/installation_windows.htm

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 installthe driver along with instruction. During the installation, installer adds a USB driver to a Windows system directory, thus you need to providean 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 NXTDriver.

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 becausenxtOSEK 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 toWindows Vista seems to be the cause of serious trouble for all USB devices (e.g keyboard, mouse...). Therefore, we do NOT recommend toinstall 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

Page 7: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

7/8lejos-osek.sourceforge.net/installation_windows.htm

- 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-bytecharacters.

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). ExtractednxtOSEK 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 toadapt 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 directoryifndef GNUARM_ROOTGNUARM_ROOT = /cygdrive/C/cygwin/GNUARMendif

# specify NeXTTool root directoryifndef NEXTTOOL_ROOTNEXTTOOL_ROOT = /cygdrive/C/cygwin/nexttoolendif

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.

Page 8: NxtOSEK_ Installation Windows

23.04.2012 nxtOSEK: Installation Windows

8/8lejos-osek.sourceforge.net/installation_windows.htm

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, pleasecheck here.

Home