General questions

What is the firmware?

The firmware is the software which runs on your NXT brick and provides menus, file system and eventually an high level language interpreter.

The NXT firmware is a kind of operating system on which you can run your own programs.

The NXT brick comes with a firmware from LEGO®, but you can install other firmwares which provide improvements or other programming languages.

Is there a risk to use NXT Improved Firmware?

It should be safe, unless your source code modifications make really bad things with IO or LCD.

You should always be able to reprogram your NXT brick using the original firmware thanks to the NXT reset button.

This software is provided by the author ``as is'' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Comparison with other firmwares

How does NXT Improved Firmware compares to NXT-G, NBC or NXC?

NXT-G, NBC and NXC are languages to make robots using the NXT firmware. NXT Improved Firmware is a replacement for the original firmware and should offer the same functionality. Therefore, for basic use, you should not see any difference.

So why should I use it?

Unless you want to dig into the NXT internals, there is not much benefit.

How does NXT Improved Firmware compares to NBC/NXC Firmware ?

(also known as John Hansen Firmware or NXT Enhanced Firmware)

NXT Improved Firmware will compile with GCC. There is a source repository, so it's easy to see what changed.

NBC/NXC Firmware provides new features and bug fixes which are not in NXT Improved Firmware yet. Being compiled with IAR compiler, there may be more space left for the file system.

If you want to work on NBC/NXC Firmware using GCC, you can use the jch-merge branch in NXT Improved Firmware repository which contains modifications from both firmwares.

How does NXT Improved Firmware compares to NXTGCC?

NXTGCC is compiled using an old APCS compiler which poses problems with NXT source code. There are bugs left and the firmware is not stable.

NXTGCC is released in a big ZIP file including Windows compiler and Eclipse installation, which is of no use for a Linux user.

How does NXT Improved Firmware compares to LeJOS, nxtOSEK, pbLua, nxos?

NXT Improved Firmware is based on the original firmware and do not provide any new programming language.

The other firmwares provide completely new environments with a new way to program your robots.


What is APCS and EABI (in ARM GCC context)?

APCS is the ARM Procedure Call Standard, the old compiler ABI standard.

EABI is the Embedded Application Binary Interface, the new one, which aims at providing better interoperability between compilers from different vendors.

Do I really need an EABI compiler and why?

Yes, you really need an EABI compiler.


With the new ABI, default structure packing changes, as do some default data sizes and alignment (which also have a knock-on effect on structure packing). In particular the minimum size and alignment of a structure was 4 bytes. Under the EABI there is no minimum and the alignment is determined by the types of the components it contains. This will break programs that know too much about the way structures are packed and can break code that writes binary files by dumping and reading structures.

That is the problem with the APCS toolchain (arm-elf-gcc). The NXT firmware wrongly uses knowledge about the compiler way of assembling structures. The new EABI matches the convention used in the IAR compiler.


struct a {
    short int s;

IAR and EABI toolchain will make a 2 byte structure, APCS will make a 4 byte structure. The NXT source code wants the IAR convention.