January, 2013 - nxtOSEK 2.18

July 07
, 2008 - NXT GamePad 1.04

Note: sg.exe is removed from nxtOSEK (March 01, 2010)

To keep the terms of, I have decided to remove sg.exe binary file (an OSEK OIL parser and code generator) from nxtOSEK. sg.exe which was included in nxtOSEK is same as sg.exe in TOPPERS/OSEK 1.1 at TOPPERS project where outside of TOPPERS/OSEK 1.1 can be downloaded from : osek_os-1.1.lzh
osek_os-1.1.lzh is compressed as LZH format and it needs to use a lzh supported file extractor, for example, 7-zip which would work in Windows XP/Vista and Linux/Unix.

To use sg.exe in osek_os-1.1.lzh for nxtOSEK:
 - Extract osek-os-1.1.lzh
 - Copy extracted /toppers_osek/sg/sg.exe to nxtOSEK/toppers_osek/sg directory

Note that nxtOSEK ver2.18 supports OSEK COM features and it requires sg.exe in the latest TOPPERS ATK1 (January, 2013)

お 知らせ: nxtOSEKからのsg.exeの削除について(2010/03/01) からの指摘を受け、nxtOSEKに従来含まれていたsg.exeバイナリファイル(OSEK OILパーサー/コード生成ツール)を削除することにしました。ただし、nxtOSEKに含まれていたsg.exeは、TOPPERS プロジェクトで公開されているTOPPERS/OSEK 1.1のものを使用しており、次のリンクからダウンロードすることができます: osek_os-1.1.lzh 

TOPPERS/OSEK 1.1のsg.exeをnxtOSEKで使用する手順は次の通りです:
 - ダウンロードしたosek-os-1.1.lzhを解凍する
 - 解凍した toppers_osek/sg/sg.exe を nxtOSEK/toppers_osek/sg ディレクトリにコピーする

お知らせ: nxtOSEK v2.18よりサポートしたOSEK COM機能を使用する場合は、TOPPERS ATK1に含まれているsg.exe を使用してください。 (2013/01)

nxtOSEK (formerly LEJOS OSEK) Release Note:

