FAQ (Updated: January 2009)


Here is the collection of FAQs regarding nxtOSEK.

nxtOSEK General

nxtOSEK Software

nxtOSEK Hardware

nxtOSEK Projects


nxtOSEK General:

Q: Is nxtOSEK a part of leJOS NXJ or a kind of another Java VM for LEGO MINDSTORMS NXT?
A: nxtOSEK uses LEJOS NXJ low level device driver written in C/Assembly, but it is NOT another Java VM implementation for NXT. nxtOSEK is an RTOS(Real-Time Operating System) for LEGO MINDSTORMS NXT and user can write native application in ANSI C/C++ by using GCC tools. nxtOSEK development staff is not a member of leJOS NXJ development team, we are just standing the shoulders of giants.

Q: What is the license for nxtOSEK?
A: nxtOSEK is a hybrid of existing two open source projects (leJOS NXJ and TOPPERS ATK).
  - leJOS NXJ is distributed under Mozilla Public License Version 1.0
  - TOPPERS ATK is distributed under TOPPERS License
Additinally, nxtOSEK original part would be distributed under Mozilla Public License Version 1.0 same as leJOS NXJ.

Q: How do I contribute nxtOSEK project?
A: Currently, nxtOSEK does not use sourceforge source code repository. Sorry, there is no way to check the latest source code under development. If you develop some nice feature related to nxtOSEK (e.g. support new sensors), please contact us directly or post a thread in leJOS/nxtasy/lugnet forums which are regularly checked by the project member.


nxtOSEK Software:

Q: How do I specify absolute path expression in Makefiles for nxtOSEK application?
A: Makefiles in nxtOSEK use relative path, however, if you needed to use absolute path, please modify the relative paths in the following files.
  Makefile for each sample
  lejos_osek.tmf stored in lejos_osek\ecrobot directory
GNU Make 3.81-1 does not accept DOS like path expression (i.e. C:/Cygwin), thus, it needs to specify as " /cygdrive/C/Cygwin", however, there is an exception. In lejos_osek.tmf, there is a macro to specify the path to TOPPERS ATK SG.exe:
  TOPPERS_OSEK_ROOT_SG = $(ROOT)/toppers_osek
TOPPERS ATK SG (System Generator) can accept only DOS like path expression, so it needs to specify the path like C:/Cygwin/...

Q: How do I specify compiler macro for my application?
A: USER_DEF is preserved for user to define application specific compiler macros. In Makefile for each application, compiler macros can be defined such as follows.

     # Target specific macros
     TARGET = HelloWorld
     TOPPERS_OSEK_OIL_SOURCE := ./helloworld.oil


Q: How do I specify include path for my application?
A: USER_INC_PATH is preserved for user to define application specific include pathes. In Makefile for each application, user include pathes can be defined such as follows.

     # Target specific macros
     TARGET = HelloWorld
     TOPPERS_OSEK_OIL_SOURCE := ./helloworld.oil

     USER_INC_PATH = ../FOO ../../FOO1

Q: How do I specify my library for my application?
A: USER_LIB is preserved for user to define application specific library. In Makefile for each application, user libray (e.g. user library name is libFOO.a) can be defined such as follows. Addionally, USER_INC_PATH is also needed to set the path to user library.

     # Target specific macros
     TARGET = HelloWorld
     TOPPERS_OSEK_OIL_SOURCE := ./helloworld.oil


     USER_INC_PATH = ../FOO_lib

Q: How do I set up nxtOSEK in Linux?
A: Unfortunately, nxtOSEK has been developed under Cygwin in Windows XP, so we have never test it in a Linux machine. However, some Linux users already seem to make nxtOSEK work in Linux! Jonny 5's blog may be useful for Linux users. If somebody writes nice installion and setup instructions for Linux, please let us know!

Q: When I try to build a larger program over 64Kbytes, I encounterd a link error.
A: In case of uploading a nxtOSEK application into RAM, maximum program size is 64Kbytes. During the link process, maximum program size is checkd and the error is reported. On the other hand, in case of uploading a nxtOSEK application into Flash, maximum program size is 224Kbytes.
In each application Makefile, user can control generation of binary files by BUILD_MODE macro.
  BUILD_MODE is not defined(default): generates binary executables for enhanced NXT standard firmware, Flash and RAM
  BUILD_MODE = ROM_ONLY: generates binary executable for only Flash
  BUILD_MODE = RAM_ONLY: generates binary executable for only RAM
  BUILD_MODE = RXE_ONLY: generates binary executable for only enhanced NXT standard firmware

     # Target specific macros
     TARGET = HelloWorld
     TOPPERS_OSEK_OIL_SOURCE := ./helloworld.oil


Q: I don't like the default splash screen. How do I use my original splash screen?
A: Sorry, I have no talent for graphic design. If you wanted to use your original splash screen, please proceed the following steps:

1. Open ecrobot_splash.bmp in ecrobot directory. This is the design source for the nxtOSEK splash screen.
2. Save ecrobot_splash.bmp. It should be a monochrome bmp file and pixel size should be 100(w) x 64(h).
3. If you already succeeded to build a nxtOSEK application, move to ecrobot directory and type make in Cygwin, then the new ecrobot_splash.bmp will be linked to libecrobot.a
4. Type make release in Cygwin to clean up the files.
5. Build your application and upload into the NXT. You'll see your splash screen!


nxtOSEK Hardware:

Q: Does nxtOSEK program upload affect the lifecycle of Flash in NXT?
A: nxtOSEK supports application program upload to both of Flash/RAM. By means of affection to Flash endurance, uploading NXT BIOS to Flash is equivalent to uploading LEGO standard firmware and uploading nxtOSEK application to flash is equivalent to uploading NXT-G application.
Concerning uploading a nxtOSEK application to RAM, it does not affect the lifecycle of flash. There is a good discussion thread in nxtasy.org. Please check here.

Q: Even if I uploaded a program to my NXT, any buttons (RUN/STP/EXIT) do not work. How do I solve this problem?
A: Inside of a NXT, there are two CPUs (a main ARM7 and an AVR for peripheral control). This problem is caused by some communication error between the CPUs. To solve the problem, perform the following steps:
1. Disconnect the USB cable from the NXT.
2. Remove the battery from the NXT for five seconds, then insert the battery again.
3. Connect the USB cable to the NXT.
4. Push ENTR button on the NXT.
5. Upload the program.

Q: After program upload, any buttons do not work and the battery voltage display (BATT:) remains 0.

A: Remove the battery for 5 seconds and insert it again.

Q: During program upload by using LibUSB, the following message was appeared in Cygwin.
NXT not found. Is it properly plugged in via USB?
Make sure PC and the NXT are connected by USB cable.
Remove the battery for five seconds and insert again.
A3: Re-install LibUSB to the directory which does not contain spaces and multi-byte characters.
Change the USB port on PC . If the USB port was valid, a new USB device installation message should be appeared on the Windows Taskbar.
A5: Check Control Panel->System->Hardware->Device Manager->LEGO Devices->LEGO MINDSTORMS NXT Firmware Update Mode->(right click on the LEGO MINDSTORMS NXT Firmware Update Mode) Property->Driver->Driver Details. libusb0.sys should be appeared besides with fantom.sys. If not, re-install LibUsb.


nxtOSEK Projects:

Q: How fast is NXT GT?
A: NXT GT uses standard servo motors and motor revolution is transferred via 40(motor) : 16(wheel) tooth gears to the wheels. the maximum speed of a NXT GT is appx. 1.3 m/s with 8V rechargeable battery. For more detailed information about NXT GT spec. check here.