Page 1 of 1

How to compile firmware v1.29 with IAR-cc?

Posted: 20 Dec 2010, 20:24
by mrblp
Hello,

LEGO distributes the NXT firmware as binary also as source code. I installed the free IAR compiler toolchain (v4.42) and tried to compile this source code.

There are two workbench-files (LMS-ARM and LMS-V02) which produce slightly different binaries. Even worse none of those binaries is equal to the binary delivered by LEGO. I know the file system is added at the original firmware - I already cut that part of. It still differs.

Why are they different? How can I get exactly the LEGO binary? What compiler is LEGO using? Really the "old" 4.42 or did they upgrade to 6.??

Thank you for the answers :-)

Bye marvin

Re: How to compile firmware v1.29 with IAR-cc?

Posted: 22 Dec 2010, 05:20
by nikzagvit
Me as this question interests. Experts help us to understand!

Re: How to compile firmware v1.29 with IAR-cc?

Posted: 27 Dec 2010, 16:50
by mrblp
Hello everybody,

I tried to compile the source code with different options and found things out:

v1.29: Compiled by LEGO (delivered version) = 0x22050 bytes binary
Compiled by LEGO (LMS_V02.rfw file in source) = 0x21164 bytes binary
Compiled by me with the delivered lib = 0x21114 bytes binary
Compiled by me with the 4.42 lib = 0x21684 bytes binary

The difference is about 3900 bytes which is a bit much for a little difference...

v1.05: Compiled by LEGO = 0x20BB4 bytes binary
Compiled by me with v1.29-delivered lib = 0x1DA40 bytes binary
Compiled by me with the 4.42 lib = 0x1DE04 bytes binary

The difference is about 12000 bytes here!!!

v1.28 Enhanced:
No difference. Only some bytes are changed - I think date and time based bytes.

Did anyone use a self-compiled version?
If yes - is there any different behaviour to the "original" version?

A question to John: Do you know why there is this difference?

Bye - marvin

Re: How to compile firmware v1.29 with IAR-cc?

Posted: 01 Jan 2011, 14:45
by afanofosc
Unfortunately I do not know the reason for the differences you are seeing.

John Hansen