2.18 January, 2013
- Fixed bugs in PCM sound stream C API and added new functions for PCM sound playback
- Added wavelooptest C sample (see samples_c\wavelooptest)
Special thanks to Eiji Sato who developed the API and the sample originally for ET ROBOCON 2012(
- Improved stability of NXT BIOS
Special thanks to Koji Shimizu
- Support OSEK COM (see samples_c\comtest or samples_c++\OsekCom)
Note that OSEK COM requires sg.exe in TOPPERS ATK1 (
Special thanks to Professor Naohiko Shimizu (
- Fixed a bug in ecrobot.mak and ecrobot++.mak
Special thanks to Dariusz Antoniuk
Takashi Chikamasa
Eiji Sato (ET ROBOCON)
Koji Shimizu (ET ROBOCON)
Professor Naohiko Shimizu
Dariusz Antoniuk
February, 2012
- Added ecrobot_exec_NXT_BIOS C/C++ API to be able to execute NXT BIOS from application automatically
(See samples_c\executeNXTBIOS, samples_c++\cpp\ExecNXTBIOS samples)
Note that the new C/C++ API works only when NXT BIOS is used. Otherwise it does nothing
Note that the new C/C++ API requires NXT BIOS 1.04 or later
- Updated NXT BIOS to 1.04
  - Uploaded application is executed after program upload without turn off/on the NXT
  - Improved robustness of program upload (I hope)
  - Program upload progress bar is replaced with simple "Uploading..." message to reduce IRQ load
for LCD updates
Note that the new C/C++ API and the update of NXT BIOS improve usability of NXT BIOS and user can design prefered application upload sequence
Takashi Chikamasa
(takashic AT

December, 2011
- Support HiTechnic DC Motor Controller for TETRIX in C API (See samples_c\tetrix)
Special thanks to Loic Cuvillon to develop the C API and the C sample
- Added installation instructions for Mac OS X (Lion)
Special thanks to Dmitry Prokhorov
- Updated installation instructions for Linux (Ubuntu 11.10)
Special thanks to Lauro Ojeda
- Added samples_c\mathtest sample
- Modified LFLAG in tool_gcc.mak to link ANSI-C math library properly
Special thaks to Paul Besson to report the bug

- Added NO_RUN_ENTER_STOP_EXIT compile switch macro to enable to suppress initial splash screen and disable RUN/ENTER/STOP/EXIT operations assignment to the NXT buttons
(See samples_c\noRunEnterStopExit, samples_c\noRunEnterStopExitAndBluetooth and samples_c++\cpp\Nxt2 samples)
- Added ecrobot_restart_NXT and ecrobot_shutdown_NXT C API to be able to re-start/shutdown NXT
- Added ecrobot_get_button_state C API and BTN_ORANGE_RECT/BTN_LEFT/BTN_RIGHT/BTN_GRAY_RECT macros to be able to retrieve status of the buttons on the NXT
- Added the above new C API equivalent properties to ecrobot::Nxt C++ class
Note that the above new features allows users to design user orignal interface with the NXT LCD and buttons instead of nxtOSEK default initial display and RUN/ENTER/STOP/EXIT buttons assignment. It also reduces ROM size about 2 Kbytes.
Takashi Chikamasa
(takashic AT
Loic Cuvillon
Dmitry Prokhorov
Lauro Ojeda
Paul Besson
March 18, 2011
- Improved and fixed bugs in Bluetooth C/C++ API
1. Removed BT_BUF_SIZE macro in C API and MAX_BT_DATA_LENGTH in C++ API
2. Corrected maximum size of Rx data packet buffer to be 126 (formerely, 254 bytes) for ecrobot_read_bt_packet and related C++ API
3. Fixed bugs in ecrobot_get_device_address, ecrobot_get_device_name and related C++ API
4. [RECOMMENDED TO USE] Added new C/C++ API to send/read data without data frame restrictions. Note that the new C/C++ send/read API are faster and it allows user to fully design data frame structure (extra 2 bytes can be used in user application)
5. Added C/C++ API to get signal strength (RSSI)
6. Added Bluetooth C/C++ samples
 (samples_c\btinfo, samples_c\btecho, samples_c++\cpp\BluetoothInformation, samples_c++\cpp\BluetoothEcho)
Special thanks to Yamaguchi-san

- Changed the scope range of ecrobot\c\colorsensor.h from global to internal use only
Special thanks to Yamaguchi-san
-  Fixed a bug in ecrobot_sound_wav C API and Speaker C++ API
(enable to play WAV files that don't contain 2 byte dummy zeros in the fmt block)
Special thanks to Eric Matsui-san
Takashi Chikamasa
(takashic AT
Eric Matsui-san


December 3, 2010
- Added NXT2.0 Color Sensor C/C++ API (See nxtOSEK\samples_c\nxtcolorsensortest and
  Special thanks to Marcel Hein and Benjamin Bode who developed the APIs
- Added HiTechnic Prototype Sensor C API (See nxtOSEK\samples_c\hitechtest3)
- Improved robustness of NXT BIOS and appflash.exe (upload sequence, check sum and 
  error routines)
  Note: If program uproad process was stopped due to some reason 
  (e.g. USB disconnection, data corruption), keep pushing EXIT button on the NXT longer
  than one second to shut down the NXT.
- Fixed a bug in ECRobot C++ API(GyroSensor.setOffset)
- Fixed a bug in ecrobot_device_initialize when application program is re-started
Takashi Chikamasa
(takashic AT
Marcel Hein
Benjamin Bode
2.13 May 30, 2010
- Added ECRobot RS485 C/C++ API
(see samples_c\rs485test and samples_c++\cpp\RS485)
Special thanks to Simone Casale Brunet who developed the API.
- Added ECRobot C API for mindsensors Multiplexer (see samples_c\nxtmmxtest)
Special thanks to Thanh Pham who developed the API.
Takashi Chikamasa
(takashic AT
Simone Casale Brunet
Thanh Pham
2.12 March 01, 2010
- sg.exe is removed from nxtOSEK to keep the terms of
- Corrected inconsistent linefeeds (Unix + DOS) in the source files
  + Special thanks to Bernhard Merkle
Takashi Chikamasa
(takashic AT


January 09, 2010
- Added BTConnection C++ API. This is a helper class for Bluetooth connection
  (see samples_c++\cpp\BTConnection)
- Added clearRow member function to Lcd C++ API.
- Refactored and added dynamic gyro sensor offset calibration to nxtway_gs++ sample
(see samples_c++\cpp\NXTway_GS++)
- Added NXTway-GS++ based Line Tracing robot (see samples_c++\cpp\NXTway_LT)
- Added Tribot R/C sample (see samples_c++\cpp\TribotRC\)
- Corrected PSP-Nx class of ECRobot C++ API to work properly
  + Special thanks to Rade to test it patiently
- Added mindsensor NxtCam C API developed by Loic Royer
  + Check his cool nxtjohnny5 project:
- Added mindsensor NxtCam C++ API (Camera class)
  + Based on Loic's C API (but, never tested because I don't have a NXTCam)
- ECRobot C++ API(I2C devices and Clock) are supported by TOPPERS/JSP(ITRON)
  + Special thanks to mai-mai san (

Takashi Chikamasa
(takashic AT


May 07, 2009
- Improve ARM7-AVR communication to be more robust (especially effective for TOPPERS/JSP)
  + Updated lejos device drivers (the low level stuff has become the most stable ever!)
  + Note that this change also makes NXT BIOS updated to v1.02
- Refactored ECRobot C++ API
  + Added global C++ new/delete overload to reduce memory consumption      (ecrobot\c++\util\New.cpp)
  + Changed behavior of Motor.reset() C++ API (motor always stops with brake)
  + Unified data type of string parameters to (const) CHAR* in Bluetooth C/C++ API
  + Removed unneccessary explicit destructors to reduce memory consumption
  + Added explicit keyword to converting constructors to prevent implicitly converted
  + Inlined simple forwarded member functions
  + Re-ordered class member to public->protected->private
- Fixed a bug in ecrobot_get_sonar C API for supporting multiple sonars
  + Special thanks to Iheanyi Umez-Eronini to report and fix the bug
- Fixed a bug in ecrobot_read_bt_packet C API and ECRobot Blutooth C++ API
  + Special thanks to EunJin Jeong to report and fix the bug
- Fixed a bug in ecrobot_sound_wav C API and ECRobot Speaker.playWav C++ API
  + Special thanks to epokh to report the bug

Takashi Chikamasa


March 27, 2009
- Added LegoLight class in ECRobot C++ API
- Added more Bluetooth C/C++ API
- Added no C++ RTTI option (fno-rtti) for .cc and .cpp source files (ecrobot\tool_gcc.mak)
Note that it could save several Kbytes of memory per an application!
- Refactored ECRobot C++ API according to g++ warning options and design patterns
- Fixed bugs in tool_gcc.mak and ecrobot++.mak (ecrobot\)

Takashi Chikamasa


March 23, 2009
- Added ECRobot C++ API and samples (ecrobot\c++, samples_c++\cpp)

- Added more HiTechnic products C API (ecrobot\ecrobot_HiTechnic.c)
Special thanks to Nathan Bahr who originally wrote HiTechnic IR Seeker API
- Fixed a bug in ecrobot_send_i2c, ecrobot_receive_i2c API

Takashi Chikamasa

Nathan Bahr
- Wrote original version of HiTechnic IR Seeker C API

Feburuary 02, 2009
- Added Sprite C++ API and samples (samples\c++\sprite_*)
- Added NXT sleep feature (ecrobot\ecrobot.c)
Note that if there was no operation within 10minutes after starting the system (not application), NXT is automatically turned off to avoid unfavorable battery discharge.
- Corrected bug of ecrobot_process1ms_usb in ECRobot USB API (ecrobot\ecrobot_usb.c)
- Corrected Makefile for C++ library (c++\src\Makefile)

Takashi Chikamasa

Jon C. Martin
- Developed C++ sprite API and samples

January 08, 2009
- Fixed bugs of nxtcommfantom API for PC side (ecrobot\nxtcommfantom)
Note that multiple NXTs connection seems to not work, so the API is restricted for only a NXT

Takashi Chikamasa

January 05, 2009
- Support for Windows Vista (Enhanced NXT firmware and NXT BIOS)
- Updated ECRobot USB C API to be able to communicate with LEGO MINDSTORMS NXT Driver (samples\usbtest, usbhost)
- Updated appflash.exe and NXT BIOS to be able to communicate with LEGO MINDSTORMS NXT Driver (NXT BIOS is updated to v1.01)
- Obsoleted biosflash.exe and replaced with NeXTTool to upload NXT BIOS
- Support for TOPPERS/JSP as an RTOS kernel in addtion to TOPPERS/ATK(OSEK)
Note that TOPPERS/JSP is complied with Japan original open RTOS specification μITRON 4.0
Note that nxtOSEK C++ API uses some OSEK APIs, so it can't be used with JSP
- Refactored NXT buttons status check routines (ecrobot\ecrobot_interface.c, ecrobot.c)
- Refactored makefiles and replaced lejos_osek.tmf with ecrobot.mak
Note that lejos_osek.tmf is still supported for backward compatibility

Takashi Chikamasa

Monami Software Limited Partnership, Japan
- Ported TOPPERS/JSP to the NXT

November 18, 2008
- Support for C malloc/free (samples\dynamicMemoryTest)
- Support for C++ new/delete, Boost smart pointer (samples\c++\smartPtrTest)

Takashi Chikamasa

Special thanks to Jon C. Martin for
C++ new/delete and others.

October 01, 2008
- Added NXTway-GS C API (ecrobot\nxtway_gs_balancer, samples\nxtway_gs)
- Added mindsensors PSP-Nx C++ API and sample(c++, samples\c++\PSPNxTest)
- Support for multiple HiTechnic Acceleration Sensors on a NXT
- Fixed a bug in ecrobot_RUN_button_pressed/ecrobot_ENTER_button_pressed API
- Added biped robot sample using LATTEBOX NXTe/LSC (via I2C interface API)
- Added LATTEBOX LSC-22 sample
- Removed NXTway-DS sample

Takashi Chikamasa

Special thanks to Jon C. Martin for
mindsensors PSP-Nx C++ API.

Special thanks to Yu Yang for

June 01, 2008
- Support for an enhanced NXT standard firmware (ecrobot\)
- Added LATTEBOX NXTe/LSC RC servo controller sample (see samples\nxte)
- Refactored ecrobot source code to support various upload methods
- Corrected LCD shut down process (ecrobot\ecrobot.c, ecrobot\bios\bios.c)
- Changed BUILD_MODE Makefile macro parameters
  (Flash_only to ROM_ONLY, SRAM_only to RAM_ONLY and added RXE_ONLY)

Takashi Chikamasa

Special thanks to Sivan Toledo
and John Hansen for the enhanced
NXT standard firmware.

Special thanks to Yu Yang for


May 13, 2008
- Changed the project name from LEJOS OSEK to nxtOSEK
- Added C API to support BMP file for LCD display (see samples\bmptest, anime)
- Added C API to support WAV file for sound generation (see samples\wavtest)
- Added C API to support USB communication (see samples\usbtest, usbtest\usbhost)
- Added C API to support general I2C communication (ecrobot\)
- Support for Bluetooth run-time connection (ecrobot\)
- User customizable BMP file based splash screen
- Refactored ecrobot source code (ecrobot\, ecrobot\bios\)
- No functionality changes in NXT BIOS (you don't need to update NXT BIOS)

Takashi Chikamasa


April 07, 2008
- Support for application program upload into Flash / RAM
- Added NXT BIOS which enables application flash (max. 224Kbytes)
- Added PC console programs (biosflash, appflash and ramboot) based on LibNXT / LibUsb
- New splash screen and main screen
- Speed up compilation time of an application program
- Added C API for NXT buttons (ENTR and RUN)
- Added C++ API for HiTechnic Prototype Sensor
- Added NXT Remocon sample (similar to Nintendo Wiimote remote control with sound)

Robert W. Kramer
- Added C++ API for
HiTechnic Prototype Sensor
Yoshiaki Banno
- Developed NXT Remocon
Takashi Chikamasa

March 14, 2008
- Fixed a binary link problem in Windows and Linux.
For more detailed information, check here and here in
Alexander Neundorf
Johnny 5
Robert W. Kramer
Takashi Chikamasa
February 27, 2008
- Use LibNXT and LEGO MINDSTORMS NXT Driver (instead of ATMEL SAM-BA) to upload a program
- Refactored ecrobot source code (ecrobot\)
- Added I2C write sample (samples\i2cwrite)
Takashi Chikamasa

February 04, 2008
- Support C++ application programming (ecrobot\)
- Released C++ API version 0.1 beta (c++\)
- Added C++ application samples (samples\c++)
- Support NXT-NXT Bluetooth communication, sound output (ecrobot\)
- Changed interface of ecrobot_status_monitor C API (ecrobot\)
- Added C samples (samples\btmaster, btslave, data logging, soundtest)
- Optimised NXTway-GS sample (samples\nxtway_gs)
- Updated leJOS NXJ I/O driver source files to lejos_NXJ_win32_0_5_0beta

Robert W. Kramer
- Made LEJOS-OSEK can be
used for C++ and developed
Yorihisa Yamamoto
- Optimised NXTway-GS
Takashi Chikamasa


December 24, 2007
- Improved LCD display performance (ecrobot\)
- Improved Bluetooth re-connection usablity (ecrobot\)
- Reconstructed makefiles (ecrobot\, samples\)
- Updated leJOS NXJ I/O driver source files (lejos_nxj\src\nxtvm\platform\nxt)
- Added NXTway-GS sample (samples\nxtway_gs)
- Added I2C comm. example for mindsensor acceleration sensor (samples\generici2ctest)

Jose Vasconcellos
- Reconstucted makefiles
Yorihisa Yamamoto
- Developed NXTway-GS
Takashi Chikamasa
November 21, 2007
- Support RCX Sensors (ecrobot\)
- Fixed port S4 issue by updating leJOS NXJ code (lejos_nxj\src\nxtvm\platform\nxt)
- Added RCX sensor API sample (samples\rcxtest)
Maurits Kooiman
- Contributed for RCX sensors API
Takashi Chikamasa
October 10, 2007
- Support HiTechnic Acceleration Sensor and Gyro Sensor (ecrobot\)
- Added HiTechnic Sensors sample (samples\hitechtest)
Takashi Chikamasa

August 17, 2007
- Re-designed splash and menu screen (ecrobot\)
- Added ecrobot_bt_data_logger API (ecrobot\)
- Updated NXT GT sample to implement data logging (samples\nxtgt)
- Added speedtest sample (samples\speedtest)
- Updated init.s to be lejos_NXJ_win32_0_3_0alpha (lejos_nxj\src\nxtvm\platform\nxt)

Takashi Chikamasa
July 11, 2007
- Fixed a bug in restart of LEJOS OSEK (ecrobot\)
- Renamed RESET button to STOP button (ecrobot\)
- Added NXT GT example (samples\nxtgt)
Takashi Chikamasa
June 29, 2007
- Support RESET button to be able to restart the application (ecrobot\)
- Added more samples (samples\)
Takashi Chikamasa

June 04, 2007
- Support absolute path for TOPPERS ATK SG (ecrobot\lejos_osek.tmf)
- Fixed math.h link error (ecrobot\lejos_osek.tmf)
- Support LEJOS platform C original API (ecrobot\)

Takashi Chikamasa

May 20, 2007
- Initial release

Masaaki Mizuno
Takashi Chikamasa
- Wrote glue code and makefiles

NXT GamePad Release Note:

July 07, 2008
- Added analog inputs configuration in INI file (NXTGamePad\Release\NXTGamePad.ini)
- Improved data logging start/stop functionalities
Tomoki Fukuda
June 12, 2008
- Added INI file to save user configurations (NXTGamePad\Release\NXTGamePad.ini)
- Improved error handling while terminating data logging
- Changed project folder name to NXTGamePad (ex. NXTRemote)
Tomoki Fukuda
November 21, 2007
- Added R/C inputs gain adjustment feature
Tomoki Fukuda
August 17, 2007
- Support data logging feature
Tomoki Fukuda

July 11, 2007
- Initial release

Tomoki Fukuda